Search in sources :

Example 1 with AdultCategoryWrapFragment

use of io.recom.howabout.category.adult.fragment.AdultCategoryWrapFragment in project howabout-android by recomio.

the class MainActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    categoryStrings = getResources().getStringArray(R.array.category_list);
    musicPlaylistTitle = getResources().getString(R.string.title_activity_music_playlist);
    exit = getResources().getString(R.string.exit);
    ActionBar actionBar = getSupportActionBar();
    actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
    actionBar.setDisplayShowTitleEnabled(false);
    // dropdown menu in actionBar.
    final SpinnerAdapter spinnerAdapter = ArrayAdapter.createFromResource(this, R.array.category_list, android.R.layout.simple_list_item_1);
    actionBar.setListNavigationCallbacks(spinnerAdapter, new HowaboutDropdownNavigationListener());
    // set framgents.
    adultCategoryWrapFragment = new AdultCategoryWrapFragment();
    Bundle adultCategoryWrapFragmentBundle = new Bundle();
    adultCategoryWrapFragmentBundle.putString("category", "adult");
    adultCategoryWrapFragment.setArguments(adultCategoryWrapFragmentBundle);
    musicCategoryWrapFragment = new MusicCategoryWrapFragment();
    Bundle musicCategoryWrapFragmentBundle = new Bundle();
    musicCategoryWrapFragmentBundle.putString("category", "music");
    musicCategoryWrapFragment.setArguments(musicCategoryWrapFragmentBundle);
    setAdsContainer(R.id.adView);
}
Also used : SpinnerAdapter(android.widget.SpinnerAdapter) MusicCategoryWrapFragment(io.recom.howabout.category.music.fragment.MusicCategoryWrapFragment) Bundle(android.os.Bundle) AdultCategoryWrapFragment(io.recom.howabout.category.adult.fragment.AdultCategoryWrapFragment) ActionBar(com.actionbarsherlock.app.ActionBar)

Aggregations

Bundle (android.os.Bundle)1 SpinnerAdapter (android.widget.SpinnerAdapter)1 ActionBar (com.actionbarsherlock.app.ActionBar)1 AdultCategoryWrapFragment (io.recom.howabout.category.adult.fragment.AdultCategoryWrapFragment)1 MusicCategoryWrapFragment (io.recom.howabout.category.music.fragment.MusicCategoryWrapFragment)1