mirror of
https://github.com/jrpie/Launcher.git
synced 2025-06-07 17:59:54 +02:00
Improve widget list layout
This commit is contained in:
parent
dd3a2e91bd
commit
ba3255d9ec
1 changed files with 85 additions and 46 deletions
|
@ -6,55 +6,94 @@
|
||||||
android:id="@+id/list_apps_row_container"
|
android:id="@+id/list_apps_row_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="15sp">
|
android:layout_marginTop="15sp"
|
||||||
|
android:layout_marginHorizontal="30sp">
|
||||||
|
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:backgroundTint="#00000000"
|
||||||
|
app:cardElevation="0dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/icon_title_description_container"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/list_widgets_row_icon"
|
android:id="@+id/list_widgets_row_icon"
|
||||||
android:layout_width="40dp"
|
android:layout_width="40dp"
|
||||||
android:layout_height="40dp"
|
android:layout_height="40dp"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
tools:src="@mipmap/ic_launcher_round"
|
tools:src="@mipmap/ic_launcher_round"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:ignore="ContentDescription" />
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/list_widgets_row_name"
|
android:id="@+id/list_widgets_row_name"
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
android:layout_marginStart="10sp"
|
android:layout_marginStart="10sp"
|
||||||
android:layout_marginEnd="10sp"
|
android:layout_marginEnd="10sp"
|
||||||
android:gravity="start"
|
|
||||||
android:text=""
|
android:text=""
|
||||||
android:textSize="20sp"
|
style="@style/TextAppearance.Material3.HeadlineSmall"
|
||||||
tools:text="some widget"
|
tools:text="Some Widget"
|
||||||
app:layout_constraintStart_toEndOf="@id/list_widgets_row_icon"
|
app:layout_constraintStart_toEndOf="@id/list_widgets_row_icon"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintTop_toTopOf="@id/list_widgets_row_icon"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintBottom_toBottomOf="@id/list_widgets_row_icon"/>
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/list_widgets_row_description"
|
android:id="@+id/list_widgets_row_description"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="10sp"
|
|
||||||
android:gravity="start"
|
|
||||||
android:text=""
|
android:text=""
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="@+id/list_widgets_row_name"
|
app:layout_constraintStart_toStartOf="@+id/list_widgets_row_name"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/list_widgets_row_name"
|
app:layout_constraintTop_toBottomOf="@+id/list_widgets_row_name"
|
||||||
tools:text="a longer description of the widget" />
|
tools:text="A longer description of the widget that may take up multiple lines." />
|
||||||
<ImageView
|
|
||||||
android:id="@+id/list_widgets_row_preview"
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
android:layout_width="0dp"
|
|
||||||
android:maxHeight="100dp"
|
|
||||||
android:layout_marginStart="0dp"
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_marginEnd="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="100dp"
|
android:layout_height="match_parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
android:layout_marginTop="10dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintTop_toBottomOf="@id/icon_title_description_container">
|
||||||
app:layout_constraintTop_toBottomOf="@id/list_widgets_row_description"
|
|
||||||
tools:src="@mipmap/ic_launcher_round"
|
|
||||||
tools:ignore="ContentDescription" />
|
<ImageView
|
||||||
|
android:id="@+id/list_widgets_row_preview"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="100dp"
|
||||||
|
android:maxHeight="100dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/list_widgets_row_icon"
|
||||||
|
tools:src="@mipmap/ic_launcher_round"
|
||||||
|
tools:ignore="ContentDescription,NotSibling" />
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
Loading…
Add table
Add a link
Reference in a new issue