Skip to content

Commit 270441a

Browse files
committed
Fix Crash
1 parent 93adc80 commit 270441a

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

app/src/main/java/de/dertyp7214/rboardpatcher/screens/LoadThemeActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import java.io.File
2525

2626
class LoadThemeActivity : AppCompatActivity() {
2727

28-
private val recyclerView by lazy { findViewById<RecyclerView>(R.id.recyclerview) }
28+
private val recyclerView by lazy { findViewById<RecyclerView>(R.id.recyclerview2) }
2929
private val themes = arrayListOf<ThemeDataClass>()
3030
private val adapter by lazy {
3131
ThemeAdapter(this, themes, this::openPatchActivity)

app/src/main/java/de/dertyp7214/rboardpatcher/screens/MainActivity.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import android.graphics.Color
55
import android.os.Build
66
import android.os.Bundle
77
import android.view.View
8+
import android.view.ViewGroup
89
import androidx.activity.SystemBarStyle
910
import androidx.activity.enableEdgeToEdge
1011
import androidx.core.content.FileProvider
@@ -56,7 +57,7 @@ class MainActivity : BaseActivity() {
5657
}
5758
}
5859
private val adapter by lazy { MainOptionAdapter(this, list) }
59-
private val recyclerView by lazy { findViewById<RecyclerView>(R.id.recyclerview) }
60+
private val recyclerView by lazy { findViewById<RecyclerView>(R.id.recyclerview2) }
6061

6162
private val sourceCode by lazy { findViewById<View>(R.id.sourceCode) }
6263
private val patchesRepo by lazy { findViewById<View>(R.id.patchesRepo) }
@@ -80,7 +81,6 @@ class MainActivity : BaseActivity() {
8081
}
8182
super.onCreate(savedInstanceState)
8283
setContentView(R.layout.activity_main)
83-
8484
storage.filePickerCallback = object : FilePickerCallback {
8585
override fun onStoragePermissionDenied(requestCode: Int, files: List<DocumentFile>?) {}
8686
override fun onCanceledByUser(requestCode: Int) {}
@@ -118,6 +118,7 @@ class MainActivity : BaseActivity() {
118118
recyclerView.layoutManager = LinearLayoutManager(this)
119119
recyclerView.setHasFixedSize(true)
120120
recyclerView.adapter = adapter
121+
recyclerView.setFocusable(false);
121122

122123
sourceCode.setOnClickListener { openUrl(getString(R.string.sourceCodeUrl)) }
123124
patchesRepo.setOnClickListener { openUrl(getString(R.string.patchesRepoUrl)) }

app/src/main/res/layout/activity_load_theme.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
android:fitsSystemWindows="true">
99

1010
<androidx.recyclerview.widget.RecyclerView
11-
android:id="@+id/recyclerview"
11+
android:id="@+id/recyclerview2"
1212
android:layout_width="0dp"
1313
android:layout_height="0dp"
1414
app:layout_constraintBottom_toBottomOf="parent"

app/src/main/res/layout/activity_main.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@
165165
android:id="@+id/cardView2"
166166
android:layout_width="0dp"
167167
android:layout_height="wrap_content"
168-
android:layout_marginStart="32dp"
168+
android:layout_marginStart="16dp"
169169
android:layout_marginEnd="16dp"
170170
android:layout_marginBottom="32dp"
171171
android:translationZ="0dp"

app/src/main/res/layout/activity_patch.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
app:layout_constraintTop_toBottomOf="@id/searchBar" />
2525

2626
<androidx.recyclerview.widget.RecyclerView
27-
android:id="@+id/recyclerview"
27+
android:id="@+id/recyclerview2"
2828
android:layout_width="0dp"
2929
android:layout_height="0dp"
3030
app:layout_constraintBottom_toTopOf="@+id/divider"

0 commit comments

Comments
 (0)