【问题标题】:Hovering searchView with menu用菜单悬停searchView
【发布时间】:2020-12-24 09:06:52
【问题描述】:

我在我的应用程序的应用程序栏中实现了一个搜索视图,所以一切都非常紧凑。刚刚检查了我在 GMail 中的邮件,发现他们似乎没有使用应用栏。 我用谷歌搜索了一下,但找不到他们使用的东西。是修改后的应用栏设计还是悬停的搜索视图对菜单进行了修改?有什么想法吗?

【问题讨论】:

    标签: android gmail searchview appbar


    【解决方案1】:

    在这里找到答案:Android Google Search Bar with Drawer

    对于任何想要测试代码的人,我什至会添加所需的 xml 文件(但如果有的话,您可以使用自己的): ic_menu.xml

    <vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp"
        android:viewportHeight="330" android:viewportWidth="330" android:width="24dp">
        <path android:fillColor="#77000000"
            android:pathData="M135,90H15c-8.284,0 -15,6.716 -15,15s6.716,15 15,15h120c8.284,0 15,-6.716 15,-15S143.284,90 135,90z"/>
        <path android:fillColor="#77000000"
            android:pathData="M135,150H15c-8.284,0 -15,6.716 -15,15c0,8.284 6.716,15 15,15h120c8.284,0 15,-6.716 15,-15C150,156.716 143.284,150 135,150z"/>
        <path android:fillColor="#77000000"
            android:pathData="M135,210H15c-8.284,0 -15,6.716 -15,15c0,8.284 6.716,15 15,15h120c8.284,0 15,-6.716 15,-15C150,216.716 143.284,210 135,210z"/>
    </vector>
    

    shape_round.xml

    <shape xmlns:android="http://schemas.android.com/apk/res/android">
    
        <corners android:radius="15dip" />
    
        <solid android:color="@android:color/white" />
    
    </shape>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-01-23
      • 2023-04-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多