<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:isScrollContainer="true"
tools:openDrawer="start">
<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/btn_sing_in"
android:layout_gravity="start"
android:fitsSystemWindows="true"
android:nestedScrollingEnabled="true"
app:headerLayout="@layout/nav_header"
android:layout_marginEnd="-55dp"
app:menu="@menu/nav_drawer">
<TextView
android:id="@+id/btn_sing_in"
android:layout_width="match_parent"
android:layout_height="@dimen/logout_height"
android:layout_gravity="bottom"
android:background="@color/colorWhite"
android:drawablePadding="@dimen/logout_drawable_padding"
android:drawableStart="@drawable/ic_logout"
android:gravity="start|center"
android:paddingStart="@dimen/logout_padding_start"
android:text="@string/nav_item_logout" />
</android.support.design.widget.NavigationView>
<android.support.design.widget.CoordinatorLayout
android:id="@+id/coordinator_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorWhite"
tools:context="com.kdcos.contsync.view.dashboard.DashboardActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/colorWhite"
android:elevation="0dp"
app:popupTheme="@style/AppTheme.PopupOverlay" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorWhite"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<android.support.design.widget.BottomNavigationView
android:id="@+id/bottom_navigation"
android:layout_width="match_parent"
android:layout_height="56dp"
android:layout_alignParentBottom="true"
app:itemIconTint="@drawable/selector_view"
app:itemTextColor="@color/selector_view_text"
app:menu="@menu/nav_bottom" />
<View
android:id="@+id/view_divider"
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:layout_above="@id/bottom_navigation"
android:background="@color/colorMenuGrey"
android:paddingBottom="12dp" />
<FrameLayout
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/view_divider"
android:background="@color/colorWhite"/>
</RelativeLayout>
</LinearLayout>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_marginBottom="@dimen/baseline_grid_8x"
android:layout_marginEnd="@dimen/fab_margin_end"
app:srcCompat="@drawable/ic_dialpad" />
</android.support.design.widget.CoordinatorLayout>
</android.support.v4.widget.DrawerLayout>
这是navheader:
<RelativeLayout 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="@dimen/baseline_grid_22x"
android:background="@color/colorCallGradientEnd"
android:gravity="bottom"
android:orientation="vertical"
android:paddingBottom="@dimen/baseline_grid_2.5x"
android:paddingLeft="@dimen/baseline_grid_2.5x"
android:paddingRight="@dimen/baseline_grid_2.5x"
android:paddingTop="@dimen/baseline_grid_6.5x"
android:theme="@style/ThemeOverlay.AppCompat.Dark">
<com.kdcos.contsync.utilities.RoundedImageView
android:id="@+id/imageView"
android:layout_width="@dimen/baseline_grid_8x"
android:layout_height="@dimen/baseline_grid_8x"
android:src="@drawable/illustration"
app:srcCompat="@mipmap/ic_launcher_round" />
<!--app:image_url="@{viewModel.profilePic}"-->
<TextView
android:id="@+id/userNameText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_toRightOf="@+id/imageView"
android:paddingLeft="15dp"
android:text="Kushal Dalal"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:textColor="@color/colorWhite"
android:textStyle="bold" />
<LinearLayout
android:id="@+id/lnUpgradelayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@+id/userNameText"
android:layout_marginLeft="@dimen/baseline_grid_2x"
android:layout_marginTop="@dimen/baseline_grid_2x"
android:layout_toRightOf="@+id/imageView"
android:background="@drawable/ic_upgrade_btn"
android:gravity="center"
android:onClick="@{()->viewModel.navigateToonUpgardePage()}"
android:orientation="vertical"
android:textStyle="bold">l
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:fontFamily="sans-serif-medium"
android:letterSpacing="-0.03"
android:text="Upgrade to Premium"
android:textColor="#351600"
android:textSize="14.4sp"
android:textStyle="normal" />
</LinearLayout>
</RelativeLayout>
这是我的xml我正在显示9个项目和一个nave标题但是在更大的设备中我能够显示包括navheader的所有9个项目但在较小的设备中它显示8项目和导航标题当我尝试将其显示滚动到8它藏在底部9项的项目请检查并建议我如何解决这个问题我无法找到问题的原因,为什么它不显示第9项是小装置中的最后一项。