本文整理匯總了Java中com.eveningoutpost.dexdrip.NavDrawerBuilder類的典型用法代碼示例。如果您正苦於以下問題:Java NavDrawerBuilder類的具體用法?Java NavDrawerBuilder怎麽用?Java NavDrawerBuilder使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
NavDrawerBuilder類屬於com.eveningoutpost.dexdrip包,在下文中一共展示了NavDrawerBuilder類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onResume
import com.eveningoutpost.dexdrip.NavDrawerBuilder; //導入依賴的package包/類
@Override
protected void onResume(){
super.onResume();
menu_name = getMenuName();
NavDrawerBuilder navDrawerBuilder = new NavDrawerBuilder(getApplicationContext());
List<String> menu_option_list = navDrawerBuilder.nav_drawer_options;
menu_position = menu_option_list.indexOf(menu_name);
mNavigationDrawerFragment = (NavigationDrawerFragment) getFragmentManager().findFragmentById(R.id.navigation_drawer);
mNavigationDrawerFragment.setUp(R.id.navigation_drawer, (DrawerLayout) findViewById(R.id.drawer_layout), menu_name, this);
}
示例2: onNavigationDrawerItemSelected
import com.eveningoutpost.dexdrip.NavDrawerBuilder; //導入依賴的package包/類
@Override
public void onNavigationDrawerItemSelected(int position) {
NavDrawerBuilder navDrawerBuilder = new NavDrawerBuilder(getApplicationContext());
List<String> menu_option_list = navDrawerBuilder.nav_drawer_options;
List<Intent> intent_list = navDrawerBuilder.nav_drawer_intents;
if (position != menu_position) {
startActivity(intent_list.get(position));
//do not close activity if it is the Launcher or "Home".
if (!getMenuName().equalsIgnoreCase(getString(R.string.home_screen))) {
finish();
}
}
}
示例3: onResume
import com.eveningoutpost.dexdrip.NavDrawerBuilder; //導入依賴的package包/類
@Override
protected void onResume(){
super.onResume();
menu_name = getMenuName();
NavDrawerBuilder navDrawerBuilder = new NavDrawerBuilder(getApplicationContext());
List<String> menu_option_list = navDrawerBuilder.nav_drawer_options;
menu_position = menu_option_list.indexOf(menu_name);
mNavigationDrawerFragment = (NavigationDrawerFragment) getFragmentManager().findFragmentById(R.id.navigation_drawer);
mNavigationDrawerFragment.setUp(R.id.navigation_drawer, (DrawerLayout) findViewById(R.id.drawer_layout), menu_name, this);
}
示例4: onNavigationDrawerItemSelected
import com.eveningoutpost.dexdrip.NavDrawerBuilder; //導入依賴的package包/類
@Override
public void onNavigationDrawerItemSelected(int position) {
NavDrawerBuilder navDrawerBuilder = new NavDrawerBuilder(getApplicationContext());
List<String> menu_option_list = navDrawerBuilder.nav_drawer_options;
List<Intent> intent_list = navDrawerBuilder.nav_drawer_intents;
if (position != menu_position) {
startActivity(intent_list.get(position));
finish();
}
}
示例5: onResume
import com.eveningoutpost.dexdrip.NavDrawerBuilder; //導入依賴的package包/類
@Override
protected void onResume(){
super.onResume();
menu_name = getMenuName();
NavDrawerBuilder navDrawerBuilder = new NavDrawerBuilder(getApplicationContext());
List<String> menu_option_list = navDrawerBuilder.nav_drawer_options;
menu_position = menu_option_list.indexOf(menu_name);
mNavigationDrawerFragment = (NavigationDrawerFragment) getFragmentManager().findFragmentById(R.id.navigation_drawer);
mNavigationDrawerFragment.setUp(R.id.navigation_drawer, (DrawerLayout) findViewById(R.id.drawer_layout), menu_name, this);
}
示例6: onNavigationDrawerItemSelected
import com.eveningoutpost.dexdrip.NavDrawerBuilder; //導入依賴的package包/類
@Override
public void onNavigationDrawerItemSelected(int position) {
NavDrawerBuilder navDrawerBuilder = new NavDrawerBuilder(getApplicationContext());
List<String> menu_option_list = navDrawerBuilder.nav_drawer_options;
List<Intent> intent_list = navDrawerBuilder.nav_drawer_intents;
if (position != menu_position) {
startActivity(intent_list.get(position));
//do not close activity if it is the Launcher or "Home".
if (!getMenuName().equalsIgnoreCase(Home.menu_name)) {
finish();
}
}
}