Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/schaal/ocreader.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Schaal <daniel@schaal.email>2021-07-10 10:39:36 +0300
committerDaniel Schaal <daniel@schaal.email>2021-07-25 10:10:47 +0300
commitad73f43cca6e7a813f664126e46465c649bdd9d2 (patch)
tree628634b0e73460f2bbf925d5b8131c9c9cbe8f83
parenta1eb9c7cc54625075a4e08250742ac0f05a20913 (diff)
Convert list_feed to ConstraintLayout
-rw-r--r--app/src/main/res/layout/list_feed.xml55
1 files changed, 31 insertions, 24 deletions
diff --git a/app/src/main/res/layout/list_feed.xml b/app/src/main/res/layout/list_feed.xml
index 92fd0d14..64c2732b 100644
--- a/app/src/main/res/layout/list_feed.xml
+++ b/app/src/main/res/layout/list_feed.xml
@@ -19,9 +19,10 @@
-->
<layout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools">
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools">
- <RelativeLayout
+ <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/selectable_background"
@@ -31,53 +32,59 @@
android:id="@+id/imageview_favicon"
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
- android:layout_alignParentStart="true"
- android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/materialize_spacing"
android:background="@drawable/favicon_background"
- android:padding="@dimen/icon_padding"
android:contentDescription="@string/feed_icon_description"
- tools:src="@drawable/ic_feed_icon"/>
+ android:padding="@dimen/icon_padding"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ tools:src="@drawable/ic_feed_icon" />
<TextView
android:id="@+id/textViewTitle"
- android:layout_width="wrap_content"
+ android:layout_width="0dp"
android:layout_height="wrap_content"
- android:layout_toEndOf="@+id/imageview_favicon"
- android:layout_toStartOf="@+id/delete_feed"
+ android:layout_marginStart="@dimen/materialize_spacing"
android:ellipsize="end"
android:maxLines="1"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
- tools:text="This is the feed title"/>
+ app:layout_constraintEnd_toStartOf="@id/delete_feed"
+ app:layout_constraintHorizontal_bias="0.0"
+ app:layout_constraintStart_toEndOf="@+id/imageview_favicon"
+ app:layout_constraintTop_toTopOf="parent"
+ tools:text="This is a very long feed title that should get ellispized" />
<TextView
android:id="@+id/textViewFolder"
- android:layout_width="wrap_content"
+ android:layout_width="0dp"
android:layout_height="wrap_content"
- android:layout_alignStart="@id/textViewTitle"
- android:layout_below="@id/textViewTitle"
- tools:text="Folder"/>
+ app:layout_constraintStart_toStartOf="@id/textViewTitle"
+ app:layout_constraintTop_toBottomOf="@id/textViewTitle"
+ tools:text="Folder" />
<ImageView
android:id="@+id/delete_feed"
android:layout_width="@dimen/small_icon_size"
android:layout_height="@dimen/small_icon_size"
- android:layout_alignParentEnd="true"
- android:layout_centerVertical="true"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/delete_feed"
android:src="@drawable/ic_delete"
- android:tint="@color/delete"/>
+ app:tint="@color/delete"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/feed_failure"
- android:layout_width="wrap_content"
+ android:layout_width="0dp"
android:layout_height="wrap_content"
- android:layout_below="@+id/textViewFolder"
- android:layout_alignStart="@+id/textViewFolder"
- android:visibility="gone"
android:textColor="@color/error"
- tools:visibility="visible"
- tools:text="This feed failed for some reason"/>
- </RelativeLayout>
+ android:visibility="gone"
+ app:layout_constraintStart_toStartOf="@id/textViewFolder"
+ app:layout_constraintTop_toBottomOf="@id/textViewFolder"
+ app:layout_constraintEnd_toStartOf="@id/delete_feed"
+ tools:text="This feed failed for some reason"
+ tools:visibility="visible" />
+ </androidx.constraintlayout.widget.ConstraintLayout>
</layout> \ No newline at end of file