drawerlayout

Open second drawerlayout as a sub drawerlayout over the first

巧了我就是萌 提交于 2020-01-01 09:38:09
问题 Android Studio 2.1.3 I have this design I am trying to follow. On the first drawerlayout I have a setttings options. When the user clicks, it will open a second drawerlayout like this below. The user can get back to the first by clicking on the arrow Main Menu . Is this possible? Many thanks for any suggestions 回答1: It's unclear how exactly you wish to implement your drawer UI, so the following solution is rather generic, in that it should work with NavigationView s, RecyclerView s, or pretty

Cannot resolve symbol DrawerLayout

眉间皱痕 提交于 2020-01-01 08:12:30
问题 I'm trying to implement the Navigation Drawer as shown here: http://developer.android.com/training/implementing-navigation/nav-drawer.html#top My code seems to be ok, and My minimum and target levels in my manifest match the example, but it's telling me it can't find the following three references import android.support.v4.app.ActionBarDrawerToggle; import android.support.v4.view.GravityCompat; import android.support.v4.widget.DrawerLayout; 回答1: May be you have found your answer but i think

DrawerLayout not working with Android 4.4 & SurfaceView

蹲街弑〆低调 提交于 2019-12-30 10:34:50
问题 Today I had one of those "android" moments again, which left me absolutely clueless. I have an app which consists of a DrawerLayout, which includes a RelativeLayout as container for a SurfaceView (surfaceViewContainer) and a second ViewGroup (subclass of RelativeLayout) as navigation. When the app starts, in onCreate I inflate the layout and add a SurfaceView to the surfaceViewContainer. On a Samsung S2 with 4.1.2 and a S3 with 4.3 everything works fine, I can see the SurfaceView drawn and I

Toolbar disappears when using Vuforia versions below 4.4

旧街凉风 提交于 2019-12-25 06:43:00
问题 I am using the SDK Vuforia and testing on devices with version 4.4 below the toolbar disappears, the menu buttons are there but invisible where would be the correct buttons are visible. The drawerlayout button with recyclerview I use the side menu does not work in version below 4.4, and its icon disappears. With much effort can swipe to activate the side menu. Above this version of the menu functions and buttons are displayed. The following images and correct the problem and xml layouts.

MvvmCross - Soft back button does not work when using DrawerLayout

送分小仙女□ 提交于 2019-12-25 01:33:42
问题 I clone Playground Android example in MvvmCross and set DrawerLayout by default. RegisterAppStart<SplitRootViewModel>(); When navigated to SplitDetailNavView from SplitDetailView, there is no back button on navigation bar. I had to modify OnCreateView function in SplitDetailNavView public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { base.OnCreateView(inflater, container, savedInstanceState); var view = this.BindingInflate(Resource

Ripple effect on NavigationView item

…衆ロ難τιáo~ 提交于 2019-12-23 17:02:05
问题 I have NavigationView in my DrawerLayout and let's say it has simple menu <menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/nav_settings" android:icon="@drawable/ic_settings_black_24dp" android:title="@string/title_settings"/> </menu> Now I set listener for click: mNavigationVeiw.setOnNavigationItemSelected(this); @Override public boolean onNavigationItemSelected(@NonNull MenuItem item) { switch (item.getItemId()) { case R.id.nav_settings:

Change positions of menu items and hamburger button for a right-side drawer

馋奶兔 提交于 2019-12-23 05:39:09
问题 In my Toolbar , I have a menu with one item "settings", and a DrawerLayout with a hamburger icon aligned to the right. Now it looks like this: I want the hamburger to be on the right, like this: menu.xml : <menu xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/settings" android:icon="@drawable/ic_settings_black_48dp" app:showAsAction="always" /> </menu> MainActivity : public class MainActivity extends

How to implement drawer menu open from right side

邮差的信 提交于 2019-12-23 04:45:47
问题 I have created created one navigation drawer following this tutorial But what I need is , I need the same drawer menu open from right side . Anyone know how to achieve this? Following is my xml <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/drawer" android:layout_width="match_parent" android:layout_height="match_parent" android

How to correctly implement view content behind statusbar when using fragments

大兔子大兔子 提交于 2019-12-23 02:32:57
问题 I'm trying put my ImageBackdrop from the collapsing toolbar behind the statusBar, I've done it right with the Drawer and the navigationView but I can't do it with my fragments, In the cheesequare demo, Chris did it, and I can do it that way, but it's not using a single activity app and fragment transitions, so that's not quite what I'm looking for. My style: <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color

How to create drawer navigation like this?

你离开我真会死。 提交于 2019-12-23 00:24:33
问题 Hi guys, I wanna create the drawer navigation. I have read some docs, but it didnt work, so I will show u the picture that I want my drawer layout to look like this. Hope you can spend some to help me :) 回答1: You must make an ExpandableListView in your NavigationDrawer ExpandableListView : here NavigationDrawer : here Example : <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/drawer_layout" android:layout_width="match_parent"