投票修复测试回报问题
This commit is contained in:
parent
bd8cf94171
commit
070312ff53
@ -1175,6 +1175,6 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="live_vote_close_yes">Yes</string>
|
||||
<string name="live_vote_close_no">No</string>
|
||||
<string name="live_vote_hide_text">VOTE</string>
|
||||
<string name="live_room_vote_over_tip">%s \n box disappears after %s seconds</string>
|
||||
<string name="live_room_vote_over_tip">%s <br/> box disappears after %s seconds</string>
|
||||
<string name="live_anchor_vote_tip">Please complete the form.</string>
|
||||
</resources>
|
||||
|
@ -1159,7 +1159,7 @@
|
||||
<string name="live_vote_close_yes">是</string>
|
||||
<string name="live_vote_close_no">否</string>
|
||||
<string name="live_vote_hide_text">投票中</string>
|
||||
<string name="live_room_vote_over_tip">%s \n 問答框%s秒后消失</string>
|
||||
<string name="live_room_vote_over_tip">%s <br/> 問答框%s秒后消失</string>
|
||||
<string name="live_anchor_vote_tip">請完整填寫</string>
|
||||
<string name="complete_information_consumable">填寫“*”的選項可完成</string>
|
||||
<string name="love_powder">真愛粉\n頭像框(7天)</string>
|
||||
|
@ -1158,7 +1158,7 @@
|
||||
<string name="live_vote_close_yes">是</string>
|
||||
<string name="live_vote_close_no">否</string>
|
||||
<string name="live_vote_hide_text">投票中</string>
|
||||
<string name="live_room_vote_over_tip">%s \n 問答框%s秒后消失</string>
|
||||
<string name="live_room_vote_over_tip">%s <br/> 問答框%s秒后消失</string>
|
||||
<string name="live_anchor_vote_tip">請完整填寫</string>
|
||||
<string name="complete_information_consumable">填寫“*”的選項可完成</string>
|
||||
<string name="love_powder">真愛粉\n頭像框(7天)</string>
|
||||
|
@ -1160,7 +1160,7 @@
|
||||
<string name="live_vote_close_yes">是</string>
|
||||
<string name="live_vote_close_no">否</string>
|
||||
<string name="live_vote_hide_text">投票中</string>
|
||||
<string name="live_room_vote_over_tip">%s \n 問答框%s秒后消失</string>
|
||||
<string name="live_room_vote_over_tip">%s <br/> 問答框%s秒后消失</string>
|
||||
<string name="live_anchor_vote_tip">請完整填寫</string>
|
||||
<string name="complete_information_consumable">填寫“*”的選項可完成</string>
|
||||
<string name="love_powder">真愛粉\n頭像框(7天)</string>
|
||||
|
@ -1165,7 +1165,7 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="live_vote_close_yes">Yes</string>
|
||||
<string name="live_vote_close_no">No</string>
|
||||
<string name="live_vote_hide_text">VOTE</string>
|
||||
<string name="live_room_vote_over_tip">%s \n box disappears after %s seconds</string>
|
||||
<string name="live_room_vote_over_tip">%s <br/> box disappears after %s seconds</string>
|
||||
<string name="live_anchor_vote_tip">Please complete the form.</string>
|
||||
<string name="complete_information">Fill And gift</string>
|
||||
<string name="complete_information_consumable">Fill in the \'*\' option to complete</string>
|
||||
|
@ -4,6 +4,7 @@ import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.text.Html;
|
||||
import android.view.View;
|
||||
import android.view.animation.Animation;
|
||||
import android.view.animation.AnimationUtils;
|
||||
@ -44,11 +45,9 @@ public class LiveRoomVoteManager {
|
||||
|
||||
|
||||
LiveRoomVoteModel createVoteModel;
|
||||
private Map<String,Boolean> foldMap;
|
||||
|
||||
public LiveRoomVoteManager(Context mContext, View root) {
|
||||
this.mContext = mContext;
|
||||
foldMap=new HashMap<>();
|
||||
mAnchorVoteHide = root.findViewById(R.id.vote_hide);
|
||||
mVoteShow = root.findViewById(R.id.vote_show);
|
||||
mClose = root.findViewById(R.id.vote_close);
|
||||
@ -151,7 +150,7 @@ public class LiveRoomVoteManager {
|
||||
cancel();
|
||||
return;
|
||||
}
|
||||
mTitle.setText(String.format(mContext.getString(R.string.live_room_vote_over_tip), msg, time + ""));
|
||||
mTitle.setText(Html.fromHtml(String.format(mContext.getString(R.string.live_room_vote_over_tip), msg, time + "")));
|
||||
});
|
||||
}
|
||||
}, 0, 1000);
|
||||
@ -164,14 +163,10 @@ public class LiveRoomVoteManager {
|
||||
return;
|
||||
}
|
||||
this.createVoteModel = createVoteModel;
|
||||
if(!createVoteModel.isVote()) {
|
||||
if (isFold(createVoteModel.getLiveUid())) {
|
||||
fold();
|
||||
} else {
|
||||
expansion();
|
||||
}
|
||||
}else {
|
||||
if (createVoteModel.isVote()) {
|
||||
fold();
|
||||
}else{
|
||||
expansion();
|
||||
}
|
||||
mTitle.setText(createVoteModel.getContent());
|
||||
mSubmit.setText(createVoteModel.getAnswer1());
|
||||
@ -203,8 +198,12 @@ public class LiveRoomVoteManager {
|
||||
mProgress.setMax(createVoteModel.getAnswer1Num() + createVoteModel.getAnswer2Num());
|
||||
setLength(createVoteModel.getAnswer1Num());
|
||||
}
|
||||
if(isAnchor){
|
||||
if (isAnchor) {
|
||||
mClose.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
if (mSubmit.getTag() != null && mSubmit.getTag().equals(createVoteModel.getLiveUid())) {
|
||||
new Handler(Looper.getMainLooper()).postDelayed(this::fold,300);
|
||||
}
|
||||
}
|
||||
show();
|
||||
} catch (Exception e) {
|
||||
@ -222,11 +221,9 @@ public class LiveRoomVoteManager {
|
||||
boolean hide = mAnchorVoteHide.getTag() == null || (boolean) mAnchorVoteHide.getTag();
|
||||
Animation animation;
|
||||
if (hide) {
|
||||
foldMap.put(createVoteModel.getLiveUid(),true);
|
||||
animation = AnimationUtils.loadAnimation(mContext, R.anim.view_live_anchor_vote_out);
|
||||
} else {
|
||||
animation = AnimationUtils.loadAnimation(mContext, R.anim.view_live_anchor_vote_in);
|
||||
foldMap.put(createVoteModel.getLiveUid(),false);
|
||||
}
|
||||
animation.setAnimationListener(new Animation.AnimationListener() {
|
||||
@Override
|
||||
@ -276,18 +273,16 @@ public class LiveRoomVoteManager {
|
||||
voteLayout.setVisibility(View.GONE);
|
||||
mSubmit.setTag(null);
|
||||
}
|
||||
public void fold(){
|
||||
if(mVoteShow.getVisibility()!=View.VISIBLE){
|
||||
hideAnchorVote();
|
||||
}
|
||||
}
|
||||
public void expansion(){
|
||||
if(mVoteShow.getVisibility()==View.VISIBLE){
|
||||
|
||||
public void fold() {
|
||||
if (mVoteShow.getVisibility() != View.VISIBLE) {
|
||||
hideAnchorVote();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isFold(String mLiveUid) {
|
||||
return foldMap.containsKey(mLiveUid)&& Boolean.TRUE.equals(foldMap.get(mLiveUid));
|
||||
public void expansion() {
|
||||
if (mVoteShow.getVisibility() == View.VISIBLE) {
|
||||
hideAnchorVote();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3683,7 +3683,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
}
|
||||
|
||||
public void dismissVote(String msg, String data) {
|
||||
voteManager.endTimerTask(msg);
|
||||
voteManager.endTimerTask(data);
|
||||
LiveChatBean bean = new LiveChatBean();
|
||||
bean.setType(LiveChatBean.SYSTEM3_COLOR);
|
||||
bean.setContent(data);
|
||||
|
@ -8,7 +8,7 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/live_room_vote"
|
||||
android:layout_width="130dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="88dp"
|
||||
android:layout_marginTop="-8dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:background="@drawable/background_cc000"
|
||||
@ -20,28 +20,35 @@
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_weight="8"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
tools:text="主播的這個舞蹈你 喜歡嗎"
|
||||
app:autoSizeTextType="uniform"
|
||||
app:autoSizeMinTextSize="9sp"
|
||||
app:autoSizeMaxTextSize="16sp"
|
||||
app:autoSizeStepGranularity="1sp"
|
||||
tools:text="各位粉絲團的親親親想聽什麽歌曲聽什麽都可以只要你想聽哈哈哈哈哈?"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp" />
|
||||
/>
|
||||
|
||||
<ProgressBar
|
||||
android:layout_weight="1"
|
||||
android:id="@+id/vote_progress"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="8dp"
|
||||
android:layout_marginTop="9dp"
|
||||
android:layout_height="0dp"
|
||||
|
||||
android:max="20"
|
||||
android:progress="10"
|
||||
android:progressDrawable="@drawable/live_room_qa_progress"
|
||||
android:rotationY="180" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_weight="5"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
@ -50,15 +57,18 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
app:autoSizeTextType="uniform"
|
||||
app:autoSizeMinTextSize="5sp"
|
||||
app:autoSizeMaxTextSize="14sp"
|
||||
app:autoSizeStepGranularity="1sp"
|
||||
android:gravity="center"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
tools:text="喜欢"
|
||||
tools:text="喜欢喜欢喜欢喜欢"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<View
|
||||
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#FFF" />
|
||||
@ -70,9 +80,13 @@
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
app:autoSizeTextType="uniform"
|
||||
app:autoSizeMinTextSize="5sp"
|
||||
app:autoSizeMaxTextSize="14sp"
|
||||
app:autoSizeStepGranularity="1sp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
tools:text="不喜欢"
|
||||
tools:text="不喜欢不喜欢不喜"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
Loading…
Reference in New Issue
Block a user