如何在幻灯片菜单中创建搜索栏? [英] How to make Seek bar in Slide menu?
问题描述
我是一个使用Android Studio进行练习的应用程序的学生.我想在基本幻灯片菜单中创建搜索栏,而android studio则将其作为导航抽屉.我搜索了它,但是找不到.如果答案已经存在,我深表歉意.用英语很难搜索...
I'm a student making an application using an android studio for practice. I want to make seek bar in basic slide menu, which android studio provides as navigation drawer. I searched about it but couldn't find it. If the answer already exists, I apologise. Pretty hard to search by English...
有没有一种方法可以在幻灯片菜单中创建搜索栏,以便用户可以编辑值?例如,用户可以通过在幻灯片菜单中编辑搜索栏的值来直接控制笔的大小或不透明度.我做了一个示例图像.感谢您的阅读.
Is there a way to create seek bar in slide menu so users can edit the value? For instance, users can control size or opacity of pen directly by editing the value of seek bar in slide menu. I made an example image. Thanks for reading.
推荐答案
修改您的 NavigationView
以适应 android Views
而不是 menu
.您可以自定义整个 Navigation Drawer菜单
.
Modify your NavigationView
to accommodate android Views
instead of menu
.So that you can customize the entire Navigation Drawer Menu
.
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/nav_header_main" />
<ListView
android:id="@+id/lst_menu_items"
android:layout_width="match_parent"
android:layout_height="0dp"
android:entries="@array/sports_array"
android:layout_weight="1" />
</LinearLayout>
</android.support.design.widget.NavigationView>
这篇关于如何在幻灯片菜单中创建搜索栏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!