Created
October 28, 2021 23:45
-
-
Save tateisu/b690bcdf558f5b34ef625b30e0d0e3cd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical" | |
tools:context=".MainActivity"> | |
<!-- ImageButton はデフォルトの背景(とパディング) があるが、この例はパディングを上書きする --> | |
<ImageButton | |
android:layout_width="24dp" | |
android:layout_height="24dp" | |
android:importantForAccessibility="no" | |
android:padding="4dp" | |
android:scaleType="fitCenter" | |
app:srcCompat="@drawable/ic_android" | |
app:tint="?android:attr/textColor" /> | |
<ImageButton | |
android:layout_width="48dp" | |
android:layout_height="48dp" | |
android:importantForAccessibility="no" | |
android:padding="12dp" | |
android:scaleType="fitCenter" | |
app:srcCompat="@drawable/ic_android" | |
app:tint="?android:attr/textColor" /> | |
<ImageButton | |
android:layout_width="96dp" | |
android:layout_height="96dp" | |
android:importantForAccessibility="no" | |
android:padding="12dp" | |
android:scaleType="fitCenter" | |
app:srcCompat="@drawable/ic_android" | |
app:tint="#FF8000" /> | |
<ImageButton | |
android:layout_width="144dp" | |
android:layout_height="144dp" | |
android:importantForAccessibility="no" | |
android:padding="12dp" | |
android:scaleType="fitCenter" | |
app:srcCompat="@drawable/ic_android" | |
app:tint="#0080ff" /> | |
</LinearLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment