1
0
Fork 0

Use tools:listitem with collection creation (#6140)

master
Tiger Oakes 2019-10-24 10:24:08 -07:00 committed by GitHub
parent 165b1420b7
commit 97433dc145
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 27 additions and 16 deletions

View File

@ -4,6 +4,7 @@
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<androidx.cardview.widget.CardView 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:id="@+id/collection_item_tab"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -29,10 +30,11 @@
android:adjustViewBounds="true"
android:importantForAccessibility="no"
android:scaleType="fitCenter"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="parent"
tools:srcCompat="@tools:sample/avatars" />
<TextView
android:id="@+id/hostname"
@ -45,24 +47,26 @@
android:textSize="12sp"
android:textStyle="bold"
app:layout_constraintStart_toEndOf="@id/favicon_image"
app:layout_constraintTop_toTopOf="@id/favicon_image" />
app:layout_constraintTop_toTopOf="@id/favicon_image"
tools:text="@tools:sample/lorem" />
<TextView
android:id="@+id/tab_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginStart="8dp"
android:layout_marginTop="4dp"
android:layout_marginBottom="8dp"
android:ellipsize="end"
android:maxLines="2"
android:minLines="2"
android:textColor="?primaryText"
android:textSize="15sp"
app:layout_constraintStart_toEndOf="@id/favicon_image"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/tab_selected_checkbox"
app:layout_constraintStart_toEndOf="@id/favicon_image"
app:layout_constraintTop_toBottomOf="@id/hostname"
app:layout_constraintBottom_toBottomOf="parent"/>
tools:text="@tools:sample/lorem/random" />
<CheckBox
android:id="@+id/tab_selected_checkbox"
@ -74,6 +78,7 @@
android:elevation="1dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="parent"
tools:text="" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>

View File

@ -65,7 +65,8 @@
app:layout_constraintBottom_toTopOf="@id/bottom_button_bar_layout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/back_button" />
app:layout_constraintTop_toBottomOf="@id/back_button"
tools:listitem="@layout/collections_list_item" />
<EditText
android:id="@+id/name_collection_edittext"
@ -99,7 +100,8 @@
app:layout_constraintBottom_toTopOf="@id/bottom_button_bar_layout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/back_button" />
app:layout_constraintTop_toBottomOf="@id/back_button"
tools:listitem="@layout/collection_tab_list_row" />
<View
android:id="@+id/tab_list_dim"

View File

@ -48,7 +48,8 @@
android:layout_height="0dp"
android:alpha="0.0"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent" />
app:layout_constraintBottom_toBottomOf="parent"
tools:listitem="@layout/collections_list_item" />
<EditText
android:id="@+id/name_collection_edittext"
@ -77,15 +78,16 @@
android:id="@+id/tab_list"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:layout_marginStart="@dimen/component_collection_creation_list_margin"
android:layout_marginTop="@dimen/component_collection_creation_list_margin"
android:layout_marginEnd="@dimen/component_collection_creation_list_margin"
android:fadingEdgeLength="30dp"
android:requiresFadingEdge="vertical"
app:layout_constraintBottom_toTopOf="@id/name_collection_edittext"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/back_button" />
app:layout_constraintTop_toBottomOf="@id/back_button"
tools:listitem="@layout/collection_tab_list_row" />
<View
android:id="@+id/tab_list_dim"

View File

@ -52,7 +52,8 @@
app:layout_constraintBottom_toTopOf="@id/bottom_button_bar_layout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/back_button" />
app:layout_constraintTop_toBottomOf="@id/back_button"
tools:listitem="@layout/collections_list_item" />
<EditText
android:id="@+id/name_collection_edittext"
@ -90,7 +91,8 @@
app:layout_constraintBottom_toTopOf="@+id/bottom_button_bar_layout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/back_button" />
app:layout_constraintTop_toBottomOf="@id/back_button"
tools:listitem="@layout/collection_tab_list_row" />
<View
android:id="@+id/tab_list_dim"