當前位置: 首頁>>代碼示例>>Java>>正文


Java NavDrawerBuilder類代碼示例

本文整理匯總了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);
}
 
開發者ID:NightscoutFoundation,項目名稱:xDrip,代碼行數:12,代碼來源:ActivityWithMenu.java

示例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();
        }
    }
}
 
開發者ID:NightscoutFoundation,項目名稱:xDrip,代碼行數:14,代碼來源:ActivityWithMenu.java

示例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);
}
 
開發者ID:NightscoutFoundation,項目名稱:xDrip,代碼行數:12,代碼來源:ListActivityWithMenu.java

示例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();
    }
}
 
開發者ID:NightscoutFoundation,項目名稱:xDrip,代碼行數:11,代碼來源:ListActivityWithMenu.java

示例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);
}
 
開發者ID:StephenBlackWasAlreadyTaken,項目名稱:xDrip-Experimental,代碼行數:12,代碼來源:ActivityWithMenu.java

示例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();
        }
    }
}
 
開發者ID:StephenBlackWasAlreadyTaken,項目名稱:xDrip-Experimental,代碼行數:14,代碼來源:ActivityWithMenu.java


注:本文中的com.eveningoutpost.dexdrip.NavDrawerBuilder類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。