From 1be00c75c48c47ecadf4ec8cdd72cfcc35106b79 Mon Sep 17 00:00:00 2001 From: ningwenqiang Date: Tue, 15 Oct 2024 10:52:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=99=E4=B8=AAicon=E5=9C=A8=E6=9C=89?= =?UTF-8?q?=E6=A0=87=E9=A2=98=E5=86=85=E5=AE=B9=E7=9A=84=E6=97=B6=E5=80=99?= =?UTF-8?q?=E5=B0=B1=E5=8E=BB=E6=8E=89=E5=90=A7=EF=BC=8C=E5=8F=AA=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=A0=87=E9=A2=98=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../live/views/LiveNewReadySwViewHolder.java | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/live/src/main/java/com/yunbao/live/views/LiveNewReadySwViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveNewReadySwViewHolder.java index 985a39f67..6b9a99bc5 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveNewReadySwViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveNewReadySwViewHolder.java @@ -11,8 +11,10 @@ import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.os.Looper; +import android.text.Editable; import android.text.Html; import android.text.TextUtils; +import android.text.TextWatcher; import android.util.Log; import android.view.Gravity; import android.view.LayoutInflater; @@ -110,7 +112,7 @@ public class LiveNewReadySwViewHolder extends AbsViewHolder implements View.OnCl private LiveClassBean classBean; private FaceManager manager; private TextView faceTextView;//提示人脸未检测到的TextView - private ImageView selectorProtocol; + private ImageView selectorProtocol,titleIconImg; private int selectClarity = 1; private LiveOpenCustomPopup liveOpenCustomPopup; private boolean selector = true; @@ -166,6 +168,28 @@ public class LiveNewReadySwViewHolder extends AbsViewHolder implements View.OnCl }); mCoverText = (TextView) findViewById(R.id.cover_text); mEditTitle = (EditText) findViewById(R.id.edit_title); + mEditTitle.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!=null && s.length()>0){ + titleIconImg.setVisibility(View.GONE); + }else { + titleIconImg.setVisibility(View.VISIBLE); + } + } + + @Override + public void afterTextChanged(Editable s) { + + } + }); + mOpenLocation = true; mLiveClass = (TextView) findViewById(R.id.live_class); mLiveWishListTextView = (TextView) findViewById(R.id.text_wishlist);