mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-26 16:27:38 +00:00
Remove core only card
This commit is contained in:
parent
4df1047b07
commit
3e9174deed
@ -19,6 +19,7 @@ public class UpdateCardHolder {
|
|||||||
@BindView(R.id.status) public TextView status;
|
@BindView(R.id.status) public TextView status;
|
||||||
@BindView(R.id.current_version) public TextView currentVersion;
|
@BindView(R.id.current_version) public TextView currentVersion;
|
||||||
@BindView(R.id.latest_version) public TextView latestVersion;
|
@BindView(R.id.latest_version) public TextView latestVersion;
|
||||||
|
@BindView(R.id.additional) public TextView additional;
|
||||||
@BindView(R.id.install) public Button install;
|
@BindView(R.id.install) public Button install;
|
||||||
|
|
||||||
public View itemView;
|
public View itemView;
|
||||||
|
@ -57,8 +57,6 @@ public class MagiskFragment extends BaseFragment
|
|||||||
@BindView(R.id.swipeRefreshLayout) SwipeRefreshLayout mSwipeRefreshLayout;
|
@BindView(R.id.swipeRefreshLayout) SwipeRefreshLayout mSwipeRefreshLayout;
|
||||||
@BindView(R.id.linearLayout) LinearLayout root;
|
@BindView(R.id.linearLayout) LinearLayout root;
|
||||||
|
|
||||||
@BindView(R.id.core_only_notice) CardView coreOnlyNotice;
|
|
||||||
|
|
||||||
@BindView(R.id.safetyNet_card) CardView safetyNetCard;
|
@BindView(R.id.safetyNet_card) CardView safetyNetCard;
|
||||||
@BindView(R.id.safetyNet_refresh) ImageView safetyNetRefreshIcon;
|
@BindView(R.id.safetyNet_refresh) ImageView safetyNetRefreshIcon;
|
||||||
@BindView(R.id.safetyNet_status) TextView safetyNetStatusText;
|
@BindView(R.id.safetyNet_status) TextView safetyNetStatusText;
|
||||||
@ -138,8 +136,6 @@ public class MagiskFragment extends BaseFragment
|
|||||||
|
|
||||||
magisk = new UpdateCardHolder(inflater, root);
|
magisk = new UpdateCardHolder(inflater, root);
|
||||||
manager = new UpdateCardHolder(inflater, root);
|
manager = new UpdateCardHolder(inflater, root);
|
||||||
magisk.install.setOnClickListener(this::magiskInstall);
|
|
||||||
manager.install.setOnClickListener(this::managerInstall);
|
|
||||||
root.addView(magisk.itemView, 0);
|
root.addView(magisk.itemView, 0);
|
||||||
root.addView(manager.itemView, 1);
|
root.addView(manager.itemView, 1);
|
||||||
|
|
||||||
@ -150,7 +146,17 @@ public class MagiskFragment extends BaseFragment
|
|||||||
|
|
||||||
mSwipeRefreshLayout.setOnRefreshListener(this);
|
mSwipeRefreshLayout.setOnRefreshListener(this);
|
||||||
|
|
||||||
coreOnlyNotice.setVisibility(Config.get(Config.Key.COREONLY) ? View.VISIBLE : View.GONE);
|
magisk.install.setOnClickListener(this::magiskInstall);
|
||||||
|
manager.install.setOnClickListener(this::managerInstall);
|
||||||
|
if (Config.get(Config.Key.COREONLY)) {
|
||||||
|
magisk.additional.setText(R.string.core_only_enabled);
|
||||||
|
magisk.additional.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
if (!app.getPackageName().equals(BuildConfig.APPLICATION_ID)) {
|
||||||
|
manager.additional.setText("(" + app.getPackageName() + ")");
|
||||||
|
manager.additional.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
safetyNetCard.setVisibility(hasGms() && Networking.checkNetworkStatus(app) ?
|
safetyNetCard.setVisibility(hasGms() && Networking.checkNetworkStatus(app) ?
|
||||||
View.VISIBLE : View.GONE);
|
View.VISIBLE : View.GONE);
|
||||||
|
|
||||||
|
@ -19,45 +19,6 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
|
||||||
android:id="@+id/core_only_notice"
|
|
||||||
style="?attr/cardStyle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="5dp"
|
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:layout_marginEnd="5dp"
|
|
||||||
android:layout_marginBottom="4dp"
|
|
||||||
app:cardCornerRadius="@dimen/card_corner_radius"
|
|
||||||
app:cardElevation="@dimen/card_elevation">
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginTop="12dp"
|
|
||||||
android:layout_marginBottom="12dp">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="25dp"
|
|
||||||
android:layout_height="25dp"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_toStartOf="@+id/core_only"
|
|
||||||
app:srcCompat="@drawable/ic_warning" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/core_only"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:gravity="center"
|
|
||||||
android:minWidth="225dp"
|
|
||||||
android:padding="6dp"
|
|
||||||
android:text="@string/settings_core_only_title"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
</RelativeLayout>
|
|
||||||
</androidx.cardview.widget.CardView>
|
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
android:id="@+id/safetyNet_card"
|
android:id="@+id/safetyNet_card"
|
||||||
style="?attr/cardStyle"
|
style="?attr/cardStyle"
|
||||||
|
@ -77,11 +77,22 @@
|
|||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:autoSizeMinTextSize="1sp"
|
app:autoSizeMinTextSize="1sp"
|
||||||
app:autoSizeTextType="uniform"
|
app:autoSizeTextType="uniform"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="@+id/status"
|
app:layout_constraintEnd_toEndOf="@+id/status"
|
||||||
app:layout_constraintStart_toStartOf="@+id/status"
|
app:layout_constraintStart_toStartOf="@+id/status"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/current_version" />
|
app:layout_constraintTop_toBottomOf="@+id/current_version" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/additional"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:autoSizeMinTextSize="1sp"
|
||||||
|
app:autoSizeTextType="uniform"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/status"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/status"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/latest_version" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/install"
|
android:id="@+id/install"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
<string name="uninstall_magisk_title">Uninstall Magisk</string>
|
<string name="uninstall_magisk_title">Uninstall Magisk</string>
|
||||||
<string name="uninstall_magisk_msg">All modules will be disabled/removed. Root will be removed, and your data potentially encrypted if not already.</string>
|
<string name="uninstall_magisk_msg">All modules will be disabled/removed. Root will be removed, and your data potentially encrypted if not already.</string>
|
||||||
<string name="update">Update</string>
|
<string name="update">Update</string>
|
||||||
|
<string name="core_only_enabled">(Core only mode enabled)</string>
|
||||||
|
|
||||||
<!--Module Fragment-->
|
<!--Module Fragment-->
|
||||||
<string name="no_info_provided">(No info provided)</string>
|
<string name="no_info_provided">(No info provided)</string>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user