修改测试问题
This commit is contained in:
@@ -66,6 +66,12 @@ public class SearchActivity extends AbsActivity {
|
||||
transaction.replace(R.id.context_layout, searchRecommendFragment);
|
||||
transaction.commit();
|
||||
mEditText = findViewById(R.id.edit);
|
||||
findViewById(R.id.btn_delete).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
mEditText.setText("");
|
||||
}
|
||||
});
|
||||
mEditText.setOnEditorActionListener(onEditorActionListener);
|
||||
//退出检索页面保存搜索记录
|
||||
findViewById(R.id.btn_back).setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
@@ -37,8 +37,9 @@
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edit"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@null"
|
||||
android:hint="@string/search_hint"
|
||||
android:imeActionLabel="@string/search"
|
||||
@@ -49,6 +50,14 @@
|
||||
android:textColor="@color/textColor"
|
||||
android:textColorHint="@color/gray3"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_delete"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginRight="10dp"
|
||||
android:src="@mipmap/icon_quxiao" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
|
||||
BIN
main/src/main/res/mipmap-xxhdpi/icon_quxiao.png
Normal file
BIN
main/src/main/res/mipmap-xxhdpi/icon_quxiao.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
Reference in New Issue
Block a user