修改中英文
This commit is contained in:
@@ -88,6 +88,12 @@ public class LiveChatAdapter extends RecyclerView.Adapter {
|
||||
private int mPosition;
|
||||
private boolean isBottom = false;
|
||||
private int fountSize = 13;
|
||||
private String isFans;
|
||||
|
||||
public LiveChatAdapter setFans(String fans) {
|
||||
isFans = fans;
|
||||
return this;
|
||||
}
|
||||
|
||||
public LiveChatAdapter(Context context) {
|
||||
mContext = context;
|
||||
@@ -342,7 +348,7 @@ public class LiveChatAdapter extends RecyclerView.Adapter {
|
||||
new LoadDian9TuUtil().loadDian9TuAssets(mContext, mBg, 1);
|
||||
}
|
||||
String str1 = WordUtil.isNewZh() ? "火力四射,魅力無限!感謝" : "Full of firepower!Unlimited charm!";
|
||||
String str2 = WordUtil.isNewZh() ? "為本直播間加成熱度":"Thank you for adding popularity to this live room";
|
||||
String str2 = WordUtil.isNewZh() ? "為本直播間加成熱度" : "Thank you for adding popularity to this live room";
|
||||
SpannableStringBuilder builder = new SpannableStringBuilder();
|
||||
builder.append(str1);
|
||||
int length = builder.length();
|
||||
@@ -427,7 +433,12 @@ public class LiveChatAdapter extends RecyclerView.Adapter {
|
||||
bean.setHeart(position);
|
||||
ImgLoader.display(mContext, bean.getId(), clipImage2);
|
||||
attentionLayout.setVisibility(View.VISIBLE);
|
||||
btnAttention.setVisibility(bean.isAttention() ? View.GONE : View.VISIBLE);
|
||||
if (TextUtils.isEmpty(isFans)) {
|
||||
btnAttention.setVisibility(bean.isAttention() ? View.GONE : View.VISIBLE);
|
||||
} else {
|
||||
btnAttention.setVisibility(TextUtils.equals(isFans, "1") ? View.GONE : View.VISIBLE);
|
||||
}
|
||||
|
||||
// btnAttention.setOnClickListener(new View.OnClickListener() {
|
||||
// @Override
|
||||
// public void onClick(View v) {
|
||||
|
||||
@@ -43,6 +43,7 @@ import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.manager.NewLevelManager;
|
||||
import com.yunbao.common.utils.DpUtil;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.bean.LiveChatBean;
|
||||
|
||||
@@ -92,7 +93,7 @@ public class LiveTextRender {
|
||||
int userNiceNameSize = bean.getUserNiceName().length();
|
||||
int giftNameIndex = -1;
|
||||
int giftNameSize = -1;
|
||||
if (!TextUtils.isEmpty(chatMsg)&&!TextUtils.isEmpty(bean.getGiftName())&&chatMsg.contains(bean.getGiftName())) {
|
||||
if (!TextUtils.isEmpty(chatMsg) && !TextUtils.isEmpty(bean.getGiftName()) && chatMsg.contains(bean.getGiftName())) {
|
||||
giftNameIndex = chatMsg.indexOf(bean.getGiftName());
|
||||
|
||||
giftNameSize = bean.getGiftName().length();
|
||||
@@ -795,7 +796,7 @@ public class LiveTextRender {
|
||||
|
||||
public SpannableStringBuilder renderGiftInfo2(String giftName) {
|
||||
SpannableStringBuilder builder = new SpannableStringBuilder();
|
||||
String s1 = CommonAppContext.sInstance.getBaseContext().getString(R.string.live_send_gift_1);
|
||||
String s1 = WordUtil.isNewZh() ? "送" : "sent";
|
||||
String content = s1 + " " + giftName;
|
||||
int index1 = s1.length();
|
||||
builder.append(content);
|
||||
|
||||
@@ -717,7 +717,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
RequestOptions options = new RequestOptions().skipMemoryCache(true);//配置
|
||||
Glide.with(mContext).asGif()
|
||||
.apply(options)//应用配置
|
||||
.load(WordUtil.isNewZh()?R.mipmap.drpkend:R.mipmap.drpkend_en)
|
||||
.load(WordUtil.isNewZh() ? R.mipmap.drpkend : R.mipmap.drpkend_en)
|
||||
.listener(new RequestListener<GifDrawable>() {
|
||||
@Override
|
||||
public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<GifDrawable> target, boolean isFirstResource) {
|
||||
@@ -1185,6 +1185,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
LiveRoomViewHolder.follow();
|
||||
mLiveChatAdapter.removetItem(bean);
|
||||
} else if (bean.getType() == -2) {
|
||||
|
||||
if (!bean.isAttention()) {
|
||||
LiveRoomViewHolder.follow();
|
||||
}
|
||||
@@ -2732,10 +2733,16 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
if (attention == 0) {
|
||||
mBtnFollow.setVisibility(View.VISIBLE);
|
||||
mViewMedal.setVisibility(View.GONE);
|
||||
if (mLiveChatAdapter != null) {
|
||||
mLiveChatAdapter.setFans("0");
|
||||
}
|
||||
} else {
|
||||
if (mBtnFollow.getVisibility() == View.VISIBLE) {
|
||||
mBtnFollow.setVisibility(View.GONE);
|
||||
mViewMedal.setVisibility(View.VISIBLE);
|
||||
if (mLiveChatAdapter != null) {
|
||||
mLiveChatAdapter.setFans("1");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3193,6 +3200,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
* 关注主播
|
||||
*/
|
||||
public static void follow() {
|
||||
|
||||
EventBus.getDefault().post("stop_svga_new_user_follow");
|
||||
|
||||
LiveHttpUtil.setFrontTask("attent", new HttpCallback() {
|
||||
@@ -4036,6 +4044,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
|
||||
public void setFansGroup(String isFans) {
|
||||
this.isFans = isFans.equals("1");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -206,12 +206,13 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/automatic_chat"
|
||||
android:layout_weight="0.5"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="3dp"
|
||||
android:layout_weight="0.5"
|
||||
android:clickable="false"
|
||||
android:enabled="false"
|
||||
android:gravity="start"
|
||||
@@ -220,13 +221,12 @@
|
||||
android:textSize="12sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_weight="0"
|
||||
android:id="@+id/btn_attention"
|
||||
android:layout_width="54dp"
|
||||
android:layout_height="26dp"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="11dp"
|
||||
android:layout_weight="0"
|
||||
android:clickable="false"
|
||||
android:src="@mipmap/btn_attention" />
|
||||
|
||||
|
||||
@@ -19,15 +19,19 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="14dp"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:text="@string/site_wide_news_hint1"
|
||||
android:textColor="#FFAAAAAA"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="12dp"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:text="@string/site_wide_news_hint2"
|
||||
android:textColor="#FFAAAAAA"
|
||||
android:textSize="14sp" />
|
||||
@@ -37,8 +41,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="22dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
<TextView
|
||||
|
||||
Reference in New Issue
Block a user