我正在学习Android,并正在尝试制作导航抽屉。我想要实现类似于这样的效果: 但是我的结果看起来像这样: 这是我的style.xml文件:
这是我的导航抽屉页头部:
有人能给我建议如何纠正这些问题吗?
</style>
<style name="Base.AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/md_deep_purple_500</item>
<item name="colorPrimaryDark">@color/md_deep_purple_700</item>
<item name="colorAccent">@color/md_white_1000_50</item>
</style>
<style name="ToolbarTheme" parent="AppTheme">
<item name="android:textColorPrimary">@android:color/white</item>
<item name="android:textColorSecondary">@android:color/white</item>
</style>
<style name="NavigationViewTheme" parent="AppTheme">
<item name="textAppearanceListItem">@style/TextAppearance.AppCompat.Body2</item>
<item name="android:icon">@style/Theme.AppCompat.Light</item>
</style>
</resources>
这是我的导航抽屉页头部:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="16dp"
android:gravity="bottom"
android:theme="@style/ThemeOverlay.AppCompat.Light"
>
</FrameLayout>
有人能给我建议如何纠正这些问题吗?