use of android.app.ActionBar in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class IccLockSettings method onActivityCreated.
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
Intent intent = getActivity().getIntent();
ActionBar actionBar = getActivity().getActionBar();
if (actionBar != null) {
actionBar.setSubtitle(intent.getStringExtra(EXTRA_SUB_DISPLAY_NAME));
}
int subId = intent.getIntExtra(EXTRA_SUB_ID, SubscriptionManager.getDefaultSubscriptionId());
int phoneId = SubscriptionManager.getPhoneId(subId);
mPhone = PhoneFactory.getPhone(phoneId);
}
use of android.app.ActionBar in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class SubActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ActionBar actionBar = getActionBar();
if (actionBar != null) {
actionBar.setDisplayHomeAsUpEnabled(true);
}
String fragmentExtra = getIntent().getStringExtra(EXTRA_FRAGMENT_CLASS);
if (fragmentExtra != null && !fragmentExtra.isEmpty()) {
try {
Class<?> fragmentClass = Class.forName(fragmentExtra);
Fragment fragment = (Fragment) fragmentClass.newInstance();
getFragmentManager().beginTransaction().replace(android.R.id.content, fragment).commit();
} catch (Exception e) {
e.printStackTrace();
}
}
String title = getIntent().getStringExtra(EXTRA_TITLE);
if (title != null && !title.isEmpty()) {
setTitle(title);
}
}
use of android.app.ActionBar in project Bitocle by mthli.
the class WebViewActivity method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.webview);
Intent intent = getIntent();
String title = intent.getStringExtra(getString(R.string.webview_intent_title));
String subTitle = intent.getStringExtra(getString(R.string.webview_intent_subtitle));
ActionBar actionBar = getActionBar();
actionBar.setTitle(title);
actionBar.setSubtitle(subTitle);
actionBar.setDisplayShowHomeEnabled(false);
actionBar.setDisplayHomeAsUpEnabled(true);
fragment = (WebViewFragment) getSupportFragmentManager().findFragmentById(R.id.webview_fragment);
preferences = getSharedPreferences(getString(R.string.login_sp), MODE_PRIVATE);
editor = preferences.edit();
layoutParams = getWindow().getAttributes();
}
use of android.app.ActionBar in project SherlockNavigationDrawer by nicolasjafelle.
the class SherlockActionBarDrawerToggleHoneycomb method setActionBarDescription.
public static Object setActionBarDescription(Object info, Activity activity, int contentDescRes) {
if (info == null) {
info = new SetIndicatorInfo(activity);
}
final SetIndicatorInfo sii = (SetIndicatorInfo) info;
if (sii.setHomeAsUpIndicator != null) {
try {
final ActionBar actionBar = activity.getActionBar();
sii.setHomeActionContentDescription.invoke(actionBar, contentDescRes);
} catch (Exception e) {
Log.w(TAG, "Couldn't set content description via JB-MR2 API", e);
}
}
return info;
}
use of android.app.ActionBar in project UltimateAndroid by cymcsg.
the class RecyclerViewPlayGroundActivity method restoreActionBar.
public void restoreActionBar() {
ActionBar actionBar = getActionBar();
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
actionBar.setDisplayShowTitleEnabled(true);
actionBar.setTitle(mTitle);
}
Aggregations