mirror of
https://github.com/skyline-emu/skyline.git
synced 2025-01-11 02:09:21 +01:00
AppListItem
misc tweaks
* Restore text marquee on all layouts * Text size and color tweaks * List layout image has round corners * Clean up unneeded attributes
This commit is contained in:
parent
5c76a57e6e
commit
dec04db647
@ -97,6 +97,10 @@ class AppViewItem(var layoutType : LayoutType, private val item : AppItem, priva
|
||||
binding.textTitle.text = item.title
|
||||
binding.textVersion.text = item.version ?: item.loaderResultString(binding.root.context)
|
||||
binding.textAuthor.text = item.author
|
||||
// Make text views selected for marquee to work
|
||||
binding.textTitle.isSelected = true
|
||||
binding.textVersion.isSelected = true
|
||||
binding.textAuthor.isSelected = true
|
||||
|
||||
binding.icon.setImageBitmap(item.icon ?: missingIcon)
|
||||
|
||||
|
@ -35,8 +35,9 @@
|
||||
android:ellipsize="marquee"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="12sp"
|
||||
android:textSize="14sp"
|
||||
tools:text="Title" />
|
||||
|
||||
<TextView
|
||||
@ -48,6 +49,8 @@
|
||||
android:ellipsize="marquee"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textSize="12sp"
|
||||
tools:text="Version" />
|
||||
|
||||
@ -61,6 +64,8 @@
|
||||
android:ellipsize="marquee"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textSize="12sp"
|
||||
tools:text="Subtitle" />
|
||||
tools:text="Author" />
|
||||
</LinearLayout>
|
||||
|
@ -29,15 +29,14 @@
|
||||
android:id="@+id/text_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha="242.25"
|
||||
android:ellipsize="marquee"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:singleLine="true"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintBottom_toTopOf="@id/text_version"
|
||||
@ -49,12 +48,10 @@
|
||||
android:id="@+id/text_version"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha="242.25"
|
||||
android:alpha="0.95"
|
||||
android:ellipsize="marquee"
|
||||
android:fadingEdge="horizontal"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:singleLine="true"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
|
||||
@ -69,19 +66,18 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:alpha="242.25"
|
||||
android:alpha="0.95"
|
||||
android:ellipsize="marquee"
|
||||
android:fadingEdge="horizontal"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:singleLine="true"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/icon"
|
||||
app:layout_constraintEnd_toEndOf="@id/icon"
|
||||
app:layout_constraintStart_toStartOf="@id/icon"
|
||||
tools:text="Subtitle" />
|
||||
tools:text="Author" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
@ -8,24 +8,28 @@
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:padding="16dp">
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="8dp">
|
||||
|
||||
<ImageView
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/icon"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:contentDescription="@string/icon"
|
||||
android:focusable="false"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:shapeAppearanceOverlay="@style/RoundedAppImage"
|
||||
tools:src="@drawable/default_icon" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:ellipsize="end"
|
||||
android:layout_marginStart="12dp"
|
||||
android:ellipsize="marquee"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||
app:layout_constrainedWidth="true"
|
||||
@ -40,14 +44,16 @@
|
||||
android:id="@+id/text_version"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:ellipsize="marquee"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
|
||||
android:textColor="@android:color/tertiary_text_light"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintBottom_toTopOf="@id/text_author"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constraintStart_toEndOf="@id/icon"
|
||||
app:layout_constraintStart_toStartOf="@id/text_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/text_title"
|
||||
tools:text="Version" />
|
||||
|
||||
@ -55,14 +61,16 @@
|
||||
android:id="@+id/text_author"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:ellipsize="marquee"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
|
||||
android:textColor="@android:color/tertiary_text_light"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constraintStart_toEndOf="@id/icon"
|
||||
app:layout_constraintStart_toStartOf="@id/text_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/text_version"
|
||||
tools:text="SubTitle" />
|
||||
tools:text="Author" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@ -3,4 +3,5 @@
|
||||
<dimen name="grid_padding">8dp</dimen>
|
||||
<dimen name="onScreenItemHorizontalMargin">10dp</dimen>
|
||||
<dimen name="card_content_padding">12dp</dimen>
|
||||
<dimen name="corner_radius">8dp</dimen>
|
||||
</resources>
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<style name="RoundedAppImage">
|
||||
<item name="cornerFamily">rounded</item>
|
||||
<item name="cornerSize">6dp</item>
|
||||
<item name="cornerSize">@dimen/corner_radius</item>
|
||||
</style>
|
||||
|
||||
<style name="ChipChoice.Material">
|
||||
|
Loading…
x
Reference in New Issue
Block a user