List of utility methods to do Activity Set
void | setDisplayHomeAsUpEnabled(Activity a, boolean enabled) set Display Home As Up Enabled a.getActionBar().setDisplayHomeAsUpEnabled(enabled); |
boolean | setNavigationSelected(Activity activity, ArrayAdapter set Navigation Selected ActionBar actionBar = activity.getActionBar(); if (actionBar != null) { int setPosition = adapter.getPosition(selected); actionBar.setSelectedNavigationItem(setPosition); return true; return false; |
boolean | setNavigationList(Activity activity, SpinnerAdapter adapter, ActionBar.OnNavigationListener listener) set Navigation List ActionBar actionBar = activity.getActionBar(); if (actionBar != null) { actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST); actionBar.setListNavigationCallbacks(adapter, listener); return true; return false; |
void | setDisplayHomeAsUpEnabled(Activity activity, boolean b) set Display Home As Up Enabled ActionBar actionBar = activity.getActionBar();
if (actionBar != null) {
actionBar.setDisplayHomeAsUpEnabled(b);
|
void | setDisplayHomeAsUpEnabled(Activity activity, boolean b) set Display Home As Up Enabled ActionBar actionBar = activity.getActionBar();
if (actionBar != null) {
actionBar.setDisplayHomeAsUpEnabled(b);
|
void | onCreateSetTheme(Activity activity) Set the theme of the activity, according to the configuration. switch (cTheme) { default: case THEME_DEFAULT: break; case THEME_WHITE: activity.setTheme(android.R.style.Theme_Light_NoTitleBar); break; case THEME_BLACK: ... |
RelativeLayout | addView(Activity act, View v, Rect rect) add View RelativeLayout rl = new RelativeLayout(act); ViewGroup fl = (ViewGroup) act.findViewById(android.R.id.content); fl = (ViewGroup) fl.getChildAt(0); fl.addView(rl, new FrameLayout.LayoutParams(-1, -1)); RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams( rect.width(), rect.height()); params.setMargins(rect.left, rect.top, 0, 0); rl.addView(v, params); ... |
void | enableHardwareAccelerate(Activity activity) enable Hardware Accelerate if (VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB) {
activity.getWindow().setFlags(
WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED,
WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED);
|