Skip to content
This repository was archived by the owner on Jul 22, 2021. It is now read-only.

Commit 2d11745

Browse files
Possibly fix crashes on some devices
Signed-off-by: sunilpaulmathew <sunil.kde@gmail.com>
1 parent 4cb94db commit 2d11745

File tree

4 files changed

+10
-12
lines changed

4 files changed

+10
-12
lines changed

app/src/main/java/com/smartpack/scriptmanager/adapters/RecycleViewAdapter.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
package com.smartpack.scriptmanager.adapters;
1010

11+
import android.graphics.Color;
1112
import android.view.LayoutInflater;
1213
import android.view.Menu;
1314
import android.view.SubMenu;
@@ -47,11 +48,12 @@ public RecycleViewAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int vi
4748

4849
@Override
4950
public void onBindViewHolder(@NonNull RecycleViewAdapter.ViewHolder holder, int position) {
51+
holder.scriptTitle.setText(this.data.get(position));
5052
if (Utils.isDarkTheme(holder.scriptIcon.getContext())) {
5153
holder.scriptIcon.setColorFilter(Utils.getThemeAccentColor(holder.scriptIcon.getContext()));
5254
holder.scriptTitle.setTextColor(Utils.getThemeAccentColor(holder.scriptIcon.getContext()));
55+
holder.onBootIcon.setColorFilter(Color.WHITE);
5356
}
54-
holder.scriptTitle.setText(this.data.get(position));
5557
if (Scripts.isMgiskServiceD() && Scripts.scriptOnLateBoot(holder.scriptTitle.getText().toString())
5658
|| Scripts.isMgiskPostFS() && Scripts.scriptOnPostBoot(holder.scriptTitle.getText().toString())) {
5759
holder.onBootIcon.setVisibility(View.VISIBLE);

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
android:layout_height="40dp"
1616
android:layout_margin="5dp"
1717
android:layout_gravity="start|bottom"
18-
android:background="?attr/selectableItemBackgroundBorderless"
18+
android:background="@null"
1919
android:tint="@color/white"
2020
android:src="@drawable/ic_donate" />
2121

@@ -35,7 +35,7 @@
3535
android:layout_height="wrap_content"
3636
android:gravity="center"
3737
android:text="@string/app_name"
38-
android:textColor="?android:attr/colorAccent"
38+
android:textColor="?attr/colorAccent"
3939
android:textStyle="bold"
4040
android:textSize="22sp" />
4141

@@ -44,7 +44,7 @@
4444
android:layout_width="40dp"
4545
android:layout_height="wrap_content"
4646
android:layout_gravity="end"
47-
android:background="?attr/selectableItemBackgroundBorderless"
47+
android:background="@null"
4848
android:tint="@color/white"
4949
android:src="@drawable/ic_settings" />
5050
</FrameLayout>
@@ -67,7 +67,7 @@
6767
android:layout_height="40dp"
6868
android:layout_margin="5dp"
6969
android:layout_gravity="end|bottom"
70-
android:background="?attr/selectableItemBackgroundBorderless"
70+
android:background="@null"
7171
android:tint="@color/white"
7272
android:src="@drawable/ic_info" />
7373
</FrameLayout>

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
2+
<com.google.android.material.card.MaterialCardView
33
android:layout_width="match_parent"
44
android:layout_height="wrap_content"
5+
xmlns:android="http://schemas.android.com/apk/res/android"
56
xmlns:app="http://schemas.android.com/apk/res-auto"
6-
app:cardBackgroundColor="?android:attr/colorBackground"
77
android:gravity="start|center_vertical"
88
android:orientation="horizontal"
99
android:layout_margin="10dp"
@@ -22,7 +22,6 @@
2222
android:background="@null"
2323
android:layout_gravity="start|center_vertical"
2424
android:src="@drawable/ic_file"
25-
android:tint="?android:attr/textColorPrimary"
2625
android:layout_marginEnd="10dp" />
2726

2827
<com.google.android.material.textview.MaterialTextView
@@ -33,8 +32,7 @@
3332
android:layout_marginEnd="40dp"
3433
android:focusable="false"
3534
android:textSize="20sp"
36-
android:textStyle="bold"
37-
android:textColor="?android:attr/textColorPrimary" />
35+
android:textStyle="bold" />
3836

3937
<androidx.appcompat.widget.AppCompatImageButton
4038
android:id="@+id/onboot_icon"
@@ -45,7 +43,6 @@
4543
android:visibility="gone"
4644
android:layout_gravity="end|center_vertical"
4745
android:src="@drawable/ic_flash"
48-
android:tint="?android:attr/textColorPrimary"
4946
android:layout_marginStart="10dp" />
5047
</FrameLayout>
5148
</com.google.android.material.card.MaterialCardView>

app/src/main/res/values/styles.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@
44
<item name="android:textAlignment">gravity</item>
55
<item name="android:textDirection">locale</item>
66
<item name="android:statusBarColor">@color/black</item>
7-
<item name="colorPrimary">?android:attr/textColorPrimary</item>
87
</style>
98
</resources>

0 commit comments

Comments
 (0)