Amoled Theme feature
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import static ru.vtosters.lite.utils.Themes.amoled;
|
||||
|
||||
import android.util.Base64;
|
||||
import android.util.Log;
|
||||
import android.webkit.WebView;
|
||||
@@ -50,7 +52,7 @@ public class VKUIInjector {
|
||||
.replace("%background_content%", Themes.hex(Themes.getColorFromAttr(R.attr.background_content)))
|
||||
.replace("%text_primary%", Themes.hex(Themes.getColorFromAttr(R.attr.text_primary)));
|
||||
|
||||
// loadedCSSAmoled = load("vt_ui_oled.css");
|
||||
loadedCSSAmoled = load("vt_ui_oled.css");
|
||||
isLoaded = true;
|
||||
}
|
||||
|
||||
@@ -65,11 +67,13 @@ public class VKUIInjector {
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (true/*Themes.isAccentedCache()*/) {
|
||||
Log.d("VKUI", "Injecting Accent");
|
||||
sb.append("\n\n");
|
||||
sb.append(loadedCSS);
|
||||
}
|
||||
Log.d("VKUI", "Final CSS: " + sb.toString());
|
||||
if (amoled() == true) {
|
||||
sb.append("\n\n");
|
||||
sb.append(loadedCSSAmoled);
|
||||
}
|
||||
inject(webView, Base64.encodeToString(sb.toString().getBytes(), 2));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user