mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-29 14:15:29 +03:00
Refactor subtitle as author to remove subtitle
Subtitle is no longer used, so instances have been rerouted to author. DataItem was also updated to reflect the removal of a subtitle.
This commit is contained in:
parent
04cae942ea
commit
1013857fc4
@ -77,7 +77,7 @@ class AppDialog : BottomSheetDialogFragment() {
|
||||
binding.gameIcon.setImageBitmap(item.icon ?: missingIcon)
|
||||
binding.gameTitle.text = item.title
|
||||
binding.gameVersion.text = item.version ?: item.loaderResultString(requireContext())
|
||||
binding.gameSubtitle.text = item.subTitle ?: item.loaderResultString(requireContext())
|
||||
binding.gameAuthor.text = item.author ?: item.loaderResultString(requireContext())
|
||||
|
||||
binding.gamePlay.isEnabled = item.loaderResult == LoaderResult.Success
|
||||
binding.gamePlay.setOnClickListener {
|
||||
|
@ -46,7 +46,7 @@ interface LayoutBinding<V : ViewBinding> : ViewBinding {
|
||||
|
||||
val textVersion : TextView
|
||||
|
||||
val textSubtitle : TextView
|
||||
val textAuthor : TextView
|
||||
|
||||
val icon : ImageView
|
||||
}
|
||||
@ -58,7 +58,7 @@ class ListBinding(parent : ViewGroup) : LayoutBinding<AppItemLinearBinding> {
|
||||
|
||||
override val textVersion = binding.textVersion
|
||||
|
||||
override val textSubtitle = binding.textSubtitle
|
||||
override val textAuthor = binding.textAuthor
|
||||
|
||||
override val icon = binding.icon
|
||||
}
|
||||
@ -70,7 +70,7 @@ class GridBinding(parent : ViewGroup) : LayoutBinding<AppItemGridBinding> {
|
||||
|
||||
override val textVersion = binding.textVersion
|
||||
|
||||
override val textSubtitle = binding.textSubtitle
|
||||
override val textAuthor = binding.textAuthor
|
||||
|
||||
override val icon = binding.icon
|
||||
}
|
||||
@ -82,7 +82,7 @@ class GridCompatBinding(parent : ViewGroup) : LayoutBinding<AppItemGridCompactBi
|
||||
|
||||
override val textVersion = binding.textVersion
|
||||
|
||||
override val textSubtitle = binding.textSubtitle
|
||||
override val textAuthor = binding.textAuthor
|
||||
|
||||
override val icon = binding.icon
|
||||
}
|
||||
@ -96,7 +96,7 @@ class AppViewItem(var layoutType : LayoutType, private val item : AppItem, priva
|
||||
val binding = holder.binding
|
||||
binding.textTitle.text = item.title
|
||||
binding.textVersion.text = item.version ?: item.loaderResultString(binding.root.context)
|
||||
binding.textSubtitle.text = item.subTitle ?: item.loaderResultString(binding.root.context)
|
||||
binding.textAuthor.text = item.author ?: item.loaderResultString(binding.root.context)
|
||||
|
||||
binding.icon.setImageBitmap(item.icon ?: missingIcon)
|
||||
|
||||
|
@ -24,8 +24,8 @@ class ControllerCheckBoxViewItem(var title : String, var summary : String, var c
|
||||
val binding = holder.binding
|
||||
binding.textTitle.isGone = title.isEmpty()
|
||||
binding.textTitle.text = title
|
||||
binding.textSubtitle.isGone = summary.isEmpty()
|
||||
binding.textSubtitle.text = summary
|
||||
binding.textAuthor.isGone = summary.isEmpty()
|
||||
binding.textAuthor.text = summary
|
||||
binding.checkbox.isChecked = checked
|
||||
binding.root.setOnClickListener {
|
||||
checked = !checked
|
||||
|
@ -29,7 +29,7 @@ open class ControllerViewItem(var content : String = "", var subContent : String
|
||||
isGone = content.isEmpty()
|
||||
text = content
|
||||
}
|
||||
binding.textSubtitle.apply {
|
||||
binding.textAuthor.apply {
|
||||
isGone = subContent.isEmpty()
|
||||
text = subContent
|
||||
}
|
||||
|
@ -35,9 +35,9 @@ data class AppItem(private val meta : AppEntry) : DataItem() {
|
||||
val version get() = meta.version
|
||||
|
||||
/**
|
||||
* The string used as the sub-title, we currently use the author
|
||||
* The application author
|
||||
*/
|
||||
val subTitle get() = meta.author
|
||||
val author get() = meta.author
|
||||
|
||||
/**
|
||||
* The URI of the application's image file
|
||||
|
@ -46,7 +46,7 @@
|
||||
tools:text="Version" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/game_subtitle"
|
||||
android:id="@+id/game_author"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
|
||||
@ -64,7 +64,7 @@
|
||||
android:layout_marginTop="28dp"
|
||||
app:flexWrap="wrap"
|
||||
app:layout_constraintStart_toStartOf="@id/game_title"
|
||||
app:layout_constraintTop_toBottomOf="@id/game_subtitle">
|
||||
app:layout_constraintTop_toBottomOf="@id/game_author">
|
||||
|
||||
<Button
|
||||
android:id="@+id/game_play"
|
||||
|
@ -52,7 +52,7 @@
|
||||
tools:text="Version" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_subtitle"
|
||||
android:id="@+id/text_author"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
|
@ -59,13 +59,13 @@
|
||||
android:textAlignment="viewStart"
|
||||
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
|
||||
android:textColor="@android:color/white"
|
||||
app:layout_constraintBottom_toTopOf="@id/text_subtitle"
|
||||
app:layout_constraintBottom_toTopOf="@id/text_author"
|
||||
app:layout_constraintEnd_toEndOf="@id/icon"
|
||||
app:layout_constraintStart_toStartOf="@id/icon"
|
||||
tools:text="Version" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_subtitle"
|
||||
android:id="@+id/text_author"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
|
@ -44,7 +44,7 @@
|
||||
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
|
||||
android:textColor="@android:color/tertiary_text_light"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintBottom_toTopOf="@id/text_subtitle"
|
||||
app:layout_constraintBottom_toTopOf="@id/text_author"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constraintStart_toEndOf="@id/icon"
|
||||
@ -52,7 +52,7 @@
|
||||
tools:text="Version" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_subtitle"
|
||||
android:id="@+id/text_author"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
|
@ -30,7 +30,7 @@
|
||||
tools:text="Title" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_subtitle"
|
||||
android:id="@+id/text_author"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="10"
|
||||
|
@ -27,7 +27,7 @@
|
||||
tools:text="@string/config_controller" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_subtitle"
|
||||
android:id="@+id/text_author"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="10"
|
||||
|
Loading…
Reference in New Issue
Block a user