mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-13 22:00:30 +05:30
App Title follows Material You
This commit is contained in:
parent
530a193619
commit
14ca137daf
@ -11,6 +11,7 @@ import android.os.Build
|
|||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.os.Handler
|
import android.os.Handler
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
|
import android.util.TypedValue
|
||||||
import android.view.*
|
import android.view.*
|
||||||
import android.view.inputmethod.InputMethodManager
|
import android.view.inputmethod.InputMethodManager
|
||||||
import android.widget.Button
|
import android.widget.Button
|
||||||
@ -31,6 +32,7 @@ import com.google.android.material.bottomnavigation.BottomNavigationView
|
|||||||
import com.google.android.material.color.DynamicColors
|
import com.google.android.material.color.DynamicColors
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
|
|
||||||
class MainActivity : AppCompatActivity() {
|
class MainActivity : AppCompatActivity() {
|
||||||
val TAG = "MainActivity"
|
val TAG = "MainActivity"
|
||||||
lateinit var bottomNavigationView: BottomNavigationView
|
lateinit var bottomNavigationView: BottomNavigationView
|
||||||
@ -118,7 +120,9 @@ class MainActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
toolbar = findViewById(R.id.toolbar)
|
toolbar = findViewById(R.id.toolbar)
|
||||||
val hexColor = String.format("#%06X", 0xFFFFFF and 0xcc322d)
|
val typedValue = TypedValue()
|
||||||
|
this.theme.resolveAttribute(R.attr.colorPrimaryDark ,typedValue, true);
|
||||||
|
val hexColor = String.format("#%06X", (0xFFFFFF and typedValue.data))
|
||||||
val appName = HtmlCompat.fromHtml(
|
val appName = HtmlCompat.fromHtml(
|
||||||
"Libre<span style='color:$hexColor';>Tube</span>",
|
"Libre<span style='color:$hexColor';>Tube</span>",
|
||||||
HtmlCompat.FROM_HTML_MODE_COMPACT
|
HtmlCompat.FROM_HTML_MODE_COMPACT
|
||||||
|
Loading…
Reference in New Issue
Block a user