mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-28 04:25:27 +00:00
Added redesign base
... also basic switching to redesign was added, haha
This commit is contained in:
parent
cc8f1adca3
commit
14e49f3c80
@ -22,6 +22,10 @@
|
|||||||
android:name="a.b"
|
android:name="a.b"
|
||||||
android:configChanges="orientation|screenSize"
|
android:configChanges="orientation|screenSize"
|
||||||
android:exported="true" />
|
android:exported="true" />
|
||||||
|
<activity
|
||||||
|
android:name="a.i"
|
||||||
|
android:exported="true"
|
||||||
|
android:theme="@style/Foundation.Default" />
|
||||||
<activity
|
<activity
|
||||||
android:name="a.c"
|
android:name="a.c"
|
||||||
android:configChanges="orientation|screenSize"
|
android:configChanges="orientation|screenSize"
|
||||||
|
7
app/src/main/java/a/i.java
Normal file
7
app/src/main/java/a/i.java
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
package a;
|
||||||
|
|
||||||
|
import com.topjohnwu.magisk.redesign.MainActivity;
|
||||||
|
|
||||||
|
public class i extends MainActivity {
|
||||||
|
/* stub */
|
||||||
|
}
|
@ -7,6 +7,7 @@ import com.topjohnwu.magisk.ui.MainActivity
|
|||||||
import com.topjohnwu.magisk.ui.SplashActivity
|
import com.topjohnwu.magisk.ui.SplashActivity
|
||||||
import com.topjohnwu.magisk.ui.flash.FlashActivity
|
import com.topjohnwu.magisk.ui.flash.FlashActivity
|
||||||
import com.topjohnwu.magisk.ui.surequest.SuRequestActivity
|
import com.topjohnwu.magisk.ui.surequest.SuRequestActivity
|
||||||
|
import com.topjohnwu.magisk.redesign.MainActivity as RedesignActivity
|
||||||
|
|
||||||
object ClassMap {
|
object ClassMap {
|
||||||
private val map = mapOf(
|
private val map = mapOf(
|
||||||
@ -17,7 +18,9 @@ object ClassMap {
|
|||||||
UpdateCheckService::class.java to a.g::class.java,
|
UpdateCheckService::class.java to a.g::class.java,
|
||||||
GeneralReceiver::class.java to a.h::class.java,
|
GeneralReceiver::class.java to a.h::class.java,
|
||||||
DownloadService::class.java to a.j::class.java,
|
DownloadService::class.java to a.j::class.java,
|
||||||
SuRequestActivity::class.java to a.m::class.java
|
SuRequestActivity::class.java to a.m::class.java,
|
||||||
|
//redesign
|
||||||
|
RedesignActivity::class.java to a.i::class.java
|
||||||
)
|
)
|
||||||
|
|
||||||
operator fun <T : Class<*>>get(c: Class<*>): T {
|
operator fun <T : Class<*>>get(c: Class<*>): T {
|
||||||
|
@ -48,6 +48,7 @@ object Config : PreferenceModel, DBConfig {
|
|||||||
const val REPO_ORDER = "repo_order"
|
const val REPO_ORDER = "repo_order"
|
||||||
const val SHOW_SYSTEM_APP = "show_system"
|
const val SHOW_SYSTEM_APP = "show_system"
|
||||||
const val DOWNLOAD_PATH = "download_path"
|
const val DOWNLOAD_PATH = "download_path"
|
||||||
|
const val REDESIGN = "redesign"
|
||||||
|
|
||||||
// system state
|
// system state
|
||||||
const val MAGISKHIDE = "magiskhide"
|
const val MAGISKHIDE = "magiskhide"
|
||||||
@ -108,6 +109,7 @@ object Config : PreferenceModel, DBConfig {
|
|||||||
var suNotification by preferenceStrInt(Key.SU_NOTIFICATION, Value.NOTIFICATION_TOAST)
|
var suNotification by preferenceStrInt(Key.SU_NOTIFICATION, Value.NOTIFICATION_TOAST)
|
||||||
var updateChannel by preferenceStrInt(Key.UPDATE_CHANNEL, defaultChannel)
|
var updateChannel by preferenceStrInt(Key.UPDATE_CHANNEL, defaultChannel)
|
||||||
|
|
||||||
|
var redesign by preference(Key.REDESIGN, false)
|
||||||
var darkTheme by preference(Key.DARK_THEME, true)
|
var darkTheme by preference(Key.DARK_THEME, true)
|
||||||
var suReAuth by preference(Key.SU_REAUTH, false)
|
var suReAuth by preference(Key.SU_REAUTH, false)
|
||||||
var checkUpdate by preference(Key.CHECK_UPDATES, true)
|
var checkUpdate by preference(Key.CHECK_UPDATES, true)
|
||||||
|
@ -11,6 +11,7 @@ import com.topjohnwu.magisk.ui.superuser.SuperuserViewModel
|
|||||||
import com.topjohnwu.magisk.ui.surequest.SuRequestViewModel
|
import com.topjohnwu.magisk.ui.surequest.SuRequestViewModel
|
||||||
import org.koin.androidx.viewmodel.dsl.viewModel
|
import org.koin.androidx.viewmodel.dsl.viewModel
|
||||||
import org.koin.dsl.module
|
import org.koin.dsl.module
|
||||||
|
import com.topjohnwu.magisk.redesign.MainViewModel as RedesignViewModel
|
||||||
|
|
||||||
|
|
||||||
val viewModelModules = module {
|
val viewModelModules = module {
|
||||||
@ -24,4 +25,8 @@ val viewModelModules = module {
|
|||||||
FlashViewModel(action, file, additional, get())
|
FlashViewModel(action, file, additional, get())
|
||||||
}
|
}
|
||||||
viewModel { SuRequestViewModel(get(), get(), get(SUTimeout), get()) }
|
viewModel { SuRequestViewModel(get(), get(), get(SUTimeout), get()) }
|
||||||
|
|
||||||
|
// redesign
|
||||||
|
|
||||||
|
viewModel { RedesignViewModel() }
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
package com.topjohnwu.magisk.model.navigation
|
package com.topjohnwu.magisk.model.navigation
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.content.Intent
|
||||||
|
import com.topjohnwu.magisk.ClassMap
|
||||||
|
import com.topjohnwu.magisk.Config
|
||||||
|
import com.topjohnwu.magisk.Const
|
||||||
|
import com.topjohnwu.magisk.ui.MainActivity
|
||||||
import com.topjohnwu.magisk.ui.hide.MagiskHideFragment
|
import com.topjohnwu.magisk.ui.hide.MagiskHideFragment
|
||||||
import com.topjohnwu.magisk.ui.home.HomeFragment
|
import com.topjohnwu.magisk.ui.home.HomeFragment
|
||||||
import com.topjohnwu.magisk.ui.log.LogFragment
|
import com.topjohnwu.magisk.ui.log.LogFragment
|
||||||
@ -7,7 +13,7 @@ import com.topjohnwu.magisk.ui.module.ModulesFragment
|
|||||||
import com.topjohnwu.magisk.ui.module.ReposFragment
|
import com.topjohnwu.magisk.ui.module.ReposFragment
|
||||||
import com.topjohnwu.magisk.ui.settings.SettingsFragment
|
import com.topjohnwu.magisk.ui.settings.SettingsFragment
|
||||||
import com.topjohnwu.magisk.ui.superuser.SuperuserFragment
|
import com.topjohnwu.magisk.ui.superuser.SuperuserFragment
|
||||||
|
import com.topjohnwu.magisk.redesign.MainActivity as RedesignActivity
|
||||||
|
|
||||||
object Navigation {
|
object Navigation {
|
||||||
|
|
||||||
@ -50,6 +56,17 @@ object Navigation {
|
|||||||
else -> home()
|
else -> home()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// redesign starts here
|
||||||
|
|
||||||
|
fun start(launchIntent: Intent, context: Context) {
|
||||||
|
val destination = when {
|
||||||
|
Config.redesign -> RedesignActivity::class.java
|
||||||
|
else -> MainActivity::class.java
|
||||||
|
}
|
||||||
|
val intent = Intent(context, ClassMap[destination])
|
||||||
|
intent.putExtra(Const.Key.OPEN_SECTION, launchIntent.getStringExtra(Const.Key.OPEN_SECTION))
|
||||||
|
context.startActivity(intent)
|
||||||
|
}
|
||||||
|
|
||||||
object Main {
|
object Main {
|
||||||
const val OPEN_NAV = 1
|
const val OPEN_NAV = 1
|
||||||
|
@ -0,0 +1,13 @@
|
|||||||
|
package com.topjohnwu.magisk.redesign
|
||||||
|
|
||||||
|
import com.topjohnwu.magisk.R
|
||||||
|
import com.topjohnwu.magisk.databinding.ActivityMainMd2Binding
|
||||||
|
import com.topjohnwu.magisk.ui.base.MagiskActivity
|
||||||
|
import org.koin.androidx.viewmodel.ext.android.viewModel
|
||||||
|
|
||||||
|
open class MainActivity : MagiskActivity<MainViewModel, ActivityMainMd2Binding>() {
|
||||||
|
|
||||||
|
override val layoutRes = R.layout.activity_main_md2
|
||||||
|
override val viewModel by viewModel<MainViewModel>()
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
package com.topjohnwu.magisk.redesign
|
||||||
|
|
||||||
|
import com.topjohnwu.magisk.ui.base.MagiskViewModel
|
||||||
|
|
||||||
|
class MainViewModel : MagiskViewModel()
|
@ -1,11 +1,11 @@
|
|||||||
package com.topjohnwu.magisk.ui
|
package com.topjohnwu.magisk.ui
|
||||||
|
|
||||||
import android.content.Intent
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.text.TextUtils
|
import android.text.TextUtils
|
||||||
import androidx.appcompat.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import com.topjohnwu.magisk.*
|
import com.topjohnwu.magisk.*
|
||||||
|
import com.topjohnwu.magisk.model.navigation.Navigation
|
||||||
import com.topjohnwu.magisk.utils.Utils
|
import com.topjohnwu.magisk.utils.Utils
|
||||||
import com.topjohnwu.magisk.view.Notifications
|
import com.topjohnwu.magisk.view.Notifications
|
||||||
import com.topjohnwu.magisk.view.Shortcuts
|
import com.topjohnwu.magisk.view.Shortcuts
|
||||||
@ -56,10 +56,8 @@ open class SplashActivity : AppCompatActivity() {
|
|||||||
// Setup shortcuts
|
// Setup shortcuts
|
||||||
Shortcuts.setup(this)
|
Shortcuts.setup(this)
|
||||||
|
|
||||||
val intent = Intent(this, ClassMap[MainActivity::class.java])
|
|
||||||
intent.putExtra(Const.Key.OPEN_SECTION, getIntent().getStringExtra(Const.Key.OPEN_SECTION))
|
|
||||||
DONE = true
|
DONE = true
|
||||||
startActivity(intent)
|
Navigation.start(intent, this)
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,6 +57,8 @@ class SettingsFragment : BasePreferenceFragment() {
|
|||||||
preferenceManager.setStorageDeviceProtected()
|
preferenceManager.setStorageDeviceProtected()
|
||||||
setPreferencesFromResource(R.xml.app_settings, rootKey)
|
setPreferencesFromResource(R.xml.app_settings, rootKey)
|
||||||
|
|
||||||
|
findPreference<PreferenceCategory>("redesign_cat")?.isVisible = BuildConfig.DEBUG
|
||||||
|
|
||||||
updateChannel = findPreference(Config.Key.UPDATE_CHANNEL)!!
|
updateChannel = findPreference(Config.Key.UPDATE_CHANNEL)!!
|
||||||
rootConfig = findPreference(Config.Key.ROOT_ACCESS)!!
|
rootConfig = findPreference(Config.Key.ROOT_ACCESS)!!
|
||||||
autoRes = findPreference(Config.Key.SU_AUTO_RESPONSE)!!
|
autoRes = findPreference(Config.Key.SU_AUTO_RESPONSE)!!
|
||||||
@ -227,26 +229,26 @@ class SettingsFragment : BasePreferenceFragment() {
|
|||||||
private fun setLocalePreference(lp: ListPreference) {
|
private fun setLocalePreference(lp: ListPreference) {
|
||||||
lp.isEnabled = false
|
lp.isEnabled = false
|
||||||
availableLocales.map {
|
availableLocales.map {
|
||||||
val names = mutableListOf<String>()
|
val names = mutableListOf<String>()
|
||||||
val values = mutableListOf<String>()
|
val values = mutableListOf<String>()
|
||||||
|
|
||||||
names.add(
|
names.add(
|
||||||
LocaleManager.getString(defaultLocale, R.string.system_default)
|
LocaleManager.getString(defaultLocale, R.string.system_default)
|
||||||
)
|
)
|
||||||
values.add("")
|
values.add("")
|
||||||
|
|
||||||
it.forEach { locale ->
|
it.forEach { locale ->
|
||||||
names.add(locale.getDisplayName(locale))
|
names.add(locale.getDisplayName(locale))
|
||||||
values.add(locale.toLangTag())
|
values.add(locale.toLangTag())
|
||||||
}
|
|
||||||
|
|
||||||
Pair(names.toTypedArray(), values.toTypedArray())
|
|
||||||
}.subscribeK { (names, values) ->
|
|
||||||
lp.isEnabled = true
|
|
||||||
lp.entries = names
|
|
||||||
lp.entryValues = values
|
|
||||||
lp.summary = currentLocale.getDisplayName(currentLocale)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Pair(names.toTypedArray(), values.toTypedArray())
|
||||||
|
}.subscribeK { (names, values) ->
|
||||||
|
lp.isEnabled = true
|
||||||
|
lp.entries = names
|
||||||
|
lp.entryValues = values
|
||||||
|
lp.summary = currentLocale.getDisplayName(currentLocale)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setSummary(key: String) {
|
private fun setSummary(key: String) {
|
||||||
|
450
app/src/main/res/layout/activity_main_md2.xml
Normal file
450
app/src/main/res/layout/activity_main_md2.xml
Normal file
@ -0,0 +1,450 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layout 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">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="viewModel"
|
||||||
|
type="com.topjohnwu.magisk.redesign.MainViewModel" />
|
||||||
|
|
||||||
|
</data>
|
||||||
|
|
||||||
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
|
style="?styleAppbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?colorSurfaceVariant">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
|
android:id="@+id/home_toolbar"
|
||||||
|
style="?styleToolbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
|
app:contentInsetStartWithNavigation="0dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
tools:paddingTop="24dp">
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingBottom="@dimen/l1">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
style="?styleToolbarTitle"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="Home" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="5dp"
|
||||||
|
android:layout_gravity="center|bottom"
|
||||||
|
android:background="@drawable/bg_accent" />
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
</com.google.android.material.appbar.MaterialToolbar>
|
||||||
|
|
||||||
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
|
<androidx.core.widget.NestedScrollView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
android:padding="@dimen/l1"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingTop="@dimen/l1">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/home_magisk_wrapper"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/home_manager_wrapper"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/icon1"
|
||||||
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:alpha=".2"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:src="@tools:sample/avatars" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
style="?styleIconError"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/icon1"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/icon1"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/icon1"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/icon1"
|
||||||
|
app:srcCompat="@drawable/ic_delete_md2" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/title1"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/l1"
|
||||||
|
android:text="Magisk"
|
||||||
|
android:textAppearance="?appearanceTextTitleNormal"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/icon1"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/status1"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="is up to date"
|
||||||
|
android:textAppearance="?appearanceTextCaptionVariant"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/title1"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/title1"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/title1" />
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/button_container1"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/l1"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/status1">
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
style="?styleButtonDefault"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/update"
|
||||||
|
app:icon="@drawable/ic_update_md2"
|
||||||
|
app:iconGravity="textEnd"
|
||||||
|
app:iconPadding="@dimen/l_50"
|
||||||
|
app:iconSize="18dp"
|
||||||
|
tools:visibility="gone" />
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
style="?styleButtonText"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/install"
|
||||||
|
app:icon="@drawable/ic_install"
|
||||||
|
app:iconGravity="textEnd"
|
||||||
|
app:iconPadding="@dimen/l_50"
|
||||||
|
app:iconSize="18dp" />
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/home_manager_wrapper"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/l1"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/home_magisk_wrapper"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/icon2"
|
||||||
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:src="@tools:sample/avatars" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/title2"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/l1"
|
||||||
|
android:text="Manager"
|
||||||
|
android:textAppearance="?appearanceTextTitleNormal"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/icon2"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/status2"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="has update available!"
|
||||||
|
android:textAppearance="?appearanceTextCaptionVariant"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/title2"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/title2"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/title2" />
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/l1"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/status2">
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
style="?styleButtonDefault"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/update"
|
||||||
|
app:icon="@drawable/ic_update_md2"
|
||||||
|
app:iconGravity="textEnd"
|
||||||
|
app:iconPadding="@dimen/l_50"
|
||||||
|
app:iconSize="18dp" />
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
style="?styleButtonText"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/install"
|
||||||
|
app:icon="@drawable/ic_install"
|
||||||
|
app:iconGravity="textEnd"
|
||||||
|
app:iconPadding="@dimen/l_50"
|
||||||
|
app:iconSize="18dp"
|
||||||
|
tools:visibility="gone" />
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginTop="@dimen/l2"
|
||||||
|
android:layout_marginBottom="@dimen/l2"
|
||||||
|
android:background="?colorSurfaceVariant" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/support_icon_john"
|
||||||
|
style="?styleIconNormal"
|
||||||
|
android:padding="0dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:tint="@null"
|
||||||
|
tools:src="@tools:sample/avatars" />
|
||||||
|
|
||||||
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
style="?styleCardNormal"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/l1"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/support_icon_john"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="@dimen/l1">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fontFamily="sans-serif-black"
|
||||||
|
android:textAppearance="?appearanceTextCaptionNormal"
|
||||||
|
android:textStyle="bold"
|
||||||
|
tools:text="\@topjohnwu" />
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
android:fadingEdgeLength="@dimen/l1"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingTop="@dimen/l1"
|
||||||
|
android:requiresFadingEdge="horizontal"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
|
tools:listitem="@layout/item_developer" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/l1"
|
||||||
|
tools:visibility="gone">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/support_icon_dia"
|
||||||
|
style="?styleIconNormal"
|
||||||
|
android:padding="0dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:tint="@null"
|
||||||
|
tools:src="@tools:sample/avatars" />
|
||||||
|
|
||||||
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
style="?styleCardNormal"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="@dimen/l1"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toStartOf="@+id/support_icon_dia"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="@dimen/l1">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:fontFamily="sans-serif-black"
|
||||||
|
android:textAppearance="?appearanceTextCaptionNormal"
|
||||||
|
android:textStyle="bold"
|
||||||
|
tools:text="\@diareuse" />
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
android:fadingEdgeLength="@dimen/l1"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingTop="@dimen/l1"
|
||||||
|
android:requiresFadingEdge="horizontal"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
|
app:reverseLayout="true"
|
||||||
|
tools:listitem="@layout/item_developer" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginTop="@dimen/l1"
|
||||||
|
android:layout_marginBottom="@dimen/l1"
|
||||||
|
android:background="?colorSurfaceVariant" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:id="@+id/support_icon_common"
|
||||||
|
style="?styleIconNormal"
|
||||||
|
android:padding="0dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:tint="@null"
|
||||||
|
tools:src="@tools:sample/avatars" />
|
||||||
|
|
||||||
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
style="?styleCardNormal"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/l1"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/support_icon_common"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="@dimen/l1">
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fontFamily="sans-serif-black"
|
||||||
|
android:textAppearance="?appearanceTextCaptionNormal"
|
||||||
|
android:textStyle="bold"
|
||||||
|
tools:text="Project links" />
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
android:fadingEdgeLength="@dimen/l1"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingTop="@dimen/l1"
|
||||||
|
android:requiresFadingEdge="horizontal"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
|
tools:listitem="@layout/item_developer" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
|
<com.google.android.material.bottomappbar.BottomAppBar
|
||||||
|
android:id="@+id/home_bottom_bar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
|
android:background="?colorSurface"
|
||||||
|
app:backgroundTint="?colorSurface"
|
||||||
|
app:contentInsetEnd="0dp"
|
||||||
|
app:contentInsetStart="0dp"
|
||||||
|
app:fabCradleMargin="@dimen/l_50"
|
||||||
|
tools:paddingBottom="48dp">
|
||||||
|
|
||||||
|
<com.google.android.material.bottomnavigation.BottomNavigationView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
|
app:elevation="0dp"
|
||||||
|
app:itemIconTint="@color/color_menu_tint"
|
||||||
|
app:itemTextAppearanceActive="@style/AppearanceFoundation.Tiny.Bold"
|
||||||
|
app:itemTextAppearanceInactive="@style/AppearanceFoundation.Tiny.Bold"
|
||||||
|
app:itemTextColor="@color/color_menu_tint"
|
||||||
|
app:labelVisibilityMode="unlabeled"
|
||||||
|
app:menu="@menu/menu_bottom_nav" />
|
||||||
|
|
||||||
|
</com.google.android.material.bottomappbar.BottomAppBar>
|
||||||
|
|
||||||
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:fabSize="normal"
|
||||||
|
app:layout_anchor="@+id/home_bottom_bar"
|
||||||
|
app:srcCompat="@drawable/ic_superuser" />
|
||||||
|
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
|
||||||
|
</layout>
|
@ -1,434 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<androidx.coordinatorlayout.widget.CoordinatorLayout 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="match_parent"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
|
||||||
style="?styleAppbar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="?colorSurfaceVariant">
|
|
||||||
|
|
||||||
<com.google.android.material.appbar.MaterialToolbar
|
|
||||||
android:id="@+id/home_toolbar"
|
|
||||||
style="?styleToolbar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@android:color/transparent"
|
|
||||||
app:contentInsetStartWithNavigation="0dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
tools:paddingTop="24dp">
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingBottom="@dimen/l1">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
style="?styleToolbarTitle"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center"
|
|
||||||
tools:text="Home" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="50dp"
|
|
||||||
android:layout_height="5dp"
|
|
||||||
android:layout_gravity="center|bottom"
|
|
||||||
android:background="@drawable/bg_accent" />
|
|
||||||
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
</com.google.android.material.appbar.MaterialToolbar>
|
|
||||||
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:clipToPadding="false"
|
|
||||||
android:padding="@dimen/l1"
|
|
||||||
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingTop="@dimen/l1">
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:id="@+id/home_magisk_wrapper"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:layout_constraintEnd_toStartOf="@+id/home_manager_wrapper"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
|
||||||
android:id="@+id/icon1"
|
|
||||||
android:layout_width="48dp"
|
|
||||||
android:layout_height="48dp"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
tools:src="@tools:sample/avatars" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/title1"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/l1"
|
|
||||||
android:text="Magisk"
|
|
||||||
android:textAppearance="?appearanceTextTitleNormal"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/icon1"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/status1"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="is up to date"
|
|
||||||
android:textAppearance="?appearanceTextCaptionVariant"
|
|
||||||
app:layout_constraintEnd_toEndOf="@+id/title1"
|
|
||||||
app:layout_constraintStart_toStartOf="@+id/title1"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/title1" />
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:id="@+id/button_container1"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/l1"
|
|
||||||
android:layout_marginEnd="@dimen/l_50"
|
|
||||||
app:layout_constraintEnd_toStartOf="@+id/delete1"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/status1">
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
style="?styleButtonDefault"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/update"
|
|
||||||
app:icon="@drawable/ic_update_md2"
|
|
||||||
app:iconGravity="textEnd"
|
|
||||||
app:iconPadding="@dimen/l_50"
|
|
||||||
app:iconSize="18dp"
|
|
||||||
tools:visibility="gone" />
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
style="?styleButtonText"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/install"
|
|
||||||
app:icon="@drawable/ic_install"
|
|
||||||
app:iconGravity="textEnd"
|
|
||||||
app:iconPadding="@dimen/l_50"
|
|
||||||
app:iconSize="18dp" />
|
|
||||||
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
|
||||||
android:id="@+id/delete1"
|
|
||||||
style="?styleIconError"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/button_container1"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="@+id/button_container1"
|
|
||||||
app:srcCompat="@drawable/ic_delete_md2" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:id="@+id/home_manager_wrapper"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/l1"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/home_magisk_wrapper"
|
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
|
||||||
android:id="@+id/icon1"
|
|
||||||
android:layout_width="48dp"
|
|
||||||
android:layout_height="48dp"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
tools:src="@tools:sample/avatars" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/title1"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/l1"
|
|
||||||
android:text="Manager"
|
|
||||||
android:textAppearance="?appearanceTextTitleNormal"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/icon1"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/status1"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="has update available!"
|
|
||||||
android:textAppearance="?appearanceTextCaptionVariant"
|
|
||||||
app:layout_constraintEnd_toEndOf="@+id/title1"
|
|
||||||
app:layout_constraintStart_toStartOf="@+id/title1"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/title1" />
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/l1"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/status1">
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
style="?styleButtonDefault"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/update"
|
|
||||||
app:icon="@drawable/ic_update_md2"
|
|
||||||
app:iconGravity="textEnd"
|
|
||||||
app:iconPadding="@dimen/l_50"
|
|
||||||
app:iconSize="18dp" />
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
|
||||||
style="?styleButtonText"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/install"
|
|
||||||
app:icon="@drawable/ic_install"
|
|
||||||
app:iconGravity="textEnd"
|
|
||||||
app:iconPadding="@dimen/l_50"
|
|
||||||
app:iconSize="18dp"
|
|
||||||
tools:visibility="gone" />
|
|
||||||
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:layout_marginTop="@dimen/l2"
|
|
||||||
android:layout_marginBottom="@dimen/l2"
|
|
||||||
android:background="?colorSurfaceVariant" />
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
|
||||||
android:id="@+id/support_icon"
|
|
||||||
style="?styleIconNormal"
|
|
||||||
android:padding="0dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:tint="@null"
|
|
||||||
tools:src="@tools:sample/avatars" />
|
|
||||||
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
|
||||||
style="?styleCardNormal"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/l1"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/support_icon"
|
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="@dimen/l1">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:fontFamily="sans-serif-black"
|
|
||||||
android:textAppearance="?appearanceTextCaptionNormal"
|
|
||||||
android:textStyle="bold"
|
|
||||||
tools:text="\@topjohnwu" />
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:clipToPadding="false"
|
|
||||||
android:fadingEdgeLength="@dimen/l1"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingTop="@dimen/l1"
|
|
||||||
android:requiresFadingEdge="horizontal"
|
|
||||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
|
||||||
tools:listitem="@layout/item_developer" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/l1"
|
|
||||||
tools:visibility="gone">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
|
||||||
android:id="@+id/support_icon"
|
|
||||||
style="?styleIconNormal"
|
|
||||||
android:padding="0dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:tint="@null"
|
|
||||||
tools:src="@tools:sample/avatars" />
|
|
||||||
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
|
||||||
style="?styleCardNormal"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="@dimen/l1"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toStartOf="@+id/support_icon"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="@dimen/l1">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="end"
|
|
||||||
android:fontFamily="sans-serif-black"
|
|
||||||
android:textAppearance="?appearanceTextCaptionNormal"
|
|
||||||
android:textStyle="bold"
|
|
||||||
tools:text="\@diareuse" />
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:clipToPadding="false"
|
|
||||||
android:fadingEdgeLength="@dimen/l1"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingTop="@dimen/l1"
|
|
||||||
android:requiresFadingEdge="horizontal"
|
|
||||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
|
||||||
app:reverseLayout="true"
|
|
||||||
tools:listitem="@layout/item_developer" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:layout_marginTop="@dimen/l1"
|
|
||||||
android:layout_marginBottom="@dimen/l1"
|
|
||||||
android:background="?colorSurfaceVariant" />
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
|
||||||
android:id="@+id/support_icon"
|
|
||||||
style="?styleIconNormal"
|
|
||||||
android:padding="0dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:tint="@null"
|
|
||||||
tools:src="@tools:sample/avatars" />
|
|
||||||
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
|
||||||
style="?styleCardNormal"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/l1"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/support_icon"
|
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="@dimen/l1">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:fontFamily="sans-serif-black"
|
|
||||||
android:textAppearance="?appearanceTextCaptionNormal"
|
|
||||||
android:textStyle="bold"
|
|
||||||
tools:text="Project links" />
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:clipToPadding="false"
|
|
||||||
android:fadingEdgeLength="@dimen/l1"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingTop="@dimen/l1"
|
|
||||||
android:requiresFadingEdge="horizontal"
|
|
||||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
|
||||||
tools:listitem="@layout/item_developer" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</androidx.core.widget.NestedScrollView>
|
|
||||||
|
|
||||||
<com.google.android.material.bottomappbar.BottomAppBar
|
|
||||||
android:id="@+id/home_bottom_bar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="bottom"
|
|
||||||
android:paddingBottom="48dp"
|
|
||||||
app:contentInsetEnd="0dp"
|
|
||||||
app:contentInsetStart="0dp"
|
|
||||||
app:fabCradleMargin="@dimen/l_50">
|
|
||||||
|
|
||||||
<com.google.android.material.bottomnavigation.BottomNavigationView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@android:color/transparent"
|
|
||||||
app:itemIconTint="@color/color_menu_tint"
|
|
||||||
app:itemTextAppearanceActive="@style/AppearanceFoundation.Tiny.Bold"
|
|
||||||
app:itemTextAppearanceInactive="@style/AppearanceFoundation.Tiny.Bold"
|
|
||||||
app:itemTextColor="@color/color_menu_tint"
|
|
||||||
app:labelVisibilityMode="unlabeled"
|
|
||||||
app:menu="@menu/menu_bottom_nav" />
|
|
||||||
|
|
||||||
</com.google.android.material.bottomappbar.BottomAppBar>
|
|
||||||
|
|
||||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:fabSize="normal"
|
|
||||||
app:layout_anchor="@+id/home_bottom_bar"
|
|
||||||
app:srcCompat="@drawable/ic_superuser" />
|
|
||||||
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
@ -45,33 +45,35 @@
|
|||||||
|
|
||||||
<!--///-->
|
<!--///-->
|
||||||
|
|
||||||
<item name="appearanceTextDisplayNormal">@style/AppearanceFoundation.Display</>
|
<item name="appearanceTextDisplayNormal">@style/AppearanceFoundation.Display</item>
|
||||||
<item name="appearanceTextDisplayVariant">@style/AppearanceFoundation.Display.Variant</>
|
<item name="appearanceTextDisplayVariant">@style/AppearanceFoundation.Display.Variant</item>
|
||||||
<item name="appearanceTextDisplayOnPrimary">@style/AppearanceFoundation.Display.OnPrimary</>
|
<item name="appearanceTextDisplayOnPrimary">@style/AppearanceFoundation.Display.OnPrimary
|
||||||
|
</item>
|
||||||
<item name="appearanceTextDisplayOnPrimaryVariant">
|
<item name="appearanceTextDisplayOnPrimaryVariant">
|
||||||
@style/AppearanceFoundation.Display.OnPrimary.Variant
|
@style/AppearanceFoundation.Display.OnPrimary.Variant
|
||||||
</>
|
</item>
|
||||||
|
|
||||||
<item name="appearanceTextTitleNormal">@style/AppearanceFoundation.Title</>
|
<item name="appearanceTextTitleNormal">@style/AppearanceFoundation.Title</item>
|
||||||
<item name="appearanceTextTitleVariant">@style/AppearanceFoundation.Title.Variant</>
|
<item name="appearanceTextTitleVariant">@style/AppearanceFoundation.Title.Variant</item>
|
||||||
<item name="appearanceTextTitleOnPrimary">@style/AppearanceFoundation.Title.OnPrimary</>
|
<item name="appearanceTextTitleOnPrimary">@style/AppearanceFoundation.Title.OnPrimary</item>
|
||||||
<item name="appearanceTextTitleOnPrimaryVariant">
|
<item name="appearanceTextTitleOnPrimaryVariant">
|
||||||
@style/AppearanceFoundation.Title.OnPrimary.Variant
|
@style/AppearanceFoundation.Title.OnPrimary.Variant
|
||||||
</>
|
</item>
|
||||||
|
|
||||||
<item name="appearanceTextBodyNormal">@style/AppearanceFoundation.Body</>
|
<item name="appearanceTextBodyNormal">@style/AppearanceFoundation.Body</item>
|
||||||
<item name="appearanceTextBodyVariant">@style/AppearanceFoundation.Body.Variant</>
|
<item name="appearanceTextBodyVariant">@style/AppearanceFoundation.Body.Variant</item>
|
||||||
<item name="appearanceTextBodyOnPrimary">@style/AppearanceFoundation.Body.OnPrimary</>
|
<item name="appearanceTextBodyOnPrimary">@style/AppearanceFoundation.Body.OnPrimary</item>
|
||||||
<item name="appearanceTextBodyOnPrimaryVariant">
|
<item name="appearanceTextBodyOnPrimaryVariant">
|
||||||
@style/AppearanceFoundation.Body.OnPrimary.Variant
|
@style/AppearanceFoundation.Body.OnPrimary.Variant
|
||||||
</>
|
</item>
|
||||||
|
|
||||||
<item name="appearanceTextCaptionNormal">@style/AppearanceFoundation.Caption</>
|
<item name="appearanceTextCaptionNormal">@style/AppearanceFoundation.Caption</item>
|
||||||
<item name="appearanceTextCaptionVariant">@style/AppearanceFoundation.Caption.Variant</>
|
<item name="appearanceTextCaptionVariant">@style/AppearanceFoundation.Caption.Variant</item>
|
||||||
<item name="appearanceTextCaptionOnPrimary">@style/AppearanceFoundation.Caption.OnPrimary</>
|
<item name="appearanceTextCaptionOnPrimary">@style/AppearanceFoundation.Caption.OnPrimary
|
||||||
|
</item>
|
||||||
<item name="appearanceTextCaptionOnPrimaryVariant">
|
<item name="appearanceTextCaptionOnPrimaryVariant">
|
||||||
@style/AppearanceFoundation.Caption.OnPrimary.Variant
|
@style/AppearanceFoundation.Caption.OnPrimary.Variant
|
||||||
</>
|
</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Foundation.Default" parent="Foundation.Base">
|
<style name="Foundation.Default" parent="Foundation.Base">
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:key="general"
|
android:key="general"
|
||||||
android:title="@string/settings_general_category">
|
android:title="@string/settings_general_category">
|
||||||
@ -131,4 +132,15 @@
|
|||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
|
<PreferenceCategory
|
||||||
|
android:key="redesign_cat"
|
||||||
|
app:title="Redesign">
|
||||||
|
|
||||||
|
<SwitchPreferenceCompat
|
||||||
|
android:defaultValue="false"
|
||||||
|
android:key="redesign"
|
||||||
|
app:title="Enable Redesign" />
|
||||||
|
|
||||||
|
</PreferenceCategory>
|
||||||
|
|
||||||
</androidx.preference.PreferenceScreen>
|
</androidx.preference.PreferenceScreen>
|
Loading…
Reference in New Issue
Block a user