mirror of
https://github.com/YTVanced/VancedManager
synced 2024-11-25 12:45:12 +00:00
removed navbar and replaced translation animations with objectanimator
This commit is contained in:
parent
5061f94a73
commit
f9b62fad49
29 changed files with 285 additions and 95 deletions
|
@ -12,7 +12,6 @@ open class LanguageInstall : Fragment() {
|
|||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
val fragmentManager = childFragmentManager
|
||||
|
||||
val finishButton = getView()?.findViewById(R.id.vanced_install_finish) as Button
|
||||
|
||||
|
@ -20,11 +19,6 @@ open class LanguageInstall : Fragment() {
|
|||
view.findNavController().navigate(R.id.action_installTo_homeFragment)
|
||||
}
|
||||
|
||||
fragmentManager
|
||||
.beginTransaction()
|
||||
.replace(R.id.language_choose_frame, LanguageScrollviewFragment())
|
||||
.commit()
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -26,9 +26,11 @@ class MainActivity : Main() {
|
|||
setSupportActionBar(toolbar)
|
||||
|
||||
val navHost = findNavController(R.id.bottom_nav_host)
|
||||
val navBar = findViewById<BottomNavigationView>(R.id.bottom_nav)
|
||||
val appBarConfiguration = AppBarConfiguration(navHost.graph)
|
||||
toolbar.setupWithNavController(navHost, appBarConfiguration)
|
||||
|
||||
/*
|
||||
val navBar = findViewById<BottomNavigationView>(R.id.bottom_nav)
|
||||
navBar.setupWithNavController(navHost)
|
||||
|
||||
navBar.setOnNavigationItemSelectedListener{ item ->
|
||||
|
@ -47,8 +49,10 @@ class MainActivity : Main() {
|
|||
|
||||
navBar.setOnNavigationItemReselectedListener {
|
||||
}
|
||||
*/
|
||||
|
||||
navHost.addOnDestinationChangedListener{_, currfrag: NavDestination, _ ->
|
||||
/*
|
||||
val navBarHide: Animation = AnimationUtils.loadAnimation(applicationContext, R.anim.navbar_exit)
|
||||
val navBarShow: Animation = AnimationUtils.loadAnimation(applicationContext, R.anim.navbar_enter)
|
||||
when (currfrag.id) {
|
||||
|
@ -69,8 +73,9 @@ class MainActivity : Main() {
|
|||
}
|
||||
|
||||
}
|
||||
*/
|
||||
isParent = when (currfrag.id) {
|
||||
R.id.home_fragment, R.id.settings_fragment -> true
|
||||
R.id.home_fragment -> true
|
||||
else -> false
|
||||
}
|
||||
|
||||
|
@ -91,6 +96,10 @@ class MainActivity : Main() {
|
|||
navHost.navigate(R.id.toAboutFragment)
|
||||
return true
|
||||
}
|
||||
R.id.toolbar_settings -> {
|
||||
navHost.navigate(R.id.action_settingsFragment)
|
||||
return true
|
||||
}
|
||||
R.id.secret_settings -> {
|
||||
navHost.navigate(R.id.toSecretSettingsFragment)
|
||||
return true
|
||||
|
|
|
@ -31,7 +31,6 @@ open class ThemeActivity : AppCompatActivity() {
|
|||
|
||||
override fun onResume() {
|
||||
val theme = pref.getString("theme_mode", "")
|
||||
super.onResume()
|
||||
//if for some weird reasons we get invalid
|
||||
//theme, recreate activity
|
||||
if (currentTheme != theme)
|
||||
|
@ -42,6 +41,7 @@ open class ThemeActivity : AppCompatActivity() {
|
|||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) {
|
||||
setTaskBG()
|
||||
}
|
||||
super.onResume()
|
||||
}
|
||||
|
||||
//This stupid ass AppCompatDelegate does
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
package com.vanced.manager.ui.core
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
||||
open class SlidingConstraintLayout : ConstraintLayout {
|
||||
constructor(context: Context?) : super(context)
|
||||
constructor(context: Context?, attrs: AttributeSet?) : super(
|
||||
context,
|
||||
attrs
|
||||
)
|
||||
|
||||
var xFraction: Float
|
||||
get() {
|
||||
val width = width
|
||||
return if (width != 0)
|
||||
x / getWidth()
|
||||
else
|
||||
x
|
||||
}
|
||||
set(xFraction) {
|
||||
val width = width
|
||||
val newWidth =
|
||||
if (width > 0)
|
||||
xFraction * width
|
||||
else
|
||||
(-9999).toFloat()
|
||||
x = newWidth
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
package com.vanced.manager.ui.core
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import androidx.core.widget.NestedScrollView
|
||||
|
||||
open class SlidingNestedScrollView : NestedScrollView {
|
||||
constructor(context: Context?) : super(context!!)
|
||||
constructor(context: Context?, attrs: AttributeSet?) : super(
|
||||
context!!,
|
||||
attrs
|
||||
)
|
||||
|
||||
var xFraction: Float
|
||||
get() {
|
||||
val width = width
|
||||
return if (width != 0)
|
||||
x / getWidth()
|
||||
else
|
||||
x
|
||||
}
|
||||
set(xFraction) {
|
||||
val width = width
|
||||
val newWidth =
|
||||
if (width > 0)
|
||||
xFraction * width
|
||||
else
|
||||
(-9999).toFloat()
|
||||
x = newWidth
|
||||
}
|
||||
}
|
|
@ -5,8 +5,6 @@ import androidx.fragment.app.Fragment
|
|||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.Button
|
||||
import android.widget.TextView
|
||||
import com.vanced.manager.R
|
||||
|
||||
/**
|
||||
|
@ -18,7 +16,7 @@ class LanguageScrollviewFragment : Fragment() {
|
|||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View? {
|
||||
return inflater.inflate(R.layout.fragment_language_scrollview, container, false)
|
||||
return inflater.inflate(R.layout.include_language_scrollview, container, false)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
26
app/src/main/res/animator/fragment_enter.xml
Normal file
26
app/src/main/res/animator/fragment_enter.xml
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:ordering="together">
|
||||
|
||||
<objectAnimator
|
||||
android:duration="@android:integer/config_shortAnimTime"
|
||||
android:propertyName="scaleX"
|
||||
android:valueFrom="0.8"
|
||||
android:valueTo="1"
|
||||
android:valueType="floatType"/>
|
||||
|
||||
<objectAnimator
|
||||
android:duration="@android:integer/config_shortAnimTime"
|
||||
android:propertyName="scaleY"
|
||||
android:valueFrom="0.8"
|
||||
android:valueTo="1"
|
||||
android:valueType="floatType"/>
|
||||
|
||||
<objectAnimator
|
||||
android:duration="@android:integer/config_shortAnimTime"
|
||||
android:propertyName="alpha"
|
||||
android:valueFrom="0"
|
||||
android:valueTo="1"
|
||||
android:valueType="floatType" />
|
||||
|
||||
</set>
|
|
@ -1,9 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<translate
|
||||
<objectAnimator
|
||||
android:duration="@android:integer/config_mediumAnimTime"
|
||||
android:fromXDelta="-100%p"
|
||||
android:toXDelta="0"/>
|
||||
android:valueType="floatType"
|
||||
android:valueFrom="-1.0"
|
||||
android:valueTo="0"
|
||||
android:propertyName="xFraction" />
|
||||
|
||||
</set>
|
26
app/src/main/res/animator/fragment_enter_pop.xml
Normal file
26
app/src/main/res/animator/fragment_enter_pop.xml
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:ordering="together">
|
||||
|
||||
<objectAnimator
|
||||
android:duration="@android:integer/config_shortAnimTime"
|
||||
android:propertyName="scaleX"
|
||||
android:valueFrom="1.1"
|
||||
android:valueTo="1"
|
||||
android:valueType="floatType"/>
|
||||
|
||||
<objectAnimator
|
||||
android:duration="@android:integer/config_shortAnimTime"
|
||||
android:propertyName="scaleY"
|
||||
android:valueFrom="1.1"
|
||||
android:valueTo="1"
|
||||
android:valueType="floatType"/>
|
||||
|
||||
<objectAnimator
|
||||
android:duration="@android:integer/config_shortAnimTime"
|
||||
android:propertyName="alpha"
|
||||
android:valueFrom="0"
|
||||
android:valueTo="1"
|
||||
android:valueType="floatType" />
|
||||
|
||||
</set>
|
|
@ -1,9 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<translate
|
||||
<objectAnimator
|
||||
android:duration="@android:integer/config_mediumAnimTime"
|
||||
android:fromXDelta="100%p"
|
||||
android:toXDelta="0"/>
|
||||
android:valueType="floatType"
|
||||
android:valueFrom="1.0"
|
||||
android:valueTo="0"
|
||||
android:propertyName="xFraction" />
|
||||
|
||||
</set>
|
26
app/src/main/res/animator/fragment_exit.xml
Normal file
26
app/src/main/res/animator/fragment_exit.xml
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:ordering="together">
|
||||
|
||||
<objectAnimator
|
||||
android:duration="@android:integer/config_shortAnimTime"
|
||||
android:propertyName="scaleX"
|
||||
android:valueFrom="1"
|
||||
android:valueTo="0.8"
|
||||
android:valueType="floatType"/>
|
||||
|
||||
<objectAnimator
|
||||
android:duration="@android:integer/config_shortAnimTime"
|
||||
android:propertyName="scaleY"
|
||||
android:valueFrom="1"
|
||||
android:valueTo="0.8"
|
||||
android:valueType="floatType"/>
|
||||
|
||||
<objectAnimator
|
||||
android:duration="@android:integer/config_shortAnimTime"
|
||||
android:propertyName="alpha"
|
||||
android:valueFrom="1"
|
||||
android:valueTo="0"
|
||||
android:valueType="floatType" />
|
||||
|
||||
</set>
|
|
@ -1,9 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<translate
|
||||
<objectAnimator
|
||||
android:duration="@android:integer/config_mediumAnimTime"
|
||||
android:fromXDelta="0"
|
||||
android:toXDelta="-100%p" />
|
||||
android:valueType="floatType"
|
||||
android:valueFrom="0"
|
||||
android:valueTo="-1.0"
|
||||
android:propertyName="xFraction" />
|
||||
|
||||
</set>
|
26
app/src/main/res/animator/fragment_exit_pop.xml
Normal file
26
app/src/main/res/animator/fragment_exit_pop.xml
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:ordering="together">
|
||||
|
||||
<objectAnimator
|
||||
android:duration="@android:integer/config_shortAnimTime"
|
||||
android:propertyName="scaleX"
|
||||
android:valueFrom="1"
|
||||
android:valueTo="1.1"
|
||||
android:valueType="floatType"/>
|
||||
|
||||
<objectAnimator
|
||||
android:duration="@android:integer/config_shortAnimTime"
|
||||
android:propertyName="scaleX"
|
||||
android:valueFrom="1"
|
||||
android:valueTo="1.1"
|
||||
android:valueType="floatType"/>
|
||||
|
||||
<objectAnimator
|
||||
android:duration="@android:integer/config_shortAnimTime"
|
||||
android:propertyName="alpha"
|
||||
android:valueFrom="1"
|
||||
android:valueTo="0"
|
||||
android:valueType="floatType" />
|
||||
|
||||
</set>
|
|
@ -1,9 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<translate
|
||||
<objectAnimator
|
||||
android:duration="@android:integer/config_mediumAnimTime"
|
||||
android:fromXDelta="0"
|
||||
android:toXDelta="100%p"/>
|
||||
android:valueType="floatType"
|
||||
android:valueFrom="0"
|
||||
android:valueTo="1.0"
|
||||
android:propertyName="xFraction" />
|
||||
|
||||
</set>
|
|
@ -1,9 +1,10 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="34dp"
|
||||
android:height="34dp"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
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>
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:fillColor="?attr/toolbarIconColor"
|
||||
android:pathData="M19.1,12.9a2.8,2.8 0,0 0,0.1 -0.9,2.8 2.8,0 0,0 -0.1,-0.9l2.1,-1.6a0.7,0.7 0,0 0,0.1 -0.6L19.4,5.5a0.7,0.7 0,0 0,-0.6 -0.2l-2.4,1a6.5,6.5 0,0 0,-1.6 -0.9l-0.4,-2.6a0.5,0.5 0,0 0,-0.5 -0.4H10.1a0.5,0.5 0,0 0,-0.5 0.4L9.3,5.4a5.6,5.6 0,0 0,-1.7 0.9l-2.4,-1a0.4,0.4 0,0 0,-0.5 0.2l-2,3.4c-0.1,0.2 0,0.4 0.2,0.6l2,1.6a2.8,2.8 0,0 0,-0.1 0.9,2.8 2.8,0 0,0 0.1,0.9L2.8,14.5a0.7,0.7 0,0 0,-0.1 0.6l1.9,3.4a0.7,0.7 0,0 0,0.6 0.2l2.4,-1a6.5,6.5 0,0 0,1.6 0.9l0.4,2.6a0.5,0.5 0,0 0,0.5 0.4h3.8a0.5,0.5 0,0 0,0.5 -0.4l0.3,-2.6a5.6,5.6 0,0 0,1.7 -0.9l2.4,1a0.4,0.4 0,0 0,0.5 -0.2l2,-3.4c0.1,-0.2 0,-0.4 -0.2,-0.6ZM12,15.6A3.6,3.6 0,1 1,15.6 12,3.6 3.6,0 0,1 12,15.6Z"/>
|
||||
</vector>
|
||||
|
|
|
@ -13,9 +13,9 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@id/home_appbar"
|
||||
android:layout_above="@id/bottom_nav"
|
||||
app:defaultNavHost="true"
|
||||
app:navGraph="@navigation/mobile_navigation"/>
|
||||
<!--android:layout_above="@id/bottom_nav"-->
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/home_appbar"
|
||||
|
@ -37,6 +37,7 @@
|
|||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<!--
|
||||
<com.google.android.material.bottomnavigation.BottomNavigationView
|
||||
android:id="@+id/bottom_nav"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -45,5 +46,6 @@
|
|||
android:layout_alignParentBottom="true"
|
||||
app:labelVisibilityMode="unlabeled"
|
||||
app:menu="@menu/bottom_nav_menu" />
|
||||
-->
|
||||
|
||||
</RelativeLayout>
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView
|
||||
<com.vanced.manager.ui.core.SlidingNestedScrollView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -65,4 +65,4 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</com.vanced.manager.ui.core.SlidingNestedScrollView>
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Layout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_width="match_parent">
|
||||
|
||||
|
||||
|
||||
</Layout>
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<com.vanced.manager.ui.core.SlidingConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -50,10 +50,17 @@
|
|||
android:id="@+id/language_choose_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="360dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginEnd="2dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/install_language_note"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
app:layout_constraintEnd_toEndOf="parent" >
|
||||
|
||||
<include
|
||||
layout="@layout/include_language_scrollview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/Widget.AppCompat.Button.Borderless"
|
||||
|
@ -72,4 +79,4 @@
|
|||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.vanced.manager.ui.core.SlidingConstraintLayout>
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<com.vanced.manager.ui.core.SlidingConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -76,4 +76,4 @@
|
|||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.vanced.manager.ui.core.SlidingConstraintLayout>
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<com.vanced.manager.ui.core.SlidingConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -77,5 +77,5 @@
|
|||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.vanced.manager.ui.core.SlidingConstraintLayout>
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="v0.5.1 alpha"
|
||||
android:text="v0.6.0 alpha"
|
||||
android:textColor="#fff"
|
||||
android:textAlignment="center"
|
||||
android:textSize="18sp"
|
||||
|
|
|
@ -100,7 +100,8 @@
|
|||
app:layout_constraintHorizontal_bias="1.0"
|
||||
app:layout_constraintStart_toEndOf="@+id/microg_title"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/microg_uninstallbtn"/>
|
||||
app:layout_constraintBottom_toTopOf="@id/microg_uninstallbtn"
|
||||
android:scrollbars="none"/>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/microg_settingsbtn"
|
||||
|
@ -115,7 +116,8 @@
|
|||
app:iconGravity="textStart"
|
||||
app:iconPadding="0dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/microg_installbtn"/>
|
||||
app:layout_constraintEnd_toStartOf="@id/microg_installbtn"
|
||||
android:scrollbars="none"/>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/microg_uninstallbtn"
|
||||
|
@ -130,7 +132,8 @@
|
|||
app:icon="@drawable/ic_delete_black_24dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/microg_installbtn"/>
|
||||
app:layout_constraintTop_toBottomOf="@id/microg_installbtn"
|
||||
android:scrollbars="none"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
|
|
@ -99,7 +99,8 @@
|
|||
app:layout_constraintBottom_toTopOf="@id/vanced_uninstallbtn"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
android:fontFamily="@font/exo_semibold"
|
||||
app:icon="@drawable/outline_cloud_download_24"/>
|
||||
app:icon="@drawable/outline_cloud_download_24"
|
||||
android:scrollbars="none"/>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/vanced_uninstallbtn"
|
||||
|
@ -114,7 +115,8 @@
|
|||
app:icon="@drawable/ic_delete_black_24dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/vanced_installbtn"/>
|
||||
app:layout_constraintTop_toBottomOf="@id/vanced_installbtn"
|
||||
android:scrollbars="none"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
|
|
@ -2,10 +2,16 @@
|
|||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item
|
||||
android:id="@+id/toolbar_settings"
|
||||
android:title="@string/title_about"
|
||||
android:icon="@drawable/ic_settings_black_24dp"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/toolbar_about"
|
||||
android:title="@string/title_about"
|
||||
android:icon="@drawable/ic_info_black_24dp"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
</menu>
|
|
@ -12,21 +12,29 @@
|
|||
android:label="@string/title_home"
|
||||
tools:layout="@layout/fragment_home">
|
||||
|
||||
<action
|
||||
android:id="@+id/action_settingsFragment"
|
||||
app:destination="@id/settings_fragment"
|
||||
app:enterAnim="@animator/fragment_enter"
|
||||
app:exitAnim="@animator/fragment_exit"
|
||||
app:popEnterAnim="@animator/fragment_enter_pop"
|
||||
app:popExitAnim="@animator/fragment_exit_pop" />
|
||||
|
||||
<action
|
||||
android:id="@+id/toAboutFragment"
|
||||
app:destination="@id/about_fragment"
|
||||
app:enterAnim="@anim/fragment_enter_right"
|
||||
app:exitAnim="@anim/fragment_exit_left"
|
||||
app:popEnterAnim="@anim/fragment_enter_left"
|
||||
app:popExitAnim="@anim/fragment_exit_right" />
|
||||
app:enterAnim="@animator/fragment_enter"
|
||||
app:exitAnim="@animator/fragment_exit"
|
||||
app:popEnterAnim="@animator/fragment_enter_pop"
|
||||
app:popExitAnim="@animator/fragment_exit_pop" />
|
||||
|
||||
<action
|
||||
android:id="@+id/toInstallThemeFragment"
|
||||
app:destination="@id/install_theme_fragment"
|
||||
app:enterAnim="@anim/fragment_enter_right"
|
||||
app:exitAnim="@anim/fragment_exit_left"
|
||||
app:popEnterAnim="@anim/fragment_enter_left"
|
||||
app:popExitAnim="@anim/fragment_exit_right" />
|
||||
app:enterAnim="@animator/fragment_enter_right"
|
||||
app:exitAnim="@animator/fragment_exit_left"
|
||||
app:popEnterAnim="@animator/fragment_enter_left"
|
||||
app:popExitAnim="@animator/fragment_exit_right" />
|
||||
|
||||
</fragment>
|
||||
|
||||
|
@ -38,10 +46,10 @@
|
|||
<action
|
||||
android:id="@+id/toSecretSettingsFragment"
|
||||
app:destination="@id/secret_settings_fragment"
|
||||
app:enterAnim="@anim/fragment_enter_right"
|
||||
app:exitAnim="@anim/fragment_exit_left"
|
||||
app:popEnterAnim="@anim/fragment_enter_left"
|
||||
app:popExitAnim="@anim/fragment_exit_right" />
|
||||
app:enterAnim="@animator/fragment_enter"
|
||||
app:exitAnim="@animator/fragment_exit"
|
||||
app:popEnterAnim="@animator/fragment_enter_pop"
|
||||
app:popExitAnim="@animator/fragment_exit_pop" />
|
||||
|
||||
</fragment>
|
||||
|
||||
|
@ -60,10 +68,10 @@
|
|||
<action
|
||||
android:id="@+id/toInstallVariantFragment"
|
||||
app:destination="@id/install_variant_fragment"
|
||||
app:enterAnim="@anim/fragment_enter_right"
|
||||
app:exitAnim="@anim/fragment_exit_left"
|
||||
app:popEnterAnim="@anim/fragment_enter_left"
|
||||
app:popExitAnim="@anim/fragment_exit_right" />
|
||||
app:enterAnim="@animator/fragment_enter_right"
|
||||
app:exitAnim="@animator/fragment_exit_left"
|
||||
app:popEnterAnim="@animator/fragment_enter_left"
|
||||
app:popExitAnim="@animator/fragment_exit_right" />
|
||||
|
||||
</fragment>
|
||||
|
||||
|
@ -76,10 +84,10 @@
|
|||
<action
|
||||
android:id="@+id/toInstallLanguageFragment"
|
||||
app:destination="@id/install_language_fragment"
|
||||
app:enterAnim="@anim/fragment_enter_right"
|
||||
app:exitAnim="@anim/fragment_exit_left"
|
||||
app:popEnterAnim="@anim/fragment_enter_left"
|
||||
app:popExitAnim="@anim/fragment_exit_right" />
|
||||
app:enterAnim="@animator/fragment_enter_right"
|
||||
app:exitAnim="@animator/fragment_exit_left"
|
||||
app:popEnterAnim="@animator/fragment_enter_left"
|
||||
app:popExitAnim="@animator/fragment_exit_right" />
|
||||
|
||||
</fragment>
|
||||
|
||||
|
@ -92,10 +100,10 @@
|
|||
<action
|
||||
android:id="@+id/action_installTo_homeFragment"
|
||||
app:destination="@id/home_fragment"
|
||||
app:enterAnim="@anim/fragment_enter_left"
|
||||
app:exitAnim="@anim/fragment_exit_right"
|
||||
app:popEnterAnim="@anim/fragment_enter_right"
|
||||
app:popExitAnim="@anim/fragment_exit_left"
|
||||
app:enterAnim="@animator/fragment_enter_left"
|
||||
app:exitAnim="@animator/fragment_exit_right"
|
||||
app:popEnterAnim="@animator/fragment_enter_right"
|
||||
app:popExitAnim="@animator/fragment_exit_left"
|
||||
app:popUpTo="@id/home_fragment"
|
||||
app:popUpToInclusive="true"/>
|
||||
|
||||
|
@ -109,21 +117,11 @@
|
|||
<action
|
||||
android:id="@+id/action_homeFragment"
|
||||
app:destination="@id/home_fragment"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim"
|
||||
app:enterAnim="@animator/fragment_enter"
|
||||
app:exitAnim="@animator/fragment_exit"
|
||||
app:popEnterAnim="@animator/fragment_enter_pop"
|
||||
app:popExitAnim="@animator/fragment_exit_pop"
|
||||
app:popUpTo="@id/home_fragment"
|
||||
app:popUpToInclusive="true" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_settingsFragment"
|
||||
app:destination="@id/settings_fragment"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim"
|
||||
app:popUpTo="@id/settings_fragment"
|
||||
app:popUpToInclusive="true" />
|
||||
|
||||
</navigation>
|
|
@ -24,9 +24,14 @@
|
|||
<item name="cornerSize">8dp</item>
|
||||
<item name="android:textColor">?colorOnSurfaceVariant</item>
|
||||
<item name="android:textColorPrimary">?colorOnSurfaceVariant</item>
|
||||
<item name="colorSurface">?attr/DialogBG</item>
|
||||
<item name="colorAccent">?colorPrimary</item>
|
||||
<item name="colorPrimary">?colorPrimary</item>
|
||||
<item name="colorSurface">?DialogBG</item>
|
||||
<item name="android:buttonBarPositiveButtonStyle">@style/DialogPositiveButton</item>
|
||||
</style>
|
||||
|
||||
<style name="DialogPositiveButton" parent="Widget.MaterialComponents.Button.TextButton">
|
||||
<item name="android:textColor">?colorPrimary</item>
|
||||
<item name="textAllCaps">false</item>
|
||||
<item name="backgroundTint">@android:color/transparent</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
|
Loading…
Reference in a new issue