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);
}
Aggregations