Java 如何自定义NavigationDrawer
我有Segunt NavigationDrawer,可以:Java 如何自定义NavigationDrawer,java,android,textview,views,customization,Java,Android,Textview,Views,Customization,我有Segunt NavigationDrawer,可以: <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/drawer_layout" android:layout_width="match_parent" and
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<FrameLayout
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent">
</FrameLayout>
<ListView
android:id="@+id/drawer"
android:layout_width="240dp"
android:layout_gravity="start"
android:background="#FFF"
android:choiceMode="singleChoice"
android:layout_height="match_parent">
</ListView>
当我试图自定义我的
导航抽屉
时,问题就出现了,它应该在我的列表视图
中插入一个“静态”
文本(就像文本视图
)不像在适配器中那样
您可以在那里使用自定义listview。我想要一个textView和listview的其他组件,就像在适配器中一样…这是listview,您可以在其中使用适配器充气自定义listview。您可以检查此项。有关更好的导航抽屉实现,请参阅以下内容:,