如何移除 Mikepenz Material Drawer 的空间。我为配置文件菜单和抽屉项目使用了自定义布局。我没有为这些视图设置边距或填充。而且我还尝试将活动水平边距设为 0。 将不胜感激。右侧边距也相同。配置文件菜单是好的。它没有问题。而draweritem面临问题。
下面的代码是个人资料菜单
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/imgUserProfileImage"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_margin="@dimen/min_margin"
android:src="@drawable/parent" />
<com.CustomTextView
android:id="@+id/txtUserName"
style="@style/label_text_primary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:padding="10dp"
android:text="Noorul"
app:font="@string/montserrat_semi_bold" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="0.3dp"
android:layout_marginTop="@dimen/min_margin"
android:layout_marginLeft="@dimen/min_margin"
android:background="#999999" />
</LinearLayout>
</LinearLayout>
下面的代码是抽屉项目菜单
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/lnrSecond_menu"
android:layout_width="match_parent"
android:layout_height="@dimen/material_drawer_item_secondary"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent">
<View
android:id="@+id/view"
android:layout_width="3dp"
android:layout_height="match_parent"
android:background="@color/primary"
android:visibility="gone"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center">
<ImageView
android:id="@+id/material_drawer_icon"
android:layout_width="@dimen/profile_img"
android:layout_height="@dimen/profile_img"
android:padding="@dimen/most_most_normal_margin"
android:src="@mipmap/ic_launcher" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical|start"
android:orientation="vertical">
<com.CustomTextView
android:id="@+id/material_drawer_name"
style="@style/label_text_secondary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical|start"
android:textDirection="anyRtl"
android:text="Some Secondary Text"
app:font="@string/montserrat_regular"
/>
<com.CustomTextView
android:id="@+id/material_drawer_description"
style="@style/label_text_secondary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:visibility="gone"
app:font="@string/montserrat_regular"
android:text="Some drawer text" />
</LinearLayout>
<LinearLayout
android:id="@+id/material_drawer_badge_container"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="right|center">
<com.CustomTextView
android:id="@+id/txtMenuBadge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/min_margin"
android:gravity="center"
android:text="99" />
</LinearLayout>
</LinearLayout>
我在哪里犯了错误?帮助我,我将不胜感激。