Search in sources :

Example 86 with ActionBar

use of android.app.ActionBar in project presentations by eburke.

the class LocationActivity method onCreate.

@Override
public void onCreate(Bundle state) {
    super.onCreate(state);
    setContentView(R.layout.location_activity);
    ActionBar ab = getActionBar();
    ab.setDisplayHomeAsUpEnabled(true);
    ab.setTitle(R.string.locations);
}
Also used : ActionBar(android.app.ActionBar)

Example 87 with ActionBar

use of android.app.ActionBar in project cardslib by gabrielemariotti.

the class AnimateStaggeredGridFragment method populateNavigationList.

/**
     * Populate the downDownValues to select the different animations
     */
private void populateNavigationList() {
    getActivity().getActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
    final String[] dropdownValues = { "Alpha", "Left", "Right", "Bottom", "Bottom right", "Scale" };
    ActionBar actionBar = getActivity().getActionBar();
    // Specify a SpinnerAdapter to populate the dropdown list.
    ArrayAdapter<String> adapter = new ArrayAdapter<String>(actionBar.getThemedContext(), android.R.layout.simple_spinner_item, android.R.id.text1, dropdownValues);
    adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    // Set up the dropdown list navigation in the action bar.
    actionBar.setListNavigationCallbacks(adapter, this);
}
Also used : ActionBar(android.app.ActionBar) CardGridStaggeredArrayAdapter(it.gmariotti.cardslib.library.extra.staggeredgrid.internal.CardGridStaggeredArrayAdapter) ArrayAdapter(android.widget.ArrayAdapter)

Example 88 with ActionBar

use of android.app.ActionBar in project cardslib by gabrielemariotti.

the class ListViewAnimationsFragment method populateNavigationList.

/**
     * Populate the downDownValues to select the different animations
     */
private void populateNavigationList() {
    getActivity().getActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
    final String[] dropdownValues = { "Alpha", "Left", "Right", "Bottom", "Bottom right", "Scale" };
    ActionBar actionBar = getActivity().getActionBar();
    // Specify a SpinnerAdapter to populate the dropdown list.
    ArrayAdapter<String> adapter = new ArrayAdapter<String>(actionBar.getThemedContext(), android.R.layout.simple_spinner_item, android.R.id.text1, dropdownValues);
    adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    // Set up the dropdown list navigation in the action bar.
    actionBar.setListNavigationCallbacks(adapter, this);
}
Also used : ActionBar(android.app.ActionBar) CardArrayAdapter(it.gmariotti.cardslib.library.internal.CardArrayAdapter) ArrayAdapter(android.widget.ArrayAdapter)

Example 89 with ActionBar

use of android.app.ActionBar in project k-9 by k9mail.

the class MessageCompose method initializeActionBar.

private void initializeActionBar() {
    ActionBar actionBar = getActionBar();
    actionBar.setDisplayHomeAsUpEnabled(true);
}
Also used : ActionBar(android.app.ActionBar)

Example 90 with ActionBar

use of android.app.ActionBar in project Talon-for-Twitter by klinker24.

the class ConfigurePagerActivity method setUpDoneDiscard.

public void setUpDoneDiscard() {
    LayoutInflater inflater = (LayoutInflater) getActionBar().getThemedContext().getSystemService(LAYOUT_INFLATER_SERVICE);
    final View customActionBarView = inflater.inflate(R.layout.actionbar_done_discard, null);
    TextView doneButton = (TextView) customActionBarView.findViewById(R.id.done);
    doneButton.setText(getResources().getString(R.string.done_label));
    customActionBarView.findViewById(R.id.actionbar_done).setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            int currentAccount = sharedPrefs.getInt("current_account", 1);
            SharedPreferences.Editor editor = sharedPrefs.edit();
            for (int i = 0; i < chooserAdapter.getCount(); i++) {
                if (chooserAdapter.getItem(i) instanceof ChooserFragment) {
                    ChooserFragment f = (ChooserFragment) chooserAdapter.getItem(i);
                    int num = i + 1;
                    editor.putInt("account_" + currentAccount + "_page_" + num, f.type);
                    editor.putLong("account_" + currentAccount + "_list_" + num + "_long", f.listId);
                    editor.putString("account_" + currentAccount + "_name_" + num, f.listName);
                    editor.putString("account_" + currentAccount + "_search_" + num, f.searchQuery);
                    if (f.check != null && f.check.isChecked()) {
                        editor.putInt("default_timeline_page_" + currentAccount, i);
                    }
                }
            }
            editor.commit();
            onBackPressed();
        }
    });
    customActionBarView.findViewById(R.id.actionbar_discard).setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            onBackPressed();
        }
    });
    // Show the custom action bar view and hide the normal Home icon and title.
    final ActionBar actionBar = getActionBar();
    actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM, ActionBar.DISPLAY_SHOW_CUSTOM | ActionBar.DISPLAY_SHOW_HOME | ActionBar.DISPLAY_SHOW_TITLE);
    actionBar.setCustomView(customActionBarView, new ActionBar.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
}
Also used : TextView(android.widget.TextView) TextView(android.widget.TextView) 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