mirror of
https://github.com/YTVanced/VancedManager
synced 2024-11-22 19:25:11 +00:00
Added tab layout for changelog box, icons are now symmetrical af (thanks dojo), hardware acceleration, new fragment animations (stolen from magisk, sorry again John), added follow system theme and fixed some bugs
This commit is contained in:
parent
60d7d052a6
commit
1327b8d2d1
32 changed files with 173 additions and 129 deletions
|
@ -1,27 +1,24 @@
|
|||
package com.vanced.manager.Adapter
|
||||
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import androidx.fragment.app.FragmentManager
|
||||
import androidx.fragment.app.FragmentPagerAdapter
|
||||
import androidx.viewpager2.adapter.FragmentStateAdapter
|
||||
import com.vanced.manager.ui.fragments.MicrogChangelogFragment
|
||||
import com.vanced.manager.ui.fragments.VancedChangelogFragment
|
||||
|
||||
class SectionPageAdapter(fm: FragmentManager) : FragmentPagerAdapter(fm, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT) {
|
||||
class SectionPageAdapter(fa: FragmentActivity) : FragmentStateAdapter(fa) {
|
||||
|
||||
private val fragmentList : MutableList<Fragment> = ArrayList()
|
||||
private val titleList : MutableList<String> = ArrayList()
|
||||
override fun getItemCount(): Int = 2
|
||||
|
||||
override fun getCount(): Int {
|
||||
return fragmentList.size
|
||||
override fun createFragment(position: Int): Fragment {
|
||||
var fragment: Fragment? = null
|
||||
when (position) {
|
||||
0 -> fragment = VancedChangelogFragment()
|
||||
1 -> fragment = MicrogChangelogFragment()
|
||||
}
|
||||
return fragment!!
|
||||
}
|
||||
|
||||
override fun getItem(position: Int): Fragment {
|
||||
return fragmentList[position]
|
||||
}
|
||||
|
||||
override fun getPageTitle(position: Int): CharSequence? {
|
||||
return titleList[position]
|
||||
}
|
||||
fun addFragment(fragment: Fragment, title:String) {
|
||||
fragmentList.add(fragment)
|
||||
titleList.add(title)
|
||||
}
|
||||
}
|
|
@ -15,11 +15,8 @@ import com.vanced.manager.ui.core.ThemeActivity
|
|||
|
||||
class MainActivity : ThemeActivity() {
|
||||
|
||||
lateinit var homeFragment: HomeFragment
|
||||
lateinit var settingsFragment: SettingsFragment
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(null)
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_main)
|
||||
|
||||
val toolbar : MaterialToolbar = findViewById(R.id.home_toolbar)
|
||||
|
@ -33,11 +30,10 @@ class MainActivity : ThemeActivity() {
|
|||
|
||||
val navView : BottomNavigationView = findViewById(R.id.bottom_nav)
|
||||
|
||||
homeFragment = HomeFragment()
|
||||
supportFragmentManager
|
||||
.beginTransaction()
|
||||
.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN)
|
||||
.replace(R.id.frame_layout, homeFragment)
|
||||
.setCustomAnimations(R.anim.fragment_enter, R.anim.fragment_exit)
|
||||
.replace(R.id.frame_layout, HomeFragment())
|
||||
.commit()
|
||||
|
||||
navView.setOnNavigationItemSelectedListener { item ->
|
||||
|
@ -46,21 +42,19 @@ class MainActivity : ThemeActivity() {
|
|||
|
||||
R.id.navigation_home -> {
|
||||
|
||||
homeFragment = HomeFragment()
|
||||
supportFragmentManager
|
||||
.beginTransaction()
|
||||
.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN)
|
||||
.replace(R.id.frame_layout, homeFragment)
|
||||
.setCustomAnimations(R.anim.fragment_enter, R.anim.fragment_exit)
|
||||
.replace(R.id.frame_layout, HomeFragment())
|
||||
.commit()
|
||||
return@setOnNavigationItemSelectedListener true
|
||||
}
|
||||
R.id.navigation_settings -> {
|
||||
|
||||
settingsFragment = SettingsFragment()
|
||||
supportFragmentManager
|
||||
.beginTransaction()
|
||||
.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN)
|
||||
.replace(R.id.frame_layout, settingsFragment)
|
||||
.setCustomAnimations(R.anim.fragment_enter, R.anim.fragment_exit)
|
||||
.replace(R.id.frame_layout, SettingsFragment())
|
||||
.commit()
|
||||
return@setOnNavigationItemSelectedListener true
|
||||
}
|
||||
|
|
|
@ -10,7 +10,6 @@ import com.vanced.manager.ui.fragments.VancedThemeSelectionFragment
|
|||
|
||||
class VancedInstallActivity : ThemeActivity() {
|
||||
|
||||
lateinit var vancedThemeSelectionFragment: VancedThemeSelectionFragment
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_vanced_install)
|
||||
|
@ -25,11 +24,10 @@ class VancedInstallActivity : ThemeActivity() {
|
|||
supportActionBar!!.title = "Install"
|
||||
supportActionBar!!.setDisplayHomeAsUpEnabled(true)
|
||||
|
||||
vancedThemeSelectionFragment = VancedThemeSelectionFragment()
|
||||
supportFragmentManager
|
||||
.beginTransaction()
|
||||
.setCustomAnimations(android.R.anim.fade_in, R.animator.fragment_exit)
|
||||
.replace(R.id.vanced_install_frame, vancedThemeSelectionFragment)
|
||||
.replace(R.id.vanced_install_frame, VancedThemeSelectionFragment())
|
||||
.commit()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.vanced.manager.ui.core
|
|||
import android.annotation.SuppressLint
|
||||
import android.app.ActivityManager
|
||||
import android.content.SharedPreferences
|
||||
import android.content.res.Configuration
|
||||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.preference.PreferenceManager
|
||||
|
@ -33,6 +34,14 @@ open class ThemeActivity : AppCompatActivity() {
|
|||
when (currentTheme) {
|
||||
"LIGHT" -> setTheme(R.style.LightTheme_Blue)
|
||||
"DARK" -> setTheme(R.style.DarkTheme_Blue)
|
||||
"FOLLOW" -> {
|
||||
when (resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK) {
|
||||
Configuration.UI_MODE_NIGHT_YES -> setTheme(R.style.DarkTheme_Blue)
|
||||
Configuration.UI_MODE_NIGHT_NO -> setTheme(R.style.LightTheme_Blue)
|
||||
else -> setTheme(R.style.LightTheme_Blue)
|
||||
}
|
||||
}
|
||||
else -> setTheme(R.style.LightTheme_Blue)
|
||||
}
|
||||
}
|
||||
}
|
|
@ -12,12 +12,19 @@ import android.content.pm.PackageManager
|
|||
import android.content.Intent
|
||||
import androidx.browser.customtabs.CustomTabsIntent
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import androidx.viewpager2.widget.ViewPager2
|
||||
import com.google.android.material.tabs.TabLayout
|
||||
import com.google.android.material.tabs.TabLayoutMediator
|
||||
import com.vanced.manager.Adapter.SectionPageAdapter
|
||||
import com.vanced.manager.R
|
||||
import com.vanced.manager.ui.VancedInstallActivity
|
||||
import com.vanced.manager.ui.MainActivity
|
||||
|
||||
class HomeFragment : Fragment() {
|
||||
|
||||
private lateinit var viewPager: ViewPager2
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
|
@ -39,6 +46,18 @@ class HomeFragment : Fragment() {
|
|||
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
viewPager = view.findViewById(R.id.viewpager)
|
||||
viewPager.adapter = SectionPageAdapter(FragmentActivity())
|
||||
|
||||
val tabLayout = view.findViewById(R.id.tablayout) as TabLayout
|
||||
|
||||
TabLayoutMediator(tabLayout, viewPager) { tab, position ->
|
||||
when (position) {
|
||||
0 -> tab.text = "Vanced"
|
||||
1 -> tab.text = "MicroG"
|
||||
}
|
||||
}.attach()
|
||||
|
||||
val builder = CustomTabsIntent.Builder()
|
||||
val pm = activity?.packageManager
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@ class MicrogChangelogFragment : Fragment() {
|
|||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
// Inflate the layout for this fragment
|
||||
return inflater.inflate(R.layout.fragment_microg_changelog, container, false)
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.vanced.manager.ui.fragments
|
||||
|
||||
import android.content.res.Configuration
|
||||
import android.os.Bundle
|
||||
import androidx.preference.ListPreference
|
||||
import androidx.preference.PreferenceFragmentCompat
|
||||
|
@ -25,10 +26,26 @@ class SettingsFragment : PreferenceFragmentCompat() {
|
|||
activity?.setTheme(R.style.DarkTheme_Blue)
|
||||
activity?.recreate()
|
||||
}
|
||||
else -> {
|
||||
activity?.setTheme(R.style.LightTheme_Blue)
|
||||
activity?.recreate()
|
||||
"FOLLOW" -> {
|
||||
when (resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK) {
|
||||
Configuration.UI_MODE_NIGHT_YES ->{
|
||||
activity?.setTheme(R.style.DarkTheme_Blue)
|
||||
activity?.recreate()
|
||||
}
|
||||
Configuration.UI_MODE_NIGHT_NO -> {
|
||||
activity?.setTheme(R.style.LightTheme_Blue)
|
||||
activity?.recreate()
|
||||
}
|
||||
else -> {
|
||||
activity?.setTheme(R.style.LightTheme_Blue)
|
||||
activity?.recreate()
|
||||
}
|
||||
}
|
||||
}
|
||||
else -> {
|
||||
activity?.setTheme(R.style.LightTheme_Blue)
|
||||
activity?.recreate()
|
||||
}
|
||||
}
|
||||
true
|
||||
}
|
||||
|
|
|
@ -16,7 +16,6 @@ class VancedChangelogFragment : Fragment() {
|
|||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
// Inflate the layout for this fragment
|
||||
return inflater.inflate(R.layout.fragment_vanced_changelog, container, false)
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<objectAnimator
|
||||
android:duration="600"
|
||||
android:duration="500"
|
||||
android:propertyName="x"
|
||||
android:valueFrom="1000"
|
||||
android:valueTo="0"
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<objectAnimator
|
||||
android:duration="600"
|
||||
android:duration="500"
|
||||
android:propertyName="x"
|
||||
android:valueFrom="0"
|
||||
android:valueTo="-1000"
|
||||
android:valueTo="-1200"
|
||||
android:valueType="floatType" />
|
||||
|
||||
</set>
|
|
@ -4,6 +4,6 @@
|
|||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:fillColor="?attr/iconColor"
|
||||
android:pathData="M19.35,10.04C18.67,6.59 15.64,4 12,4 9.11,4 6.6,5.64 5.35,8.04 2.34,8.36 0,10.91 0,14c0,3.31 2.69,6 6,6h13c2.76,0 5,-2.24 5,-5 0,-2.64 -2.05,-4.78 -4.65,-4.96zM14,13v4h-4v-4H7l5,-5 5,5h-3z"/>
|
||||
</vector>
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillColor="?attr/toolbarIconColor"
|
||||
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,17h-2v-6h2v6zM13,9h-2L11,7h2v2z"/>
|
||||
</vector>
|
||||
|
|
0
app/src/main/res/drawable/rectangle_2.xml
Executable file → Normal file
0
app/src/main/res/drawable/rectangle_2.xml
Executable file → Normal file
|
@ -21,7 +21,8 @@
|
|||
android:id="@+id/about_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:titleTextColor="?attr/toolbarBackIcon"
|
||||
app:titleTextColor="?attr/toolbarIconColor"
|
||||
app:titleTextAppearance="@font/exo_bold"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/container"
|
||||
|
@ -7,38 +7,42 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/home_toolbar"
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/home_appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:titleTextColor="#F9F9F9"
|
||||
android:background="@drawable/rectangle_2"/>
|
||||
android:layout_height="wrap_content"
|
||||
android:elevation="1dp"
|
||||
android:background="?colorSurface"
|
||||
android:layout_alignParentTop="true">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/home_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:titleTextColor="?attr/toolbarIconColor"
|
||||
app:titleTextAppearance="@font/exo_bold"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:background="@android:color/transparent"/>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<com.google.android.material.bottomnavigation.BottomNavigationView
|
||||
android:id="@+id/bottom_nav"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="63dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?colorSurface"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/frame_layout"
|
||||
android:layout_alignParentBottom="true"
|
||||
app:menu="@menu/bottom_nav_menu" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/frame_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="60dp"
|
||||
android:layout_marginBottom="63dp"
|
||||
app:layout_constraintBottom_toTopOf="@id/bottom_nav"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/home_toolbar">
|
||||
android:layout_above="@id/bottom_nav"
|
||||
android:layout_below="@id/home_appbar">
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</RelativeLayout>
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
@ -7,22 +7,19 @@
|
|||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/vanced_install_appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:elevation="1dp"
|
||||
android:background="?colorSurface"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
android:layout_alignParentTop="true">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/vanced_install_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
app:titleTextColor="?attr/toolbarBackIcon"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:titleTextColor="?attr/toolbarIconColor"
|
||||
app:titleTextAppearance="@font/exo_bold"
|
||||
android:background="@android:color/transparent" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
@ -31,11 +28,8 @@
|
|||
android:id="@+id/vanced_install_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="65dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
android:layout_below="@id/vanced_install_appbar"
|
||||
android:layout_alignParentBottom="true"/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</RelativeLayout>
|
|
@ -17,7 +17,7 @@
|
|||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<RadioGroup
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:checkedButton="@id/English">
|
||||
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="32sp"
|
||||
android:text="Same-but-for-microg" />
|
||||
android:text="Same but for microg" />
|
||||
|
||||
</FrameLayout>
|
|
@ -5,11 +5,10 @@
|
|||
android:layout_height="match_parent"
|
||||
tools:context=".ui.fragments.VancedChangelogFragment">
|
||||
|
||||
<!-- TODO: Update blank fragment layout -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="32sp"
|
||||
android:text="This-is-a-hardcoded-string" />
|
||||
android:text="This is a hardcoded string" />
|
||||
|
||||
</FrameLayout>
|
|
@ -4,11 +4,14 @@
|
|||
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:layout_height="wrap_content">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:cardCornerRadius="@dimen/eightdp"
|
||||
app:cardBackgroundColor="?colorSurfaceVariant"
|
||||
app:cardElevation="0dp"
|
||||
|
@ -45,8 +48,9 @@
|
|||
<FrameLayout
|
||||
android:id="@+id/language_choose_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="300dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/install_language_title"
|
||||
android:layout_height="360dp"
|
||||
android:layout_marginTop="4dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/install_language_note"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
|
|
|
@ -2,12 +2,16 @@
|
|||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
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:layout_height="wrap_content">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:cardCornerRadius="@dimen/eightdp"
|
||||
app:cardBackgroundColor="?colorSurfaceVariant"
|
||||
app:cardElevation="0dp"
|
||||
|
@ -29,6 +33,7 @@
|
|||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/vanced_theme_buttons"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/install_theme_title"
|
||||
|
@ -58,7 +63,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/vanced_theme_buttons"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="Next"
|
||||
android:textAllCaps="false"
|
||||
|
|
|
@ -2,12 +2,16 @@
|
|||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
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:layout_height="wrap_content">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:cardCornerRadius="@dimen/eightdp"
|
||||
app:cardBackgroundColor="?colorSurfaceVariant"
|
||||
app:cardElevation="0dp"
|
||||
|
@ -29,18 +33,13 @@
|
|||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/vanced_variant_buttons"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:checkedButton="@id/button_nonroot"
|
||||
app:layout_constraintTop_toBottomOf="@id/install_theme_title"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<com.google.android.material.radiobutton.MaterialRadioButton
|
||||
android:id="@+id/button_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="18sp"
|
||||
android:text="root"/>
|
||||
|
||||
<com.google.android.material.radiobutton.MaterialRadioButton
|
||||
android:id="@+id/button_nonroot"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -48,6 +47,13 @@
|
|||
android:textSize="18sp"
|
||||
android:text="non-root"/>
|
||||
|
||||
<com.google.android.material.radiobutton.MaterialRadioButton
|
||||
android:id="@+id/button_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="18sp"
|
||||
android:text="root"/>
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
|
@ -55,7 +61,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/vanced_variant_buttons"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:text="Next"
|
||||
android:textAllCaps="false"
|
||||
|
|
|
@ -27,29 +27,24 @@
|
|||
android:layout_marginTop="4dp"
|
||||
android:layout_marginStart="@dimen/eightdp"/>
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/app_bar_layout"
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tablayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/changelog_text"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:background="?colorSurfaceVariant">
|
||||
android:background="?colorSurfaceVariant"
|
||||
app:tabMode="scrollable"
|
||||
app:tabIndicatorColor="?colorPrimary"
|
||||
app:tabSelectedTextColor="?colorPrimary"
|
||||
app:tabTextColor="?colorPrimary"
|
||||
app:layout_constraintTop_toBottomOf="@id/changelog_text" />
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tablayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?colorSurfaceVariant" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/viewpager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/changelog_text"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/tablayout"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
style="@style/Widget.AppCompat.Button.Borderless.Colored"
|
||||
android:layout_width="117dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginEnd="@dimen/eightdp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:fontFamily="@font/exo_semibold"
|
||||
android:text="@string/install"
|
||||
android:textAllCaps="false"
|
||||
|
@ -107,7 +107,7 @@
|
|||
style="@style/Widget.AppCompat.Button.Borderless.Colored"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginEnd="@dimen/eightdp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:fontFamily="@font/exo_semibold"
|
||||
app:backgroundTint="?colorPrimary"
|
||||
|
@ -122,7 +122,7 @@
|
|||
style="@style/Widget.AppCompat.Button.Borderless.Colored"
|
||||
android:layout_width="117dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginEnd="@dimen/eightdp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:fontFamily="@font/exo_semibold"
|
||||
android:text="@string/uninstall"
|
||||
|
|
|
@ -95,7 +95,7 @@
|
|||
android:layout_height="40dp"
|
||||
android:text="@string/install"
|
||||
android:textAllCaps="false"
|
||||
android:layout_marginEnd="@dimen/eightdp"
|
||||
android:layout_marginEnd="4dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
|
@ -108,7 +108,7 @@
|
|||
style="@style/Widget.AppCompat.Button.Borderless.Colored"
|
||||
android:layout_width="117dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginEnd="@dimen/eightdp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:fontFamily="@font/exo_semibold"
|
||||
android:text="@string/uninstall"
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<item name="colorDisabled">#808080</item>
|
||||
<item name="colorDisabledVariant">#66808080</item>
|
||||
<item name="iconColor">?colorPrimaryVariant</item>
|
||||
<item name="toolbarBackIcon">?colorOnPrimary</item>
|
||||
<item name="toolbarIconColor">?colorOnPrimary</item>
|
||||
|
||||
</style>
|
||||
|
||||
|
|
|
@ -4,11 +4,13 @@
|
|||
<string-array name="theme_modes">
|
||||
<item>"Light theme"</item>
|
||||
<item>"Dark theme"</item>
|
||||
<item>Follow System</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="theme_modes_values">
|
||||
<item>LIGHT</item>
|
||||
<item>DARK</item>
|
||||
<item>FOLLOW</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="languages">
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
<attr name="colorOnSurfaceVariant" format="color" />
|
||||
<attr name="colorSurfaceSurfaceVariant" format="color" />
|
||||
<attr name="iconColor" format="reference|color" />
|
||||
<attr name="toolbarBackIcon" format="reference|color"/>
|
||||
<attr name="toolbarIconColor" format="reference|color"/>
|
||||
|
||||
</resources>
|
|
@ -29,7 +29,7 @@
|
|||
<!-- Settings -->
|
||||
<string name="theme">Theme</string>
|
||||
|
||||
<!-- TODO: Remove or change this placeholder text -->
|
||||
<string name="hello_blank_fragment">Hello blank fragment</string>
|
||||
<!-- Install Page -->
|
||||
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<resources>
|
||||
|
||||
<style name="SplashTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||
<style name="SplashTheme" parent="Theme.MaterialComponents.NoActionBar">
|
||||
<item name="background">?colorSurface</item>
|
||||
<item name="android:windowBackground">@drawable/splash_logo</item>
|
||||
<item name="android:windowTranslucentStatus">true</item>
|
||||
<item name="android:windowTranslucentNavigation">true</item>
|
||||
|
@ -13,7 +14,7 @@
|
|||
|
||||
<style name="DarkTheme" parent="Theme.MaterialComponents.NoActionBar">
|
||||
<item name="android:windowBackground">?colorSurface</item>
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
<item name="android:statusBarColor">#000000</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<item name="colorDisabled">#808080</item>
|
||||
<item name="colorDisabledVariant">#66808080</item>
|
||||
<item name="iconColor">?colorPrimaryVariant</item>
|
||||
<item name="toolbarBackIcon">#111111</item>
|
||||
<item name="toolbarIconColor">#111111</item>
|
||||
|
||||
</style>
|
||||
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
|
||||
<Preference
|
||||
android:key="update_check"
|
||||
android:title="Check for updates" />
|
||||
android:title="Check for updates"
|
||||
android:icon="@drawable/ic_cloud_upload_black_24dp"/>
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="Interface">
|
||||
|
@ -16,7 +17,7 @@
|
|||
android:summary="Choose your preferred theme"
|
||||
android:entries="@array/theme_modes"
|
||||
android:entryValues="@array/theme_modes_values"
|
||||
android:defaultValue="DARK"/>
|
||||
android:defaultValue="LIGHT"/>
|
||||
|
||||
<ListPreference
|
||||
android:icon="@drawable/ic_palette_black_24dp"
|
||||
|
|
Loading…
Reference in a new issue