我有一个错误,说无法解决@ id / search_edit_frame我不知道为什么,
我尝试了文件>无效缓存>只是重新启动和重新启动 android studio也试图改变我的所有支持的api的渲染版本..
我尝试了文件>无效缓存>只是重新启动和重新启动 android studio也试图改变我的所有支持的api的渲染版本..
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
myapp="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.SearchView
android:id="@+id/svSearch"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="25sp"
android:textColor="@color/textDefault"
myapp="@string/search_hint"
myapp="false" />
</LinearLayout>
我正在使用Android Studio 1.2.2,并确保它编译android.support.v7.widget(AppCompat)
任何帮助将不胜感激..谢谢
解决方法
使用
<SearchView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/searchView"
android:iconifiedByDefault="true"
android:queryHint="Search"
android:layout_centerHorizontal="true" />
它应该工作