Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Reenable dpad axes option #262

Merged
merged 3 commits into from
Sep 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update Header Setting to allow for a description under tht title
DavidRGriswold committed Sep 23, 2024
commit 6335cb61555f948ee34aa5ee2aaf40661f67fd4f
Original file line number Diff line number Diff line change
@@ -4,6 +4,6 @@

package org.citra.citra_emu.features.settings.model.view

class HeaderSetting(titleId: Int) : SettingsItem(null, titleId, 0) {
class HeaderSetting(titleId: Int,descId: Int = 0) : SettingsItem(null, titleId, descId) {
override val type = TYPE_HEADER
}
Original file line number Diff line number Diff line change
@@ -18,6 +18,12 @@ class HeaderViewHolder(val binding: ListItemSettingsHeaderBinding, adapter: Sett

override fun bind(item: SettingsItem) {
binding.textHeaderName.setText(item.nameId)
if (item.descriptionId != 0) {
binding.textHeaderDescription.visibility = View.VISIBLE
binding.textHeaderDescription.setText(item.descriptionId)
}else {
binding.textHeaderDescription.visibility = View.GONE
}
}

override fun onClick(clicked: View) {
27 changes: 22 additions & 5 deletions src/android/app/src/main/res/layout/list_item_settings_header.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.textview.MaterialTextView xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout
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:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:focusable="false"
android:clickable="false"
android:paddingVertical="16dp"
>

<com.google.android.material.textview.MaterialTextView

android:id="@+id/text_header_name"
style="@style/TextAppearance.Material3.TitleSmall"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
android:paddingHorizontal="@dimen/spacing_large"
android:paddingVertical="16dp"
android:focusable="false"
android:clickable="false"
android:textAlignment="viewStart"
android:textColor="?attr/colorPrimary"
android:textStyle="bold"
tools:text="CPU Settings" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/text_header_description"
style="@style/TextAppearance.Material3.BodySmall"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/spacing_small"
android:textAlignment="viewStart"
tools:text="@string/app_disclaimer" />
</LinearLayout>