为选择礼物时候为灰色
This commit is contained in:
parent
950bcee232
commit
949ff20317
@ -1,10 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#FFF026" />
|
||||
<corners
|
||||
android:bottomLeftRadius="17dp"
|
||||
android:bottomRightRadius="17dp"
|
||||
android:topLeftRadius="17dp"
|
||||
android:topRightRadius="17dp" />
|
||||
</shape>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_selected="true">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#FFF026" />
|
||||
<corners android:bottomLeftRadius="17dp" android:bottomRightRadius="17dp" android:topLeftRadius="17dp" android:topRightRadius="17dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_selected="false">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#33ffffff" />
|
||||
<corners android:bottomLeftRadius="17dp" android:bottomRightRadius="17dp" android:topLeftRadius="17dp" android:topRightRadius="17dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
@ -74,7 +74,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="giftSendBgV,liveGiftSend,liveGiftImg,liveGiftSendTv"
|
||||
app:constraint_referenced_ids="giftSendBgV,liveGiftImg,liveGiftSendTv"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<!--底部钻石数量 -->
|
||||
|
@ -1261,7 +1261,7 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="main_anchor_live_notify_live">Watch</string>
|
||||
<string name="live_notify_settings">LiveNotify</string>
|
||||
<string name="leveling_points">%s experience upgrade,%s receive rewards</string>
|
||||
<string name="reach_the_top">You have reached the highest level!</string>
|
||||
<string name="reach_the_top">You level maxed out.</string>
|
||||
<string name="nothing_in_the_package_yet">There\'s nothing in the package yet</string>
|
||||
<string name="custom_quantity">Enter count</string>
|
||||
<string name="gift_wall">Gift wall</string>
|
||||
|
@ -1087,7 +1087,7 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="live_notify_settings">LiveNotify</string>
|
||||
<string name="leveling_points">%s experience upgrade,%s receive rewards</string>
|
||||
<string name="nothing_in_the_package_yet">There\'s nothing in the package yet</string>
|
||||
<string name="reach_the_top">You have reached the highest level!</string>
|
||||
<string name="reach_the_top">You level maxed out.</string>
|
||||
<string name="custom_quantity">Enter count</string>
|
||||
<string name="gift_wall">Gift Hall</string>
|
||||
<string name="has_been_lit">Has been lit %s</string>
|
||||
|
@ -80,12 +80,13 @@ public class LiveReportActivity extends AbsActivity implements LiveReportAdapter
|
||||
mRecyclerView.setHasFixedSize(true);
|
||||
mRecyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
|
||||
mKeyBoardHeightUtil = new KeyBoardHeightUtil(mContext, findViewById(android.R.id.content), this);
|
||||
mAdapter = new LiveReportAdapter(mContext);
|
||||
LiveHttpUtil.getLiveReportList(new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
List<LiveReportBean> list = JSON.parseArray(Arrays.toString(info), LiveReportBean.class);
|
||||
mAdapter = new LiveReportAdapter(mContext, list);
|
||||
mAdapter.setDataListFirst(list);
|
||||
mAdapter.setActionListener(LiveReportActivity.this);
|
||||
if (mRecyclerView != null) {
|
||||
mRecyclerView.setAdapter(mAdapter);
|
||||
|
@ -24,6 +24,8 @@ import com.yunbao.live.bean.LiveReportBean;
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
import io.rong.imlib.NativeObject;
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/12/15.
|
||||
* 增加功能:可以上传3张图片
|
||||
@ -52,6 +54,74 @@ public class LiveReportAdapter extends RecyclerView.Adapter {
|
||||
private int photoIndex = 0;
|
||||
private File mFile1, mFile2, mFile3;
|
||||
|
||||
public LiveReportAdapter(Context context) {
|
||||
mContext = context;
|
||||
mInflater = LayoutInflater.from(mContext);
|
||||
mCheckedDrawable = ContextCompat.getDrawable(mContext, R.mipmap.icon_cash_radio_1);
|
||||
mUnCheckedDrawable = ContextCompat.getDrawable(mContext, R.mipmap.icon_cash_radio_0);
|
||||
imageUtilInit();
|
||||
mOnClickListener = new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Object tag = v.getTag();
|
||||
if (tag == null) {
|
||||
return;
|
||||
}
|
||||
int position = (int) tag;
|
||||
LiveReportBean bean = mList.get(position - 1);
|
||||
if (mCheckedPosition == position) {
|
||||
bean.setChecked(false);
|
||||
notifyItemChanged(position, Constants.PAYLOAD);
|
||||
mCheckedPosition = -1;
|
||||
mCurVideoReportBean = null;
|
||||
} else {
|
||||
if (mCheckedPosition >= 0) {
|
||||
mList.get(mCheckedPosition - 1).setChecked(false);
|
||||
notifyItemChanged(mCheckedPosition, Constants.PAYLOAD);
|
||||
}
|
||||
bean.setChecked(true);
|
||||
notifyItemChanged(position, Constants.PAYLOAD);
|
||||
mCheckedPosition = position;
|
||||
mCurVideoReportBean = bean;
|
||||
}
|
||||
}
|
||||
};
|
||||
mReportListener = new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (v.getId() == R.id.btn_report){
|
||||
if (mFootVh != null) {
|
||||
mFootVh.submit();
|
||||
}
|
||||
}else if (v.getId() == R.id.photo1){
|
||||
photoIndex = 0;
|
||||
if (mFootVh != null) {
|
||||
mFootVh.showAddPhoto();
|
||||
}
|
||||
}
|
||||
else if (v.getId() == R.id.photo2){
|
||||
photoIndex = 1;
|
||||
if (mFootVh != null) {
|
||||
mFootVh.showAddPhoto();
|
||||
}
|
||||
}
|
||||
else if (v.getId() == R.id.photo3){
|
||||
photoIndex = 2;
|
||||
if (mFootVh != null) {
|
||||
mFootVh.showAddPhoto();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public void setDataListFirst(List<LiveReportBean> list) {
|
||||
mList = list;
|
||||
mCheckedPosition = -1;
|
||||
}
|
||||
|
||||
|
||||
public LiveReportAdapter(Context context, List<LiveReportBean> list) {
|
||||
mContext = context;
|
||||
mList = list;
|
||||
|
@ -310,6 +310,7 @@ public class LiveGiftPopup2 extends AbsDialogFragment {
|
||||
giftWrapTv.setAlpha(0.5f);
|
||||
liveGiftSend.setEnabled(false);
|
||||
giftSendGroup.setVisibility(View.INVISIBLE);
|
||||
liveGiftSend.setSelected(false);
|
||||
giftDescription.setVisibility(View.GONE);
|
||||
operateImage.setVisibility(View.GONE);
|
||||
giftLevelGroup.setVisibility(View.VISIBLE);
|
||||
@ -362,6 +363,7 @@ public class LiveGiftPopup2 extends AbsDialogFragment {
|
||||
giftWrapTv.setTextColor(ContextCompat.getColor(mContext, com.yunbao.live.R.color.feea36));
|
||||
isWrap = true;
|
||||
giftSendGroup.setVisibility(View.INVISIBLE);
|
||||
liveGiftSend.setSelected(false);
|
||||
GiftCacheUtil.getInstance().addDownloadList(mWrapGiftList);
|
||||
|
||||
//礼物过滤掉数量为0的礼物
|
||||
@ -392,6 +394,9 @@ public class LiveGiftPopup2 extends AbsDialogFragment {
|
||||
// liveGiftSendTv.setText(1+"");
|
||||
// liveGiftModel= mWrapGiftList.get(0);
|
||||
hideLianBtn();
|
||||
giftSendGroup.setVisibility(View.INVISIBLE);
|
||||
liveGiftSend.setSelected(false);
|
||||
liveGiftImg.setVisibility(View.INVISIBLE);
|
||||
} else {
|
||||
emptyGroup.setVisibility(View.VISIBLE);
|
||||
Log.i("LiveGiftPopup2", "包裹为空");
|
||||
@ -531,7 +536,7 @@ public class LiveGiftPopup2 extends AbsDialogFragment {
|
||||
ViewClicksAntiShake.clicksAntiShake(giftSendBgV, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
if (liveGiftModel.getType() == 7) return;
|
||||
if (liveGiftModel.getType() == 7 || isWrap) return;
|
||||
new XPopup.Builder(getContext())
|
||||
.enableDrag(false)
|
||||
.asCustom(new GiftNumberPopup(getContext()))
|
||||
@ -905,6 +910,7 @@ public class LiveGiftPopup2 extends AbsDialogFragment {
|
||||
continuousClicksBg.removeCallbacks(newLianSongRunnable);
|
||||
continuousClickGroup.setVisibility(View.VISIBLE);
|
||||
giftSendGroup.setVisibility(View.INVISIBLE);
|
||||
liveGiftSend.setSelected(false);
|
||||
mLianCountDownCount = 5;
|
||||
continuousClicksBg.post(newLianSongRunnable);
|
||||
}
|
||||
@ -915,6 +921,10 @@ public class LiveGiftPopup2 extends AbsDialogFragment {
|
||||
private void hideLianBtn() {
|
||||
continuousClickGroup.setVisibility(View.INVISIBLE);
|
||||
giftSendGroup.setVisibility(View.VISIBLE);
|
||||
liveGiftSend.setSelected(true);
|
||||
if (isWrap){
|
||||
liveGiftImg.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
continuousClicksBg.removeCallbacks(newLianSongRunnable);
|
||||
getCoin();
|
||||
if (liveGiftModel != null) {
|
||||
@ -1210,7 +1220,7 @@ public class LiveGiftPopup2 extends AbsDialogFragment {
|
||||
hideLianBtn();
|
||||
}
|
||||
giftSendGroup.setVisibility(View.INVISIBLE);
|
||||
|
||||
liveGiftSend.setSelected(false);
|
||||
mCount = DEFAULT_COUNT;
|
||||
liveGiftSendTv.setText(mCount);
|
||||
giftDescription.setVisibility(View.GONE);
|
||||
@ -1287,6 +1297,10 @@ public class LiveGiftPopup2 extends AbsDialogFragment {
|
||||
}
|
||||
liveGiftSend.setEnabled(true);
|
||||
giftSendGroup.setVisibility(View.VISIBLE);
|
||||
liveGiftSend.setSelected(true);
|
||||
if (isWrap){
|
||||
liveGiftImg.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
mCount = DEFAULT_COUNT;
|
||||
liveGiftSendTv.setText(mCount);
|
||||
if (giftSendGroup.getVisibility() == View.INVISIBLE) {
|
||||
|
@ -1869,10 +1869,8 @@
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/avatar_l3"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerInParent="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:scaleType="centerCrop"
|
||||
app:riv_oval="true" />
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user