android:can navigation drawer(ActionBarDrawerToggle)在init / default上显示自己

时间:2014-09-15 04:11:37

标签: android navigation navigation-drawer

我正在使用导航抽屉(ActionBarDrawerToggle),它在init之后总是隐藏,我可以先显示它吗?

1 个答案:

答案 0 :(得分:0)

试试这个

    DrawerLayout mDrawerLayout;

    protected void onCreate(Bundle savedInstanceState)
    {
     super.onCreate(savedInstanceState);
     setContentView(/**Your content View**/) 
     mDrawerLayout = (DrawerLayout)findViewById(/**Your drawer**/);
     mDrawerLayout.openDrawer(Gravity.START);
    }