Newer
Older
artist-browser / app / src / main / res / layout / artist_item_row.xml
@dbangoura dbangoura on 8 Mar 2021 2 KB first commit
<?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="@dimen/artist_item_row_height"
    android:layout_margin="@dimen/app_min_margin"
    android:background="@color/white">

    <ImageView
        android:id="@+id/item_thumbnail"
        android:layout_width="@dimen/artist_item_row_image_width"
        android:layout_height="match_parent"
        android:adjustViewBounds="true"
        android:contentDescription="@string/artist_image_content_description"
        android:scaleType="centerInside"
        android:src="@drawable/image_placeholder"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent" />

    <TextView
        android:id="@+id/item_name"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_margin="@dimen/app_default_margin"
        android:textSize="@dimen/artist_item_row_name_text_size"
        android:textStyle="bold"
        app:layout_constraintEnd_toStartOf="@+id/bookmark_imgbtn"
        app:layout_constraintStart_toEndOf="@+id/item_thumbnail"
        app:layout_constraintTop_toTopOf="parent"
        tools:text="bla bla" />

    <TextView
        android:id="@+id/item_disambiguation"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_margin="@dimen/app_default_margin"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toStartOf="@+id/bookmark_imgbtn"
        app:layout_constraintStart_toEndOf="@+id/item_thumbnail"
        app:layout_constraintTop_toBottomOf="@+id/item_name"
        tools:text="bla bla" />

    <ImageView
        android:id="@+id/bookmark_imgbtn"
        android:layout_width="@dimen/artist_item_bookmark_icon_size"
        android:layout_height="@dimen/artist_item_bookmark_icon_size"
        android:layout_marginEnd="@dimen/app_default_margin"
        android:adjustViewBounds="true"
        android:contentDescription="@string/bookmark_image_button_content_description"
        android:scaleType="centerInside"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:srcCompat="@drawable/ic_unbookmarked" />

</androidx.constraintlayout.widget.ConstraintLayout>