mirror of
https://github.com/YTVanced/VancedManager
synced 2024-11-29 22:43:01 +00:00
Theme updates! again... So AppCompatDelegate is a total trash so I used my own implementation, although this means that "follow system" theme will be removed until it's fixed, this doesn't mean that i won't add support for it in the near future
This commit is contained in:
parent
0e554686e3
commit
d6826e53e7
28 changed files with 202 additions and 68 deletions
|
@ -10,7 +10,7 @@
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/Theme.MaterialComponents.DayNight.NoActionBar">
|
android:theme="@style/LightTheme.Blue">
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".SplashScreenActivity"
|
android:name=".SplashScreenActivity"
|
||||||
|
|
|
@ -10,6 +10,7 @@ import android.view.ViewGroup
|
||||||
import android.widget.Button
|
import android.widget.Button
|
||||||
import android.content.pm.PackageManager
|
import android.content.pm.PackageManager
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
import android.content.res.ColorStateList
|
||||||
import androidx.browser.customtabs.CustomTabsIntent
|
import androidx.browser.customtabs.CustomTabsIntent
|
||||||
import androidx.appcompat.widget.Toolbar
|
import androidx.appcompat.widget.Toolbar
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
|
@ -72,7 +73,7 @@ class HomeFragment : Fragment() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
microgsettingsbtn.isEnabled = false
|
microgsettingsbtn.visibility = View.INVISIBLE
|
||||||
}
|
}
|
||||||
|
|
||||||
bravebtn.setOnClickListener {
|
bravebtn.setOnClickListener {
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package com.vanced.manager
|
package com.vanced.manager
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.appcompat.app.AppCompatDelegate
|
|
||||||
import androidx.preference.ListPreference
|
import androidx.preference.ListPreference
|
||||||
import androidx.preference.PreferenceFragmentCompat
|
import androidx.preference.PreferenceFragmentCompat
|
||||||
import com.vanced.manager.ui.MainActivity
|
import com.vanced.manager.ui.MainActivity
|
||||||
|
@ -15,16 +14,19 @@ class SettingsFragment : PreferenceFragmentCompat() {
|
||||||
|
|
||||||
val themeSwitch: ListPreference? = findPreference("theme_modes")
|
val themeSwitch: ListPreference? = findPreference("theme_modes")
|
||||||
themeSwitch?.setOnPreferenceChangeListener { _, _ ->
|
themeSwitch?.setOnPreferenceChangeListener { _, _ ->
|
||||||
val currentVal: String = themeSwitch.value
|
|
||||||
when (currentVal.toInt()){
|
when (themeSwitch.value){
|
||||||
0 -> {
|
"LIGHT" -> {
|
||||||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM)
|
activity?.setTheme(R.style.LightTheme_Blue)
|
||||||
|
activity?.recreate()
|
||||||
}
|
}
|
||||||
1 -> {
|
"DARK" -> {
|
||||||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO)
|
activity?.setTheme(R.style.DarkTheme_Blue)
|
||||||
|
activity?.recreate()
|
||||||
}
|
}
|
||||||
else -> {
|
else -> {
|
||||||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES)
|
activity?.setTheme(R.style.LightTheme_Blue)
|
||||||
|
activity?.recreate()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
true
|
true
|
||||||
|
|
|
@ -1,18 +1,27 @@
|
||||||
package com.vanced.manager.ui
|
package com.vanced.manager.ui
|
||||||
|
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import androidx.browser.customtabs.CustomTabsIntent
|
import androidx.browser.customtabs.CustomTabsIntent
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
|
import com.google.android.material.appbar.MaterialToolbar
|
||||||
import com.vanced.manager.R
|
import com.vanced.manager.R
|
||||||
|
import com.vanced.manager.ui.core.ThemeActivity
|
||||||
|
|
||||||
class AboutActivity : AppCompatActivity() {
|
class AboutActivity : ThemeActivity() {
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_about)
|
setContentView(R.layout.activity_about)
|
||||||
|
|
||||||
|
val toolbar : MaterialToolbar = findViewById(R.id.about_toolbar)
|
||||||
|
toolbar.setNavigationIcon(R.drawable.ic_keyboard_backspace_black_24dp)
|
||||||
|
setSupportActionBar(toolbar)
|
||||||
|
toolbar.setNavigationOnClickListener {
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
|
||||||
supportActionBar!!.title = "About"
|
supportActionBar!!.title = "About"
|
||||||
supportActionBar!!.setDisplayHomeAsUpEnabled(true)
|
supportActionBar!!.setDisplayHomeAsUpEnabled(true)
|
||||||
|
|
||||||
|
|
|
@ -1,34 +1,30 @@
|
||||||
package com.vanced.manager.ui
|
package com.vanced.manager.ui
|
||||||
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.content.res.Configuration
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.Menu
|
import android.view.Menu
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
import androidx.appcompat.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import com.google.android.material.bottomnavigation.BottomNavigationView
|
import com.google.android.material.bottomnavigation.BottomNavigationView
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
|
||||||
import androidx.appcompat.app.AppCompatDelegate
|
|
||||||
import androidx.fragment.app.FragmentTransaction
|
import androidx.fragment.app.FragmentTransaction
|
||||||
|
import com.google.android.material.appbar.MaterialToolbar
|
||||||
import com.vanced.manager.HomeFragment
|
import com.vanced.manager.HomeFragment
|
||||||
import com.vanced.manager.R
|
import com.vanced.manager.R
|
||||||
import com.vanced.manager.SettingsFragment
|
import com.vanced.manager.SettingsFragment
|
||||||
import kotlinx.android.synthetic.main.activity_main.*
|
import com.vanced.manager.ui.core.ThemeActivity
|
||||||
|
|
||||||
class MainActivity : AppCompatActivity() {
|
class MainActivity : ThemeActivity() {
|
||||||
|
|
||||||
lateinit var homeFragment: HomeFragment
|
lateinit var homeFragment: HomeFragment
|
||||||
lateinit var settingsFragment: SettingsFragment
|
lateinit var settingsFragment: SettingsFragment
|
||||||
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.getDefaultNightMode())
|
|
||||||
|
|
||||||
super.onCreate(null)
|
super.onCreate(null)
|
||||||
setContentView(R.layout.activity_main)
|
setContentView(R.layout.activity_main)
|
||||||
|
|
||||||
|
val toolbar : MaterialToolbar = findViewById(R.id.home_toolbar)
|
||||||
setSupportActionBar(toolbar)
|
setSupportActionBar(toolbar)
|
||||||
supportActionBar?.title = getString(R.string.title_home)
|
|
||||||
|
|
||||||
|
|
||||||
val prefs = getSharedPreferences("prefs", MODE_PRIVATE)
|
val prefs = getSharedPreferences("prefs", MODE_PRIVATE)
|
||||||
|
|
37
app/src/main/java/com/vanced/manager/ui/core/Theme.kt
Normal file
37
app/src/main/java/com/vanced/manager/ui/core/Theme.kt
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
package com.vanced.manager.ui.core
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint
|
||||||
|
import android.content.SharedPreferences
|
||||||
|
import android.os.Bundle
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import androidx.preference.PreferenceManager
|
||||||
|
import com.vanced.manager.R
|
||||||
|
|
||||||
|
@SuppressLint("Registered")
|
||||||
|
open class ThemeActivity : AppCompatActivity() {
|
||||||
|
private lateinit var currentTheme: String
|
||||||
|
private lateinit var pref: SharedPreferences
|
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
|
pref = PreferenceManager.getDefaultSharedPreferences(this)
|
||||||
|
currentTheme = pref.getString("theme_modes", "").toString()
|
||||||
|
|
||||||
|
setFinalTheme(currentTheme)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onResume() {
|
||||||
|
super.onResume()
|
||||||
|
val theme = pref.getString("theme_modes", "")
|
||||||
|
if (currentTheme != theme)
|
||||||
|
recreate()
|
||||||
|
}
|
||||||
|
private fun setFinalTheme(currentTheme: String) {
|
||||||
|
when (currentTheme) {
|
||||||
|
"LIGHT" -> setTheme(R.style.LightTheme_Blue)
|
||||||
|
"DARK" -> setTheme(R.style.DarkTheme_Blue)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
8
app/src/main/res/drawable/discord.xml
Normal file
8
app/src/main/res/drawable/discord.xml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<!-- drawable/discord.xml -->
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:height="34dp"
|
||||||
|
android:width="34dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path android:fillColor="#000" android:pathData="M22,24L16.75,19L17.38,21H4.5A2.5,2.5 0 0,1 2,18.5V3.5A2.5,2.5 0 0,1 4.5,1H19.5A2.5,2.5 0 0,1 22,3.5V24M12,6.8C9.32,6.8 7.44,7.95 7.44,7.95C8.47,7.03 10.27,6.5 10.27,6.5L10.1,6.33C8.41,6.36 6.88,7.53 6.88,7.53C5.16,11.12 5.27,14.22 5.27,14.22C6.67,16.03 8.75,15.9 8.75,15.9L9.46,15C8.21,14.73 7.42,13.62 7.42,13.62C7.42,13.62 9.3,14.9 12,14.9C14.7,14.9 16.58,13.62 16.58,13.62C16.58,13.62 15.79,14.73 14.54,15L15.25,15.9C15.25,15.9 17.33,16.03 18.73,14.22C18.73,14.22 18.84,11.12 17.12,7.53C17.12,7.53 15.59,6.36 13.9,6.33L13.73,6.5C13.73,6.5 15.53,7.03 16.56,7.95C16.56,7.95 14.68,6.8 12,6.8M9.93,10.59C10.58,10.59 11.11,11.16 11.1,11.86C11.1,12.55 10.58,13.13 9.93,13.13C9.29,13.13 8.77,12.55 8.77,11.86C8.77,11.16 9.28,10.59 9.93,10.59M14.1,10.59C14.75,10.59 15.27,11.16 15.27,11.86C15.27,12.55 14.75,13.13 14.1,13.13C13.46,13.13 12.94,12.55 12.94,11.86C12.94,11.16 13.45,10.59 14.1,10.59Z" />
|
||||||
|
</vector>
|
8
app/src/main/res/drawable/github.xml
Normal file
8
app/src/main/res/drawable/github.xml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<!-- drawable/github.xml -->
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:height="34dp"
|
||||||
|
android:width="34dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path android:fillColor="#000" android:pathData="M12,2A10,10 0 0,0 2,12C2,16.42 4.87,20.17 8.84,21.5C9.34,21.58 9.5,21.27 9.5,21C9.5,20.77 9.5,20.14 9.5,19.31C6.73,19.91 6.14,17.97 6.14,17.97C5.68,16.81 5.03,16.5 5.03,16.5C4.12,15.88 5.1,15.9 5.1,15.9C6.1,15.97 6.63,16.93 6.63,16.93C7.5,18.45 8.97,18 9.54,17.76C9.63,17.11 9.89,16.67 10.17,16.42C7.95,16.17 5.62,15.31 5.62,11.5C5.62,10.39 6,9.5 6.65,8.79C6.55,8.54 6.2,7.5 6.75,6.15C6.75,6.15 7.59,5.88 9.5,7.17C10.29,6.95 11.15,6.84 12,6.84C12.85,6.84 13.71,6.95 14.5,7.17C16.41,5.88 17.25,6.15 17.25,6.15C17.8,7.5 17.45,8.54 17.35,8.79C18,9.5 18.38,10.39 18.38,11.5C18.38,15.32 16.04,16.16 13.81,16.41C14.17,16.72 14.5,17.33 14.5,18.26C14.5,19.6 14.5,20.68 14.5,21C14.5,21.27 14.66,21.59 15.17,21.5C19.14,20.16 22,16.42 22,12A10,10 0 0,0 12,2Z" />
|
||||||
|
</vector>
|
9
app/src/main/res/drawable/ic_cloud_upload_black_24dp.xml
Normal file
9
app/src/main/res/drawable/ic_cloud_upload_black_24dp.xml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24.0"
|
||||||
|
android:viewportHeight="24.0">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
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>
|
|
@ -0,0 +1,9 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24.0"
|
||||||
|
android:viewportHeight="24.0">
|
||||||
|
<path
|
||||||
|
android:fillColor="?attr/toolbarBackIcon"
|
||||||
|
android:pathData="M21,11H6.83l3.58,-3.59L9,6l-6,6 6,6 1.41,-1.41L6.83,13H21z"/>
|
||||||
|
</vector>
|
8
app/src/main/res/drawable/telegram.xml
Normal file
8
app/src/main/res/drawable/telegram.xml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<!-- drawable/telegram.xml -->
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:height="34dp"
|
||||||
|
android:width="34dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path android:fillColor="#000" android:pathData="M9.78,18.65L10.06,14.42L17.74,7.5C18.08,7.19 17.67,7.04 17.22,7.31L7.74,13.3L3.64,12C2.76,11.75 2.75,11.14 3.84,10.7L19.81,4.54C20.54,4.21 21.24,4.72 20.96,5.84L18.24,18.65C18.05,19.56 17.5,19.78 16.74,19.36L12.6,16.3L10.61,18.23C10.38,18.46 10.19,18.65 9.78,18.65Z" />
|
||||||
|
</vector>
|
8
app/src/main/res/drawable/twitter.xml
Normal file
8
app/src/main/res/drawable/twitter.xml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<!-- drawable/twitter.xml -->
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:height="34dp"
|
||||||
|
android:width="34dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path android:fillColor="#000" android:pathData="M22.46,6C21.69,6.35 20.86,6.58 20,6.69C20.88,6.16 21.56,5.32 21.88,4.31C21.05,4.81 20.13,5.16 19.16,5.36C18.37,4.5 17.26,4 16,4C13.65,4 11.73,5.92 11.73,8.29C11.73,8.63 11.77,8.96 11.84,9.27C8.28,9.09 5.11,7.38 3,4.79C2.63,5.42 2.42,6.16 2.42,6.94C2.42,8.43 3.17,9.75 4.33,10.5C3.62,10.5 2.96,10.3 2.38,10C2.38,10 2.38,10 2.38,10.03C2.38,12.11 3.86,13.85 5.82,14.24C5.46,14.34 5.08,14.39 4.69,14.39C4.42,14.39 4.15,14.36 3.89,14.31C4.43,16 6,17.26 7.89,17.29C6.43,18.45 4.58,19.13 2.56,19.13C2.22,19.13 1.88,19.11 1.54,19.07C3.44,20.29 5.7,21 8.12,21C16,21 20.33,14.46 20.33,8.79C20.33,8.6 20.33,8.42 20.32,8.23C21.16,7.63 21.88,6.87 22.46,6Z" />
|
||||||
|
</vector>
|
Binary file not shown.
Before Width: | Height: | Size: 468 B |
Binary file not shown.
Before Width: | Height: | Size: 529 B |
Binary file not shown.
Before Width: | Height: | Size: 534 B |
Binary file not shown.
Before Width: | Height: | Size: 423 B |
|
@ -7,6 +7,28 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".ui.AboutActivity">
|
tools:context=".ui.AboutActivity">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
|
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">
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
|
android:id="@+id/about_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"
|
||||||
|
android:background="@android:color/transparent"/>
|
||||||
|
|
||||||
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/mattis_ligma"
|
android:id="@+id/mattis_ligma"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
|
@ -6,14 +6,14 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/home_toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="?attr/actionBarSize"
|
||||||
android:minHeight="?attr/actionBarSize"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:titleTextColor="#F9F9F9"
|
||||||
android:background="@drawable/rectangle_2"/>
|
android:background="@drawable/rectangle_2"/>
|
||||||
|
|
||||||
<com.google.android.material.bottomnavigation.BottomNavigationView
|
<com.google.android.material.bottomnavigation.BottomNavigationView
|
||||||
|
@ -22,16 +22,21 @@
|
||||||
android:layout_height="63dp"
|
android:layout_height="63dp"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:background="?colorSurface"
|
android:background="?colorSurface"
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/frame_layout"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/frame_layout"
|
||||||
app:menu="@menu/bottom_nav_menu" />
|
app:menu="@menu/bottom_nav_menu" />
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/frame_layout"
|
android:id="@+id/frame_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_above="@id/bottom_nav"
|
android:layout_marginTop="53dp"
|
||||||
android:background="?colorSurface"
|
android:layout_marginBottom="63dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent">
|
app:layout_constraintBottom_toTopOf="@id/bottom_nav"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/home_toolbar">
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
|
|
@ -8,9 +8,7 @@
|
||||||
<androidx.core.widget.NestedScrollView
|
<androidx.core.widget.NestedScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:clipToPadding="false"
|
|
||||||
android:fillViewport="true"
|
android:fillViewport="true"
|
||||||
android:layout_marginTop="@dimen/eightdp"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
@ -21,6 +19,7 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
android:layout_marginTop="@dimen/twelvedp"
|
||||||
android:background="?colorSurface">
|
android:background="?colorSurface">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
app:layout_constraintTop_toBottomOf="@id/changelog_text"
|
app:layout_constraintTop_toBottomOf="@id/changelog_text"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:background="?colorSurface">
|
android:background="?colorSurfaceVariant">
|
||||||
|
|
||||||
<com.google.android.material.tabs.TabLayout
|
<com.google.android.material.tabs.TabLayout
|
||||||
android:id="@+id/tablayout"
|
android:id="@+id/tablayout"
|
||||||
|
|
|
@ -21,13 +21,14 @@
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/github_projects_title"
|
android:id="@+id/github_projects_title"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/eightdp"
|
android:layout_marginStart="@dimen/eightdp"
|
||||||
android:layout_marginTop="@dimen/fourdp"
|
android:layout_marginTop="@dimen/fourdp"
|
||||||
android:fontFamily="@font/exo_semibold"
|
android:fontFamily="@font/exo_semibold"
|
||||||
android:text="@string/github_projects"
|
android:text="@string/github_projects"
|
||||||
android:textColor="#ffffff"
|
android:textColor="#ffffff"
|
||||||
|
android:textSize="16sp"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
@ -62,7 +63,7 @@
|
||||||
android:layout_height="35dp"
|
android:layout_height="35dp"
|
||||||
android:background="@android:color/transparent"
|
android:background="@android:color/transparent"
|
||||||
android:backgroundTint="@android:color/transparent"
|
android:backgroundTint="@android:color/transparent"
|
||||||
app:icon="@drawable/vectorgithub"
|
app:icon="@drawable/github"
|
||||||
app:iconGravity="textStart"
|
app:iconGravity="textStart"
|
||||||
app:iconPadding="0dp"
|
app:iconPadding="0dp"
|
||||||
android:gravity="center"/>
|
android:gravity="center"/>
|
||||||
|
@ -98,7 +99,7 @@
|
||||||
app:layout_constraintStart_toEndOf="@id/github_managerbtn"
|
app:layout_constraintStart_toEndOf="@id/github_managerbtn"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@id/github_websitebtn"
|
app:layout_constraintEnd_toStartOf="@id/github_websitebtn"
|
||||||
app:icon="@drawable/vectorgithub"
|
app:icon="@drawable/github"
|
||||||
app:iconGravity="textStart"
|
app:iconGravity="textStart"
|
||||||
app:iconPadding="0dp"
|
app:iconPadding="0dp"
|
||||||
android:gravity="center"/>
|
android:gravity="center"/>
|
||||||
|
@ -137,7 +138,7 @@
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
android:background="@android:color/transparent"
|
android:background="@android:color/transparent"
|
||||||
android:backgroundTint="@android:color/transparent"
|
android:backgroundTint="@android:color/transparent"
|
||||||
app:icon="@drawable/vectorgithub"
|
app:icon="@drawable/github"
|
||||||
app:iconGravity="textStart"
|
app:iconGravity="textStart"
|
||||||
app:iconPadding="0dp"
|
app:iconPadding="0dp"
|
||||||
android:gravity="center"/>
|
android:gravity="center"/>
|
||||||
|
|
|
@ -24,10 +24,11 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/eightdp"
|
android:layout_marginStart="@dimen/eightdp"
|
||||||
android:layout_marginTop="@dimen/fourdp"
|
android:layout_marginTop="4dp"
|
||||||
android:fontFamily="@font/exo_semibold"
|
android:fontFamily="@font/exo_semibold"
|
||||||
android:text="@string/vanced_medias"
|
android:text="@string/vanced_medias"
|
||||||
android:textColor="#ffffff"
|
android:textColor="#ffffff"
|
||||||
|
android:textSize="16sp"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
@ -36,7 +37,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:paddingTop="1dp"
|
android:paddingTop="2dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/social_media_title"
|
app:layout_constraintTop_toBottomOf="@id/social_media_title"
|
||||||
|
@ -63,9 +64,10 @@
|
||||||
android:layout_height="35dp"
|
android:layout_height="35dp"
|
||||||
android:background="@android:color/transparent"
|
android:background="@android:color/transparent"
|
||||||
android:backgroundTint="@android:color/transparent"
|
android:backgroundTint="@android:color/transparent"
|
||||||
app:icon="@drawable/vectordiscord"
|
app:icon="@drawable/discord"
|
||||||
app:iconPadding="0dp"
|
app:iconPadding="0dp"
|
||||||
app:iconGravity="textStart" />
|
app:iconGravity="textStart"
|
||||||
|
app:iconTint="#ffffff"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/discord_text"
|
android:id="@+id/discord_text"
|
||||||
|
@ -95,9 +97,10 @@
|
||||||
android:layout_height="35dp"
|
android:layout_height="35dp"
|
||||||
android:background="@android:color/transparent"
|
android:background="@android:color/transparent"
|
||||||
android:backgroundTint="@android:color/transparent"
|
android:backgroundTint="@android:color/transparent"
|
||||||
app:icon="@drawable/vectortelegram"
|
app:icon="@drawable/telegram"
|
||||||
app:iconPadding="0dp"
|
app:iconPadding="0dp"
|
||||||
app:iconGravity="textStart" />
|
app:iconGravity="textStart"
|
||||||
|
app:iconTint="#ffffff" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/telegram_text"
|
android:id="@+id/telegram_text"
|
||||||
|
@ -126,9 +129,10 @@
|
||||||
android:layout_height="35dp"
|
android:layout_height="35dp"
|
||||||
android:background="@android:color/transparent"
|
android:background="@android:color/transparent"
|
||||||
android:backgroundTint="@android:color/transparent"
|
android:backgroundTint="@android:color/transparent"
|
||||||
app:icon="@drawable/vectortwitter"
|
app:icon="@drawable/twitter"
|
||||||
app:iconPadding="0dp"
|
app:iconPadding="0dp"
|
||||||
app:iconGravity="textStart" />
|
app:iconGravity="textStart"
|
||||||
|
app:iconTint="#ffffff"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/twitter_text"
|
android:id="@+id/twitter_text"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<style name="MainTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
<style name="DarkTheme.Blue">
|
||||||
|
|
||||||
<item name="colorPrimary">#1490D7</item>
|
<item name="colorPrimary">#1490D7</item>
|
||||||
<item name="colorPrimaryVariant">#804EAFF5</item>
|
<item name="colorPrimaryVariant">#804EAFF5</item>
|
||||||
|
@ -21,6 +21,7 @@
|
||||||
<item name="colorDisabled">#808080</item>
|
<item name="colorDisabled">#808080</item>
|
||||||
<item name="colorDisabledVariant">#66808080</item>
|
<item name="colorDisabledVariant">#66808080</item>
|
||||||
<item name="iconColor">?colorPrimaryVariant</item>
|
<item name="iconColor">?colorPrimaryVariant</item>
|
||||||
|
<item name="toolbarBackIcon">?colorOnPrimary</item>
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
|
@ -2,15 +2,13 @@
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<string-array name="theme_modes">
|
<string-array name="theme_modes">
|
||||||
<item>"System based"</item>
|
|
||||||
<item>"Light theme"</item>
|
<item>"Light theme"</item>
|
||||||
<item>"Dark theme"</item>
|
<item>"Dark theme"</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="theme_modes_values">
|
<string-array name="theme_modes_values">
|
||||||
<item>0</item>
|
<item>LIGHT</item>
|
||||||
<item>1</item>
|
<item>DARK</item>
|
||||||
<item>2</item>
|
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="languages">
|
<string-array name="languages">
|
||||||
|
@ -21,4 +19,8 @@
|
||||||
<item>0</item>
|
<item>0</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
|
<string-array name="accent_color">
|
||||||
|
<item>NaN</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
|
@ -1,10 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<attr name="cardStyle" format="reference" />
|
|
||||||
<attr name="colorAccentFallback" format="reference" />
|
|
||||||
<attr name="imageColorTint" format="reference" />
|
|
||||||
<attr name="colorControl" format="reference" />
|
|
||||||
<attr name="colorDisabled" format="color" />
|
<attr name="colorDisabled" format="color" />
|
||||||
<attr name="colorDisabledVariant" format="color" />
|
<attr name="colorDisabledVariant" format="color" />
|
||||||
<attr name="colorSurfaceVariant" format="color" />
|
<attr name="colorSurfaceVariant" format="color" />
|
||||||
|
@ -12,10 +8,6 @@
|
||||||
<attr name="colorOnSurfaceVariant" format="color" />
|
<attr name="colorOnSurfaceVariant" format="color" />
|
||||||
<attr name="colorSurfaceSurfaceVariant" format="color" />
|
<attr name="colorSurfaceSurfaceVariant" format="color" />
|
||||||
<attr name="iconColor" format="reference|color" />
|
<attr name="iconColor" format="reference|color" />
|
||||||
|
<attr name="toolbarBackIcon" format="reference|color"/>
|
||||||
<declare-styleable name="ButtonBarContainerTheme">
|
|
||||||
<attr name="metaButtonBarStyle" format="reference" />
|
|
||||||
<attr name="metaButtonBarButtonStyle" format="reference" />
|
|
||||||
</declare-styleable>
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
|
@ -6,4 +6,14 @@
|
||||||
<item name="android:windowTranslucentNavigation">true</item>
|
<item name="android:windowTranslucentNavigation">true</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="LightTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
|
||||||
|
<item name="android:windowBackground">?colorSurface</item>
|
||||||
|
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="DarkTheme" parent="Theme.MaterialComponents.NoActionBar">
|
||||||
|
<item name="android:windowBackground">?colorSurface</item>
|
||||||
|
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<style name="MainTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
<style name="LightTheme.Blue">
|
||||||
|
|
||||||
<item name="colorPrimary">#1490D7</item>
|
<item name="colorPrimary">#1490D7</item>
|
||||||
<item name="colorPrimaryVariant">#2C7EB9</item>
|
<item name="colorPrimaryVariant">#2C7EB9</item>
|
||||||
|
@ -21,6 +21,7 @@
|
||||||
<item name="colorDisabled">#808080</item>
|
<item name="colorDisabled">#808080</item>
|
||||||
<item name="colorDisabledVariant">#66808080</item>
|
<item name="colorDisabledVariant">#66808080</item>
|
||||||
<item name="iconColor">?colorPrimaryVariant</item>
|
<item name="iconColor">?colorPrimaryVariant</item>
|
||||||
|
<item name="toolbarBackIcon">#111111</item>
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
android:key="update_check"
|
android:key="update_check"
|
||||||
|
@ -14,22 +13,25 @@
|
||||||
android:icon="@drawable/ic_brush_black_24dp"
|
android:icon="@drawable/ic_brush_black_24dp"
|
||||||
android:key="theme_modes"
|
android:key="theme_modes"
|
||||||
android:title="Theme"
|
android:title="Theme"
|
||||||
android:summary="Choose your prefered theme"
|
android:summary="Choose your preferred theme"
|
||||||
android:entries="@array/theme_modes"
|
android:entries="@array/theme_modes"
|
||||||
android:entryValues="@array/theme_modes_values"
|
android:entryValues="@array/theme_modes_values"
|
||||||
android:defaultValue="1"/>
|
android:defaultValue="DARK"/>
|
||||||
|
|
||||||
<ListPreference
|
<ListPreference
|
||||||
android:icon="@drawable/ic_palette_black_24dp"
|
android:icon="@drawable/ic_palette_black_24dp"
|
||||||
android:key="accent_color"
|
android:key="accent_color"
|
||||||
android:title="Accent Color"/>
|
android:title="Accent Color"
|
||||||
|
android:entries="@array/accent_color"
|
||||||
|
android:entryValues="@array/accent_color"/>
|
||||||
|
|
||||||
<ListPreference
|
<ListPreference
|
||||||
android:key="language"
|
android:key="language"
|
||||||
android:icon="@drawable/ic_language_black_24dp"
|
android:icon="@drawable/ic_language_black_24dp"
|
||||||
android:title="Language"
|
android:title="Language"
|
||||||
android:summary="Choose your prefered language"
|
android:summary="Choose your preffered language"
|
||||||
android:entries="@array/languages"/>
|
android:entries="@array/languages"
|
||||||
|
android:entryValues="@array/languages_value"/>
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue