修改测试问题

This commit is contained in:
18401019693 2022-08-09 17:44:44 +08:00
parent a3e647d74b
commit c3a4b57e18
5 changed files with 26 additions and 7 deletions

View File

@ -45,7 +45,13 @@ public class SearchRecommendBodyItemViewHolder extends RecyclerView.ViewHolder {
pkico = (ImageView) itemView.findViewById(R.id.pk_ico);
drPkIco = (ImageView) itemView.findViewById(R.id.dr_pk_ico);
pkAvatar = (ImageView) itemView.findViewById(R.id.pk_avatar);
liveType.setVisibility(View.GONE);
mLiveIco.setVisibility(View.GONE);
mLiveState.setVisibility(View.GONE);
mNum.setVisibility(View.GONE);
pkAvatar.setVisibility(View.GONE);
pkico.setVisibility(View.GONE);
mTitle.setVisibility(View.GONE);
}

View File

@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="9dp"
android:gravity="center"
android:orientation="vertical">
@ -16,8 +17,7 @@
<com.yunbao.common.custom.MyRelativeLayout5
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="9dp"
android:paddingLeft="5dp">
android:layout_marginBottom="9dp">
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/cover"
@ -183,9 +183,7 @@
<com.yunbao.common.custom.MyRelativeLayout5
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="9dp"
android:paddingLeft="5dp">
android:layout_height="match_parent">
<ViewFlipper
android:id="@+id/viewflipper_banner"

View File

@ -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() {

View File

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB