小编Gov*_*ind的帖子

工具栏没有出现在棒棒糖前设备中

工具栏未出现在棒棒糖前设备上.我正在使用工具栏的抽屉布局.相同的工具栏适用于其他活动,但与抽屉布局一起使用时则不适用.

带抽屉布局和工具栏的活动

@Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);


              setContentView(R.layout.activity_home_screen);

                {

                    /*supportChatImageButton = (ImageButton) findViewById(R.id.homeSupportChatImageButton);
                    orderImageButton = (ImageButton) findViewById(R.id.homeOrderImageButton);*/
                    headerTextView = (TextView) findViewById(R.id.homeHeaderTextView);
                    slidingTabLayout = (SlidingTabLayout) findViewById(R.id.homeSlidingTabLayout);
                    viewPager = (ViewPager) findViewById(R.id.homeViewPager);
                    headerBackgroundImageView = (ImageView)findViewById(R.id.homeHeaderBackgroundImageView);

                    mainContentLayout = (FrameLayout) findViewById(R.id.homeScreenMainContentLayout);
                    hamburgerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
                    hamburgerLinearLayout = (LinearLayout) findViewById(R.id.hamburgerProfileLayout);
                    hamburgerListView = (ListView) findViewById(R.id.hamburgerListView);
                    hamburgerMenu = (RelativeLayout) findViewById(R.id.hamburgerMenu);
                    GetHamburgerListItems();
                    HamburgerListAdapter hamburgerListAdapter = new HamburgerListAdapter(this, hamburgerListItems);
                    hamburgerListView.setAdapter(hamburgerListAdapter);

                    userProfileImageView = (ImageView) findViewById(R.id.userProfileImageView);
                    userProfileNameTextView = (TextView) findViewById(R.id.userProfileNameTextView);

                    if(StorageManager.read(this, "userProfile", new TypeToken<UserProfile>() {}.getType()) != null) {
                        UserProfile userProfile …
Run Code Online (Sandbox Code Playgroud)

android android-appcompat navigation-drawer drawerlayout android-toolbar

4
推荐指数
1
解决办法
1040
查看次数