安卓学习-界面-ui-SearchView

 

activity_main.xml

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="${relativePackage}.${activityClass}"
     >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:orientation="vertical" >

        <SearchView
            android:id="@+id/searchView1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" 
            >
        </SearchView>

        <ListView
            android:id="@+id/listView1"
            android:layout_width="match_parent"
               android:background="#888"
            android:layout_height="wrap_content" >
        </ListView>

    </LinearLayout>

</RelativeLayout>
View Code

相关文章:

  • 2022-12-23
  • 2021-12-21
  • 2021-09-22
  • 2022-02-19
  • 2021-10-03
  • 2021-04-04
  • 2021-08-01
  • 2022-02-15
猜你喜欢
  • 2022-12-23
  • 2021-11-23
  • 2021-12-09
  • 2021-12-11
  • 2022-01-01
  • 2021-11-04
  • 2021-07-19
相关资源
相似解决方案