You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Refactor, cleanup, backstack works
This commit is contained in:
@@ -6,9 +6,9 @@
|
||||
|
||||
<ListView android:id="@android:id/list"
|
||||
android:divider="@android:color/transparent"
|
||||
android:dividerHeight="5.0sp"
|
||||
android:dividerHeight="@dimen/card_divider_space"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="15dp"/>
|
||||
android:layout_margin="6dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
+11
-11
@@ -2,29 +2,29 @@
|
||||
|
||||
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||
style="@style/Base.CardView"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginBottom="3dip"
|
||||
android:layout_marginLeft="8dip"
|
||||
android:layout_marginRight="8dip"
|
||||
android:layout_marginTop="3dip"
|
||||
android:layout_marginBottom="@dimen/card_vertical_margin"
|
||||
android:layout_marginStart="@dimen/card_horizontal_margin"
|
||||
android:layout_marginEnd="@dimen/card_horizontal_margin"
|
||||
android:layout_marginTop="@dimen/card_vertical_margin"
|
||||
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
card_view:cardCornerRadius="2dp"
|
||||
card_view:cardElevation="2dp">
|
||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
||||
card_view:cardCornerRadius="@dimen/card_corner_radius"
|
||||
card_view:cardElevation="@dimen/card_elevation">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:padding="10dp">
|
||||
android:padding="@dimen/card_layout_padding">
|
||||
|
||||
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/app_icon"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_width="@dimen/card_appicon_size"
|
||||
android:layout_height="@dimen/card_appicon_size"
|
||||
android:layout_centerVertical="true"
|
||||
|
||||
android:scaleType="centerCrop"/>
|
||||
@@ -34,7 +34,7 @@
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingEnd="50dp"
|
||||
android:paddingEnd="@dimen/card_appicon_size"
|
||||
android:paddingStart="65dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:layout_alignBottom="@+id/app_icon"
|
||||
@@ -5,24 +5,25 @@
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginBottom="3dip"
|
||||
android:layout_marginLeft="8dip"
|
||||
android:layout_marginRight="8dip"
|
||||
android:layout_marginTop="3dip"
|
||||
android:layout_marginBottom="@dimen/card_vertical_margin"
|
||||
android:layout_marginStart="@dimen/card_horizontal_margin"
|
||||
android:layout_marginEnd="@dimen/card_horizontal_margin"
|
||||
android:layout_marginTop="@dimen/card_vertical_margin"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
||||
card_view:cardCornerRadius="2dp"
|
||||
card_view:cardElevation="2dp">
|
||||
card_view:cardCornerRadius="@dimen/card_corner_radius"
|
||||
card_view:cardElevation="@dimen/card_elevation">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp"
|
||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
||||
android:padding="@dimen/card_layout_padding"
|
||||
android:layout_gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="300dip"
|
||||
android:layout_width="@dimen/card_textview_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true"
|
||||
@@ -56,7 +57,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:focusable="false"
|
||||
android:gravity="center"
|
||||
android:padding="3dp"
|
||||
android:padding="@dimen/checkbox_padding"
|
||||
android:src="@drawable/ic_menu_overflow_material"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
@@ -67,7 +68,7 @@
|
||||
android:layout_marginBottom="0dp"
|
||||
android:focusable="false"
|
||||
android:gravity="center"
|
||||
android:padding="3dp"
|
||||
android:padding="@dimen/checkbox_padding"
|
||||
android:src="@drawable/ic_delete"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
@@ -87,7 +88,7 @@
|
||||
<!--/>-->
|
||||
<TextView
|
||||
android:id="@+id/description"
|
||||
android:layout_width="300dip"
|
||||
android:layout_width="@dimen/card_textview_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_below="@id/version_name"
|
||||
@@ -112,7 +113,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_below="@id/description"
|
||||
android:minHeight="100dp"
|
||||
android:minHeight="@dimen/min_rowheight"
|
||||
android:orientation="vertical"
|
||||
|
||||
>
|
||||
@@ -147,8 +148,8 @@
|
||||
android:id="@+id/changeLog"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="@dimen/card_imageview_margin"
|
||||
android:layout_marginStart="@dimen/card_imageview_margin"
|
||||
android:backgroundTint="@color/icon_grey"
|
||||
android:background="@drawable/ic_changelog" />
|
||||
|
||||
@@ -156,8 +157,8 @@
|
||||
android:id="@+id/authorLink"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="@dimen/card_imageview_margin"
|
||||
android:layout_marginStart="@dimen/card_imageview_margin"
|
||||
android:backgroundTint="@color/icon_grey"
|
||||
android:background="@drawable/ic_author" />
|
||||
|
||||
@@ -165,8 +166,8 @@
|
||||
android:id="@+id/supportLink"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="@dimen/card_imageview_margin"
|
||||
android:layout_marginStart="@dimen/card_imageview_margin"
|
||||
android:backgroundTint="@color/icon_grey"
|
||||
android:background="@drawable/ic_support" />
|
||||
|
||||
|
||||
@@ -5,18 +5,21 @@
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="8dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
||||
card_view:cardCornerRadius="2dp"
|
||||
card_view:cardElevation="2dp">
|
||||
android:layout_marginBottom="@dimen/card_vertical_margin"
|
||||
android:layout_marginStart="@dimen/card_horizontal_margin"
|
||||
android:layout_marginEnd="@dimen/card_horizontal_margin"
|
||||
android:layout_marginTop="@dimen/card_vertical_margin"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
||||
card_view:cardCornerRadius="@dimen/card_corner_radius"
|
||||
card_view:cardElevation="@dimen/card_elevation">
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
||||
android:padding="10dp">
|
||||
android:padding="@dimen/card_layout_padding">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -26,7 +29,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="300dip"
|
||||
android:layout_width="@dimen/card_textview_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="false"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
@@ -119,24 +122,24 @@
|
||||
android:id="@+id/changeLog"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginEnd="@dimen/card_imageview_margin"
|
||||
android:layout_marginStart="@dimen/card_imageview_margin"
|
||||
android:backgroundTint="@color/icon_grey"
|
||||
android:background="@drawable/ic_changelog"/>
|
||||
<ImageView
|
||||
android:id="@+id/authorLink"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginEnd="@dimen/card_imageview_margin"
|
||||
android:layout_marginStart="@dimen/card_imageview_margin"
|
||||
android:backgroundTint="@color/icon_grey"
|
||||
android:background="@drawable/ic_author"/>
|
||||
<ImageView
|
||||
android:id="@+id/supportLink"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginEnd="@dimen/card_imageview_margin"
|
||||
android:layout_marginStart="@dimen/card_imageview_margin"
|
||||
android:backgroundTint="@color/icon_grey"
|
||||
android:background="@drawable/ic_support"/>
|
||||
|
||||
@@ -156,8 +159,8 @@
|
||||
android:focusable="false"
|
||||
android:visibility="gone"
|
||||
android:gravity="end"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginEnd="@dimen/card_imageview_margin"
|
||||
android:layout_marginStart="@dimen/card_imageview_margin"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v4.widget.SwipeRefreshLayout
|
||||
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/swipeRefreshLayout"
|
||||
@@ -8,24 +9,50 @@
|
||||
android:layout_marginTop="?attr/actionBarSize"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false"
|
||||
android:paddingBottom="60dip"
|
||||
app:layoutManager="android.support.v7.widget.LinearLayoutManager"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/empty_rv"
|
||||
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/llayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:fontFamily="sans-serif-light"
|
||||
android:gravity="center"
|
||||
android:text="@string/no_modules_found"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="italic"
|
||||
android:visibility="gone"/>
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="?attr/actionBarSize"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false"
|
||||
android:dividerHeight="@dimen/card_divider_space"
|
||||
android:paddingBottom="60dip"
|
||||
app:layoutManager="android.support.v7.widget.LinearLayoutManager" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/empty_rv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:fontFamily="sans-serif-light"
|
||||
android:gravity="center"
|
||||
android:text="@string/no_modules_found"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="italic"
|
||||
android:visibility="gone" />
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_margin="16dp"
|
||||
android:baselineAlignBottom="false"
|
||||
android:clickable="true"
|
||||
android:src="@drawable/ic_add"
|
||||
app:layout_anchorGravity="bottom|center_horizontal"
|
||||
app:layout_anchor="@+id/empty_rv"
|
||||
android:layout_gravity="top|center_horizontal" />
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
|
||||
|
||||
|
||||
</android.support.v4.widget.SwipeRefreshLayout>
|
||||
@@ -11,6 +11,7 @@
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:dividerHeight="@dimen/card_divider_space"
|
||||
app:layoutManager="android.support.v7.widget.LinearLayoutManager"/>
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<item
|
||||
android:id="@+id/autoroot"
|
||||
android:icon="@drawable/ic_autoroot"
|
||||
android:title="@string/auto_root"/>
|
||||
android:title="@string/auto_toggle"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/modules"
|
||||
|
||||
@@ -3,4 +3,14 @@
|
||||
<dimen name="floating_height">650dp</dimen>
|
||||
<dimen name="floating_width">500dp</dimen>
|
||||
<dimen name="min_rowheight">100dp</dimen>
|
||||
<dimen name="card_divider_space">5sp</dimen>
|
||||
<dimen name="card_horizontal_margin">8dip</dimen>
|
||||
<dimen name="card_vertical_margin">3dip</dimen>
|
||||
<dimen name="card_corner_radius">2dp</dimen>
|
||||
<dimen name="card_elevation">2dp</dimen>
|
||||
<dimen name="card_layout_padding">10dp</dimen>
|
||||
<dimen name="card_textview_width">300dip</dimen>
|
||||
<dimen name="checkbox_padding">3dp</dimen>
|
||||
<dimen name="card_imageview_margin">10dp</dimen>
|
||||
<dimen name="card_appicon_size">50dp</dimen>
|
||||
</resources>
|
||||
@@ -121,4 +121,7 @@
|
||||
<string name="settings_development_category">Development</string>
|
||||
<string name="settings_hide_root_notification_summary">When checked, auto-root notifications will not be displayed.</string>
|
||||
<string name="settings_hide_root_notification_title">Hide auto-root notifications</string>
|
||||
|
||||
<!--General Use -->
|
||||
<string name="auto_toggle">Auto-toggle</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user