navbar coloring (s0v@ killer tbh)
This commit is contained in:
@@ -70,31 +70,31 @@ public class Themes {
|
||||
}
|
||||
|
||||
public static int getAccentColor() {
|
||||
return getColorFromAttr(R.attr.accent);
|
||||
return getColorFromAttr(getAttrId("accent"));
|
||||
} // Color accent
|
||||
|
||||
public static int getTextAttr() {
|
||||
return getColorFromAttr(R.attr.text_primary);
|
||||
return getColorFromAttr(getAttrId("text_primary"));
|
||||
} // Text Primary color
|
||||
|
||||
public static int getSTextAttr() {
|
||||
return getColorFromAttr(R.attr.text_secondary);
|
||||
return getColorFromAttr(getAttrId("text_secondary"));
|
||||
} // Text Secondary color
|
||||
|
||||
public static int getTabbarBackground() {
|
||||
return getColorFromAttr(R.attr.tabbar_background);
|
||||
return getColorFromAttr(getAttrId("tabbar_background"));
|
||||
} // Tabbar/Navbar background
|
||||
|
||||
public static int getBackgroundContent() {
|
||||
return getColorFromAttr(R.attr.background_content);
|
||||
return getColorFromAttr(getAttrId("background_content"));
|
||||
} // Background color in app
|
||||
|
||||
public static int getHeaderBackground() {
|
||||
return getColorFromAttr(R.attr.header_background);
|
||||
return getColorFromAttr(getAttrId("header_background"));
|
||||
} // Toolbar/Header background
|
||||
|
||||
public static int getHeaderText() {
|
||||
return getColorFromAttr(R.attr.header_text);
|
||||
return getColorFromAttr(getAttrId("header_text"));
|
||||
} // Header/Toolbar color text
|
||||
|
||||
public static int getAmoledTheme() {
|
||||
@@ -185,10 +185,8 @@ public class Themes {
|
||||
} // Accent colors
|
||||
|
||||
public static void themeMonetToolbar(ImageButton imageButton, Toolbar toolbar) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
imageButton.setImageTintList(ColorStateList.valueOf(getHeaderText()));
|
||||
toolbar.setElevation(0.0f);
|
||||
}
|
||||
imageButton.setImageTintList(ColorStateList.valueOf(getHeaderText()));
|
||||
toolbar.setElevation(0.0f);
|
||||
}
|
||||
|
||||
public static Drawable recolorDrawable(Drawable drawable) {
|
||||
@@ -306,10 +304,7 @@ public class Themes {
|
||||
if (isColorRefAccented(i) && isAndroidMonet()) {
|
||||
return getAccentColor();
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= 23) {
|
||||
return context.getColor(i);
|
||||
}
|
||||
return getResources().getColor(i);
|
||||
return context.getColor(i);
|
||||
} // Android Support color injector + accent color checker
|
||||
|
||||
public static int getColor2(int i) {
|
||||
@@ -320,7 +315,7 @@ public class Themes {
|
||||
} // Android Support color injector + accent color checker
|
||||
|
||||
public static void setNavbarColor(Window window, int i) {
|
||||
if (navbar() && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
if (navbar()) {
|
||||
window.setNavigationBarColor(getTabbarBackground());
|
||||
window.getDecorView().setSystemUiVisibility(getNeededColorNavbar());
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
VERSION_BUILD=4d3f262
|
||||
VERSION_BUILD=6187eec
|
||||
VERSION_BRANCH=vtl-remaster
|
||||
VERSION_BASE=
|
||||
VERSION_BRANCHID=vtl-remaster
|
||||
VERSION_BRANCHTYPE=vtl-remaster
|
||||
VERSION_COMMIT=4d3f262d59dbf763288636607d920e7093f7d793
|
||||
VERSION_COMMIT=6187eecac5a727c7325e4b30d0b6a1b08dd5dc7f
|
||||
VERSION_GRADLE=
|
||||
VERSION_DISPLAY=vtl-remaster-4d3f262-dirty
|
||||
VERSION_FULL=vtl-remaster-4d3f262-dirty
|
||||
VERSION_DISPLAY=vtl-remaster-6187eec-dirty
|
||||
VERSION_FULL=vtl-remaster-6187eec-dirty
|
||||
VERSION_SCM=git
|
||||
VERSION_TAG=
|
||||
VERSION_LAST_TAG=v0.2.9-beta2
|
||||
|
||||
@@ -147,6 +147,8 @@
|
||||
.line 11
|
||||
invoke-virtual {p2, v0}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {p2, v0}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
.line 12
|
||||
:cond_0
|
||||
new-instance p2, Lcom/my/target/WebViewBrowser;
|
||||
|
||||
@@ -846,6 +846,8 @@
|
||||
|
||||
invoke-virtual {v8, v4}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {v8, v4}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
.line 37
|
||||
:cond_3
|
||||
iget-object v4, v0, Lcom/vk/attachpicker/PhotoVideoAttachActivity;->L:Lcom/vk/attachpicker/widget/AttachCounterView;
|
||||
|
||||
@@ -188,6 +188,8 @@
|
||||
.line 13
|
||||
invoke-virtual {v0, v1}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {v0, v1}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
const/4 v1, 0x0
|
||||
|
||||
if-eqz p1, :cond_0
|
||||
@@ -221,6 +223,8 @@
|
||||
.line 15
|
||||
invoke-virtual {v0, p1}, Landroid/view/Window;->setNavigationBarColor(I)V
|
||||
|
||||
invoke-static {p0, p1}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
.line 16
|
||||
new-instance v1, Landroid/graphics/drawable/ColorDrawable;
|
||||
|
||||
|
||||
@@ -96,6 +96,8 @@
|
||||
:cond_0
|
||||
invoke-virtual {p0, p1}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {p0, p1}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
:cond_1
|
||||
return-void
|
||||
.end method
|
||||
@@ -157,6 +159,8 @@
|
||||
:goto_0
|
||||
invoke-virtual {p0, p1}, Landroid/view/Window;->setNavigationBarColor(I)V
|
||||
|
||||
invoke-static {p0, p1}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
:cond_1
|
||||
return-void
|
||||
.end method
|
||||
@@ -220,6 +224,8 @@
|
||||
|
||||
invoke-virtual {p0, p2}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {p0, p2}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
.line 20
|
||||
invoke-static {}, Lcom/vk/core/util/OsUtil;->b()Z
|
||||
|
||||
|
||||
@@ -620,6 +620,8 @@
|
||||
.line 31
|
||||
invoke-virtual {p1, v0}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {p1, v0}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
.line 32
|
||||
iget-boolean v0, p0, Lcom/vk/core/tips/TipTextWindow;->l:Z
|
||||
|
||||
|
||||
@@ -979,6 +979,8 @@
|
||||
|
||||
invoke-virtual {p0, p1}, Landroid/view/Window;->setNavigationBarColor(I)V
|
||||
|
||||
invoke-static {p0, p1}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
return-void
|
||||
|
||||
.line 68
|
||||
@@ -999,6 +1001,8 @@
|
||||
.line 70
|
||||
invoke-virtual {p0, p1}, Landroid/view/Window;->setNavigationBarColor(I)V
|
||||
|
||||
invoke-static {p0, p1}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
const/4 p0, 0x1
|
||||
|
||||
if-nez p1, :cond_2
|
||||
|
||||
@@ -153,6 +153,8 @@
|
||||
.line 15
|
||||
invoke-virtual {v0, p3}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {v0, p3}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
:cond_2
|
||||
return-void
|
||||
.end method
|
||||
|
||||
@@ -223,6 +223,8 @@
|
||||
|
||||
invoke-virtual {p0, p1}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {p0, p1}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
.line 6
|
||||
:cond_0
|
||||
invoke-static {}, Lcom/vk/extensions/ActivityExt;->a()Z
|
||||
|
||||
@@ -357,6 +357,8 @@
|
||||
|
||||
invoke-virtual {v0, v1}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {v0, v1}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
:cond_2
|
||||
return-void
|
||||
.end method
|
||||
|
||||
@@ -164,6 +164,8 @@
|
||||
|
||||
invoke-virtual {v0, v1}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {v0, v1}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
.line 9
|
||||
:cond_2
|
||||
invoke-static {p0}, Lcom/vk/core/ui/themes/VKThemeHelper;->d(Landroid/app/Activity;)V
|
||||
|
||||
@@ -2473,6 +2473,8 @@
|
||||
:goto_2
|
||||
invoke-virtual {v1, v3}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {v1, v3}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
.line 46
|
||||
instance-of v1, p1, Lcom/vk/navigation/b0/FragmentWithCustomNavigationBar;
|
||||
|
||||
|
||||
@@ -561,6 +561,8 @@
|
||||
|
||||
invoke-virtual {p1, v0}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {p1, v0}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
.line 14
|
||||
invoke-virtual {p0}, Landroid/app/Activity;->getWindow()Landroid/view/Window;
|
||||
|
||||
|
||||
@@ -144,6 +144,8 @@
|
||||
.line 5
|
||||
invoke-virtual {v0, v1}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {v0, v1}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
const/4 v0, 0x0
|
||||
|
||||
if-eqz p1, :cond_0
|
||||
|
||||
@@ -183,6 +183,8 @@
|
||||
.line 6
|
||||
invoke-virtual {v0, v1}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {v0, v1}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
const/4 v0, 0x0
|
||||
|
||||
if-eqz p1, :cond_0
|
||||
|
||||
@@ -304,6 +304,8 @@
|
||||
|
||||
invoke-virtual {v0, v1}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {v0, v1}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
:cond_0
|
||||
const/4 v0, 0x0
|
||||
|
||||
@@ -373,6 +375,8 @@
|
||||
:goto_0
|
||||
invoke-virtual {v0, v2}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {v0, v2}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
const/4 v0, 0x1
|
||||
|
||||
.line 4
|
||||
|
||||
@@ -1165,6 +1165,8 @@
|
||||
|
||||
invoke-virtual {v0, v1}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {v0, v1}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
.line 4
|
||||
:cond_0
|
||||
iget-object v0, p0, Lcom/vk/wall/thread/CommentThreadFragment;->R:Lcom/vtosters/lite/o0/CommentsAdapter;
|
||||
|
||||
@@ -196,6 +196,8 @@
|
||||
:cond_0
|
||||
invoke-virtual {p1, p2}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {p1, p2}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
:cond_1
|
||||
return-void
|
||||
.end method
|
||||
@@ -261,6 +263,8 @@
|
||||
:goto_0
|
||||
invoke-virtual {p1, p2}, Landroid/view/Window;->setNavigationBarColor(I)V
|
||||
|
||||
invoke-static {p1, p2}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
:cond_1
|
||||
return-void
|
||||
.end method
|
||||
|
||||
@@ -791,6 +791,8 @@
|
||||
|
||||
invoke-virtual {v0, v1}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {v0, v1}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
.line 3
|
||||
:cond_0
|
||||
invoke-super {p0, p1}, Lcom/vtosters/lite/VKActivity;->onActionModeFinished(Landroid/view/ActionMode;)V
|
||||
@@ -839,6 +841,8 @@
|
||||
|
||||
invoke-virtual {p1, v0}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {p1, v0}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
:cond_0
|
||||
return-void
|
||||
.end method
|
||||
|
||||
@@ -309,6 +309,8 @@
|
||||
|
||||
invoke-virtual {p1, v0}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {p1, v0}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
:cond_0
|
||||
return-void
|
||||
.end method
|
||||
@@ -348,6 +350,8 @@
|
||||
|
||||
invoke-virtual {p1, v0}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {p1, v0}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
:cond_0
|
||||
return-void
|
||||
.end method
|
||||
|
||||
@@ -746,6 +746,8 @@
|
||||
|
||||
.line 66
|
||||
invoke-virtual {p0, p1}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {p0, p1}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
:try_end_0
|
||||
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
||||
|
||||
|
||||
+2
@@ -84,6 +84,8 @@
|
||||
|
||||
invoke-virtual {p1, v0}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {p1, v0}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
return-void
|
||||
.end method
|
||||
|
||||
|
||||
@@ -434,6 +434,8 @@
|
||||
|
||||
invoke-virtual {v0, p3}, Landroid/view/Window;->setStatusBarColor(I)V
|
||||
|
||||
invoke-static {v0, p3}, Lru/vtosters/lite/utils/Themes;->setNavbarColor(Landroid/view/Window;I)V
|
||||
|
||||
goto :goto_0
|
||||
|
||||
:cond_0
|
||||
|
||||
Reference in New Issue
Block a user