111
This commit is contained in:
@@ -858,7 +858,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
* 打开聊天输入框
|
||||
*/
|
||||
public void openChatWindow() {
|
||||
if ("1".equals(Constants.isSend)) {
|
||||
// if ("1".equals(Constants.isSend)) {
|
||||
if (mKeyBoardHeightUtil == null) {
|
||||
mKeyBoardHeightUtil = new KeyBoardHeightUtil2(mContext, super.findViewById(android.R.id.content), this);
|
||||
mKeyBoardHeightUtil.start();
|
||||
@@ -872,9 +872,9 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
bundle.putString(Constants.COIN_NAME, mCoinName);
|
||||
fragment.setArguments(bundle);
|
||||
fragment.show(getSupportFragmentManager(), "LiveInputDialogFragment");
|
||||
} else {
|
||||
showTaskDialog();
|
||||
}
|
||||
// } else {
|
||||
// showTaskDialog();
|
||||
// }
|
||||
}
|
||||
|
||||
private void showTaskDialog() {
|
||||
|
||||
@@ -275,7 +275,6 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
if (bundle != null) {
|
||||
mLiveUid = bundle.getString(Constants.LIVE_UID);
|
||||
mStream = bundle.getString(Constants.LIVE_STREAM);
|
||||
ToastUtil.show("啊"+ bundle.getString(Constants.LIVE_WISH_GIFTID));
|
||||
mWishGiftId = bundle.getString(Constants.LIVE_WISH_GIFTID);
|
||||
by = bundle.getString("by");
|
||||
}
|
||||
@@ -428,9 +427,8 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
|
||||
private void showGiftList(List<LiveGiftBean> list) {
|
||||
if (IMLoginManager.get(mContext).isNewUserGif() == true && type_name.equals("熱門")|| type_name.equals("Hot")) {
|
||||
|
||||
list.add(0, bean1);
|
||||
if(mWishGiftId==null) {
|
||||
|
||||
mWishGiftId = "" + bean1.getId();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,6 +59,7 @@ public class LivePromotionDialogFragment extends AbsDialogFragment {
|
||||
mRefreshView = mRootView.findViewById(R.id.refreshView);
|
||||
livePromotionAdapter = new LivePromotionAdapter(mContext, LiveActivity.mLiveUid,this );
|
||||
mRefreshView.setLayoutManager(new GridLayoutManager(mContext, 4));
|
||||
mRefreshView.setLoadMoreEnable(false);
|
||||
mRefreshView.setDataHelper(new CommonRefreshView.DataHelper<LivePromotionBean>() {
|
||||
@Override
|
||||
public RefreshAdapter<LivePromotionBean> getAdapter() {
|
||||
@@ -89,7 +90,7 @@ public class LivePromotionDialogFragment extends AbsDialogFragment {
|
||||
|
||||
@Override
|
||||
public void onLoadMoreSuccess(List<LivePromotionBean> loadItemList, int loadItemCount) {
|
||||
livePromotionAdapter.insertList(loadItemList);
|
||||
// livePromotionAdapter.insertList(loadItemList);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.yunbao.common.dialog.AbsDialogFragment;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.activity.LiveActivity;
|
||||
@@ -111,6 +112,7 @@ public class NewUserDialog extends AbsDialogFragment {
|
||||
public void onClick(View view) {
|
||||
EventBus.getDefault().post("showBanner");
|
||||
EventBus.getDefault().post("svga_new_user_gif");
|
||||
IMLoginManager.get(mContext).setNewUserGif(true);
|
||||
countDownTimer.cancel();
|
||||
dismiss();
|
||||
}
|
||||
|
||||
@@ -299,7 +299,8 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
JSONObject old_obj = JSON.parseObject(info[0]);
|
||||
|
||||
JSONObject obj = old_obj.getJSONObject("task");
|
||||
JSONObject obj = old_obj.getJSONObject("task");
|
||||
if (obj != null) {
|
||||
JSONObject obj1 = old_obj.getJSONObject("gift");
|
||||
JSONObject reward_one = old_obj.getJSONObject("reward_one");
|
||||
|
||||
@@ -313,8 +314,8 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
|
||||
bean1.setName(obj1.getString("giftname"));
|
||||
bean1.setTag("1");
|
||||
|
||||
if( IMLoginManager.get(mContext).isisNewUserOne() == false) {
|
||||
if(obj.getString("sendgift").equals("0")) {
|
||||
if (IMLoginManager.get(mContext).isisNewUserOne() == false) {
|
||||
if (obj.getString("sendgift").equals("0")) {
|
||||
EventBus.getDefault().post("svga_new_user_gif");
|
||||
}
|
||||
}
|
||||
@@ -324,7 +325,6 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
|
||||
mBannerList3.add(banner3Bean);
|
||||
|
||||
|
||||
|
||||
BannerBean banner3Bean1 = new BannerBean();
|
||||
banner3Bean1.setImageUrl("https://qny.shayucm.com/live_Mission_box.png");
|
||||
banner3Bean1.setLink(obj.getString("attent"));
|
||||
@@ -335,14 +335,15 @@ public class LiveLinkMicPresenter implements View.OnClickListener {
|
||||
banner3Bean2.setLink(obj.getString("illumine"));
|
||||
mBannerList3.add(banner3Bean2);
|
||||
|
||||
if(obj.getString("sendgift").equals("0")&& IMLoginManager.get(context).isisNewUserOne() == false) {
|
||||
if (obj.getString("sendgift").equals("0") && IMLoginManager.get(context).isisNewUserOne() == false) {
|
||||
showBanner3();
|
||||
}else if(obj.getString("attent").equals("0")&& IMLoginManager.get(context).isisNewUserOne() == false){
|
||||
} else if (obj.getString("attent").equals("0") && IMLoginManager.get(context).isisNewUserOne() == false) {
|
||||
showBanner3();
|
||||
}else if(obj.getString("illumine").equals("0")&& IMLoginManager.get(context).isisNewUserOne()== false){
|
||||
} else if (obj.getString("illumine").equals("0") && IMLoginManager.get(context).isisNewUserOne() == false) {
|
||||
showBanner3();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
47
live/src/main/java/com/yunbao/live/utils/CenterTextView.java
Normal file
47
live/src/main/java/com/yunbao/live/utils/CenterTextView.java
Normal file
@@ -0,0 +1,47 @@
|
||||
package com.yunbao.live.utils;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Paint;
|
||||
import android.text.Layout;
|
||||
import android.text.StaticLayout;
|
||||
import android.text.TextPaint;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.TextView;
|
||||
|
||||
@SuppressLint("AppCompatCustomView")
|
||||
public class CenterTextView extends TextView {
|
||||
private StaticLayout mStaticLayout;
|
||||
private TextPaint mTextPaint;
|
||||
|
||||
public CenterTextView(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
public CenterTextView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
public CenterTextView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
|
||||
super.onSizeChanged(w, h, oldw, oldh);
|
||||
initView();
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
mTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG);
|
||||
mTextPaint.setTextSize(getTextSize());
|
||||
mTextPaint.setColor(getCurrentTextColor());
|
||||
mStaticLayout = new StaticLayout(getText(), mTextPaint, getWidth(), Layout.Alignment.ALIGN_CENTER, 1.0f, 0.0f, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
mStaticLayout.draw(canvas);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user