修改主播不展示全服喇叭,超皇文字增加容错
This commit is contained in:
parent
f0941ffd26
commit
874ee86a10
@ -850,6 +850,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
bundle.putString(Constants.LIVE_DANMU_PRICE, mDanmuPrice);
|
||||
bundle.putString(Constants.COIN_NAME, mCoinName);
|
||||
bundle.putString(Constants.LIVE_UID, mLiveUid);
|
||||
bundle.putString(Constants.LIVE_UID, mLiveUid);
|
||||
fragment.setArguments(bundle);
|
||||
fragment.show(getSupportFragmentManager(), "LiveInputDialogFragment");
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
package com.yunbao.live.dialog;
|
||||
|
||||
import static android.content.Context.INPUT_METHOD_SERVICE;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.Drawable;
|
||||
@ -37,12 +39,12 @@ import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveActivity;
|
||||
import com.yunbao.live.activity.LiveAnchorActivity;
|
||||
import com.yunbao.live.activity.LiveRyAnchorActivity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static android.content.Context.INPUT_METHOD_SERVICE;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2017/8/21.
|
||||
* 直播间发言框
|
||||
@ -97,6 +99,7 @@ public class LiveInputDialogFragment extends AbsDialogFragment implements View.O
|
||||
@Override
|
||||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
|
||||
imm = (InputMethodManager) mContext.getSystemService(INPUT_METHOD_SERVICE);
|
||||
mInput = (EditText) mRootView.findViewById(R.id.input);
|
||||
radioHornType = mRootView.findViewById(R.id.radio_horn_type);
|
||||
@ -104,6 +107,11 @@ public class LiveInputDialogFragment extends AbsDialogFragment implements View.O
|
||||
RadioButton radioButton = mRootView.findViewById(id);
|
||||
radioHornTypes.add(radioButton);
|
||||
}
|
||||
if (mContext instanceof LiveRyAnchorActivity) {
|
||||
findViewById(R.id.btn_2).setVisibility(View.GONE);
|
||||
} else {
|
||||
findViewById(R.id.btn_2).setVisibility(View.VISIBLE);
|
||||
}
|
||||
mInput.setFocusable(true);
|
||||
mInput.setFocusableInTouchMode(true);
|
||||
mInput.requestFocus();
|
||||
|
@ -159,8 +159,6 @@ public class LiveTextRender {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (bean.isManager()) {//直播间管理员图标
|
||||
Drawable drawable = ContextCompat.getDrawable(CommonAppContext.sInstance, R.mipmap.icon_live_chat_m);
|
||||
if (drawable != null) {
|
||||
@ -336,15 +334,16 @@ public class LiveTextRender {
|
||||
}
|
||||
builder.append(name);
|
||||
//超皇设置渐变色展示昵称
|
||||
if (TextUtils.equals("7",bean.getNobleId())){
|
||||
if (TextUtils.equals("7", bean.getNobleId()) && !TextUtils.isEmpty(bean.getStartColor())) {
|
||||
|
||||
builder.setSpan(new LinearGradientFontSpan(Color.parseColor(bean.getStartColor()), Color.parseColor(bean.getEndColor())), length, length + name.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
}else {
|
||||
} else {
|
||||
builder.setSpan(new ForegroundColorSpan(color), length, length + name.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
}
|
||||
int lengthContent = builder.length();
|
||||
builder.append(bean.getContent());
|
||||
//超皇设置渐变色展示昵称
|
||||
if (TextUtils.equals("7",bean.getNobleId())){
|
||||
if (TextUtils.equals("7", bean.getNobleId()) && !TextUtils.isEmpty(bean.getContentColor())) {
|
||||
builder.setSpan(new ForegroundColorSpan(Color.parseColor(bean.getContentColor())), lengthContent, lengthContent + bean.getContent().length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
}
|
||||
if (bean.getType() == LiveChatBean.LIGHT) {
|
||||
|
Loading…
Reference in New Issue
Block a user