Search in sources :

Example 56 with ActionBar

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);
}
Also used : Intent(android.content.Intent) ActionBar(android.app.ActionBar)

Example 57 with ActionBar

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);
    }
}
Also used : Fragment(android.app.Fragment) ActionBar(android.app.ActionBar)

Example 58 with ActionBar

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();
}
Also used : Intent(android.content.Intent) ActionBar(android.app.ActionBar)

Example 59 with ActionBar

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;
}
Also used : ActionBar(android.app.ActionBar)

Example 60 with ActionBar

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);
}
Also used : ActionBar(android.app.ActionBar)

Aggregations

ActionBar (android.app.ActionBar)158 View (android.view.View)37 Intent (android.content.Intent)19 AdapterView (android.widget.AdapterView)11 TextView (android.widget.TextView)11 ListView (android.widget.ListView)9 SharedPreferences (android.content.SharedPreferences)8 Uri (android.net.Uri)7 ArrayAdapter (android.widget.ArrayAdapter)7 FrameLayout (android.widget.FrameLayout)7 SpannableString (android.text.SpannableString)6 BitmapRegionTileSource (com.android.photos.BitmapRegionTileSource)6 GridLayoutManager (android.support.v7.widget.GridLayoutManager)5 RecyclerView (android.support.v7.widget.RecyclerView)5 CircularProgressButton (com.dd.CircularProgressButton)5 CircularProgressButton (com.marshalchen.common.uimodule.circularProgressButton.CircularProgressButton)5 SuppressLint (android.annotation.SuppressLint)4 Bundle (android.os.Bundle)4 ViewPager (android.support.v4.view.ViewPager)4 MenuInflater (android.view.MenuInflater)4