-
-
Save codeforfun-jp/ae1c6d03ed2963cf09baaa6f0a2e86b4 to your computer and use it in GitHub Desktop.
【Kotlin】ListView with imageview and textview 2
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"?> | |
<androidx.constraintlayout.widget.ConstraintLayout 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:padding="6dp"> | |
<ImageView | |
android:id="@+id/image" | |
android:layout_width="50dp" | |
android:layout_height="50dp" | |
tools:src="@tools:sample/avatars" | |
app:layout_constraintStart_toStartOf="parent" | |
app:layout_constraintTop_toTopOf="parent" /> | |
<TextView | |
android:id="@+id/name" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
tools:text="動物名" | |
android:textSize="18sp" | |
android:layout_marginStart="6dp" | |
android:layout_marginLeft="6dp" | |
app:layout_constraintStart_toEndOf="@+id/image" | |
app:layout_constraintTop_toTopOf="@+id/image" /> | |
<TextView | |
android:id="@+id/detail" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
tools:text="説明文を表示します。" | |
app:layout_constraintBottom_toBottomOf="@+id/image" | |
app:layout_constraintStart_toStartOf="@+id/name" | |
app:layout_constraintTop_toBottomOf="@+id/name" /> | |
</androidx.constraintlayout.widget.ConstraintLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment