android studio android studio change app bar text color code example
Example 1: android studio change button color programmatically
Button11.setBackgroundColor(getResources().getColor(R.color.red));
Button11.setBackgroundColor(Button11.getContext().getResources().getColor(R.color.red));
Example 2: statusbar text color android
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
getWindow().setStatusBarColor(ContextCompat.getColor(MainActivity.this,R.color.colorPrimaryDark));