How do I get styles from Android Resources class?

I run between apps in Android, I pass a number of parameters to customize another app (colors, logos, etc.), but I cannot find the styles I pass, I can only find drawings, colors, layouts.

Is there a way to find styles?

I am using this

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);

      

From the app I am using

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?
        }

      

where customization.getKeys () are the keys I am passing in.

+3


source to share


1 answer


Remember that an R class between two applications can have the same name variable, but a different value. I do not recommend passing R values ​​between applications



0


source







All Articles