Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
055d002a34
@ -76,8 +76,8 @@ public class LiveRoomVoteManager {
|
||||
mCancel.setText(R.string.live_vote_close_no);
|
||||
mCancel.setOnClickListener(v -> {
|
||||
mTitle.setText(createVoteModel.getContent());
|
||||
mSubmit.setText(createVoteModel.getAnswer1());
|
||||
mCancel.setText(createVoteModel.getAnswer2());
|
||||
mSubmit.setText(getAnswerText(createVoteModel.getAnswer1()));
|
||||
mCancel.setText(getAnswerText(createVoteModel.getAnswer2()));
|
||||
initClick();
|
||||
});
|
||||
mSubmit.setOnClickListener(v -> endAnchorVote());
|
||||
@ -92,6 +92,12 @@ public class LiveRoomVoteManager {
|
||||
mSubmit.setOnClickListener(v -> updateVote(true));
|
||||
mCancel.setOnClickListener(v -> updateVote(false));
|
||||
}
|
||||
private String getAnswerText(String answer){
|
||||
if(answer.length()>4){
|
||||
return answer.substring(0,4)+"\n"+answer.substring(4);
|
||||
}
|
||||
return answer;
|
||||
}
|
||||
|
||||
private void updateVote(boolean isSubmit) {
|
||||
LiveNetManager.get(mContext)
|
||||
@ -136,8 +142,8 @@ public class LiveRoomVoteManager {
|
||||
mCancel.setOnClickListener(null);
|
||||
mSubmit.setOnClickListener(null);
|
||||
|
||||
mSubmit.setText(createVoteModel.getAnswer1());
|
||||
mCancel.setText(createVoteModel.getAnswer2());
|
||||
mSubmit.setText(getAnswerText(createVoteModel.getAnswer1()));
|
||||
mCancel.setText(getAnswerText(createVoteModel.getAnswer2()));
|
||||
|
||||
new Timer().schedule(new TimerTask() {
|
||||
int time = 6;
|
||||
@ -169,8 +175,8 @@ public class LiveRoomVoteManager {
|
||||
expansion();
|
||||
}
|
||||
mTitle.setText(createVoteModel.getContent());
|
||||
mSubmit.setText(createVoteModel.getAnswer1());
|
||||
mCancel.setText(createVoteModel.getAnswer2());
|
||||
mSubmit.setText(getAnswerText(createVoteModel.getAnswer1()));
|
||||
mCancel.setText(getAnswerText(createVoteModel.getAnswer2()));
|
||||
mCancel.setOnClickListener(null);
|
||||
mSubmit.setOnClickListener(null);
|
||||
if (mSubmit.getTag() == null || !mSubmit.getTag().equals(createVoteModel.getLiveUid())) {
|
||||
|
@ -22,23 +22,23 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_weight="8"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginTop="0dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
app:autoSizeTextType="uniform"
|
||||
app:autoSizeMinTextSize="9sp"
|
||||
app:autoSizeMaxTextSize="16sp"
|
||||
app:autoSizeStepGranularity="1sp"
|
||||
tools:text="各位粉絲團的親親親想聽什麽歌曲聽什麽都可以只要你想聽哈哈哈哈哈?"
|
||||
android:layout_weight="8"
|
||||
android:gravity="center"
|
||||
android:textColor="#FFFFFF"
|
||||
/>
|
||||
app:autoSizeMaxTextSize="16sp"
|
||||
app:autoSizeMinTextSize="10sp"
|
||||
app:autoSizeStepGranularity="1sp"
|
||||
app:autoSizeTextType="uniform"
|
||||
tools:text="各位粉絲團的親親親想聽什麽歌曲聽什麽都可以只要你想聽哈哈哈哈哈" />
|
||||
|
||||
<ProgressBar
|
||||
android:layout_weight="1"
|
||||
android:id="@+id/vote_progress"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
|
||||
android:max="20"
|
||||
android:progress="10"
|
||||
@ -46,9 +46,9 @@
|
||||
android:rotationY="180" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_weight="5"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="5"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
@ -57,16 +57,17 @@
|
||||
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:minLines="2"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
tools:text="喜欢喜欢喜欢喜欢"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp" />
|
||||
android:textSize="14sp"
|
||||
app:autoSizeMaxTextSize="14sp"
|
||||
app:autoSizeMinTextSize="5sp"
|
||||
app:autoSizeStepGranularity="1sp"
|
||||
app:autoSizeTextType="uniform"
|
||||
tools:text="喜欢喜欢喜欢喜欢" />
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
@ -80,15 +81,16 @@
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
app:autoSizeTextType="uniform"
|
||||
app:autoSizeMinTextSize="5sp"
|
||||
app:autoSizeMaxTextSize="14sp"
|
||||
app:autoSizeStepGranularity="1sp"
|
||||
android:minLines="2"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingBottom="5dp"
|
||||
tools:text="不喜欢不喜欢不喜"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="14sp" />
|
||||
android:textSize="14sp"
|
||||
app:autoSizeMaxTextSize="14sp"
|
||||
app:autoSizeMinTextSize="5sp"
|
||||
app:autoSizeStepGranularity="1sp"
|
||||
app:autoSizeTextType="uniform"
|
||||
tools:text="不喜欢不喜欢不喜" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
Loading…
Reference in New Issue
Block a user