You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
load the default Application theme on startup
This commit is contained in:
@@ -100,6 +100,9 @@ public class Context extends Object {
|
||||
Class<? extends Application> cls = Class.forName(className).asSubclass(Application.class);
|
||||
Constructor<? extends Application> constructor = cls.getConstructor();
|
||||
application = constructor.newInstance();
|
||||
ResXmlAttribute application_theme = manifest.getApplicationElement().searchAttributeByResourceId(AndroidManifestBlock.ID_theme);
|
||||
if (application_theme != null)
|
||||
application.setTheme(application_theme.getData());
|
||||
this_application = application;
|
||||
return application;
|
||||
}
|
||||
|
||||
@@ -1211,7 +1211,7 @@ public class Resources {
|
||||
* if not already defined in the theme.
|
||||
*/
|
||||
public void applyStyle(int resid, boolean force) {
|
||||
themeMap = mAssets.loadStyle(resid);
|
||||
themeMap.putAll(mAssets.loadStyle(resid));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user