【发布时间】:2015-04-21 18:38:07
【问题描述】:
我在Android中的应用程序之间进行交换,我传递了一系列参数来自定义另一个应用程序(颜色,徽标等),但是我找不到我传递的样式,我只能找到drawables,颜色,布局。
有没有办法找到样式?
我在用这个
Intent intent = new Intent();
intent.setClassName("com.app.to.call", "com.app.to.call.LoginActivity");
intent.putExtra("package", getPackageName());
intent.putExtra("style", R.style.AppTheme);
startActivity(intent);
来自我正在使用的其他应用
if(customization.getKeys().getString(Global.LINK_PACKAGE) == null) {
customization = null;
}else{
Resources resources = getPackageManager().getResourcesForApplication(customization.getKeys().getString(Global.LINK_PACKAGE));
container.setBackgroundColor(resources.getColor(customization.getKeys().getInt(Global.LINK_BACKGROUND_COLOR)));
setTheme();//How can I get the style?
}
customization.getKeys() 是我传递的键。
【问题讨论】:
标签: android android-resources android-styles android-runtime