修改测试问题

This commit is contained in:
18401019693 2022-08-09 17:56:24 +08:00
parent c3a4b57e18
commit cec82501db
2 changed files with 29 additions and 19 deletions

View File

@ -53,11 +53,6 @@ import org.greenrobot.eventbus.ThreadMode;
public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickListener {
private ImageView mAvatar1;
private ImageView mAvatar2;
private TextView mName;
public static TextView mDuration;//直播时长
public static TextView mVotes;//收获映票
public static TextView mWatchNum;//观看人数
//直播类型
private static LiveOfType type;
@ -92,16 +87,6 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
mAvatar1 = (ImageView) findViewById(R.id.avatar_1);
userLiveEnd = (RelativeLayout) findViewById(R.id.user_live_end);
anchorLiveEnd = (RelativeLayout) findViewById(R.id.anchor_live_end);
// mAvatar2 = (ImageView) findViewById(R.id.avatar_2);
// mName = (TextView) findViewById(R.id.name);
// mDuration = (TextView) findViewById(R.id.duration);
// mVotes = (TextView) findViewById(R.id.votes);
// mWatchNum = (TextView) findViewById(R.id.watch_num);
// findViewById(R.id.btn_back).setOnClickListener(this);
// TextView votesName = (TextView) findViewById(R.id.votes_name);
// votesName.setText(WordUtil.getString(R.string.live_votes) + CommonAppConfig.getInstance().getVotesName());
if (type == LiveOfType.USER) {
initViewOfUser();
initDataOfUser();
@ -210,10 +195,6 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
public static void upData(String votes, String length, int nums, String uname) {
Log.e("", votes + "votes" + length + "length" + nums + "nums");
// mVotes.setText(votes);
// mDuration.setText(length);
// mWatchNum.setText(StringUtil.toWan(nums));
if (type == LiveOfType.USER) {
liveDurationUser.setText(length);
liveNameUser.setText(uname);
@ -346,6 +327,14 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
String json = GsonUtils.toJson(data);
LiveBean liveBean = GsonUtils.fromJson(json, LiveBean.class);
mCheckLivePresenter.checkLive(liveBean);
if (mContext instanceof LiveAnchorActivity) {
((LiveAnchorActivity) mContext).superBackPressed();
} else if (mContext instanceof LiveAudienceActivity) {
((LiveAudienceActivity) mContext).exitLiveRoom();
} else if (mContext instanceof LiveRyAnchorActivity) {
((LiveRyAnchorActivity) mContext).superBackPressed();
}
}
@Override

View File

@ -3,7 +3,9 @@ package com.yunbao.main.activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.KeyEvent;
import android.view.View;
import android.view.inputmethod.EditorInfo;
@ -72,7 +74,26 @@ public class SearchActivity extends AbsActivity {
mEditText.setText("");
}
});
findViewById(R.id.btn_delete).setVisibility(View.GONE);
mEditText.setOnEditorActionListener(onEditorActionListener);
mEditText.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
if (!s.toString().trim().isEmpty()) {
findViewById(R.id.btn_delete).setVisibility(View.VISIBLE);
}
}
@Override
public void afterTextChanged(Editable s) {
}
});
//退出检索页面保存搜索记录
findViewById(R.id.btn_back).setOnClickListener(new View.OnClickListener() {
@Override