|
@ -205,23 +205,17 @@ class TopicAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { |
|
|
|
|
|
|
|
|
if (poll.getAvailableVoteCount() > 1) { |
|
|
if (poll.getAvailableVoteCount() > 1) { |
|
|
for (Poll.Entry entry : entries) { |
|
|
for (Poll.Entry entry : entries) { |
|
|
LinearLayout container = new LinearLayout(context); |
|
|
|
|
|
container.setOrientation(LinearLayout.HORIZONTAL); |
|
|
|
|
|
CheckBox checkBox = new CheckBox(context); |
|
|
CheckBox checkBox = new CheckBox(context); |
|
|
TextView label = new TextView(context); |
|
|
checkBox.setTextColor(primaryTextColor); |
|
|
label.setTextColor(primaryTextColor); |
|
|
checkBox.setMovementMethod(LinkMovementMethod.getInstance()); |
|
|
label.setMovementMethod(LinkMovementMethod.getInstance()); |
|
|
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { |
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { |
|
|
label.setText(Html.fromHtml(entry.getEntryName(), Html.FROM_HTML_MODE_LEGACY)); |
|
|
checkBox.setText(Html.fromHtml(entry.getEntryName(), Html.FROM_HTML_MODE_LEGACY)); |
|
|
} else { |
|
|
} else { |
|
|
//noinspection deprecation
|
|
|
//noinspection deprecation
|
|
|
label.setText(Html.fromHtml(entry.getEntryName())); |
|
|
checkBox.setText(Html.fromHtml(entry.getEntryName())); |
|
|
} |
|
|
} |
|
|
label.setText(ThmmyParser.html2span(context, entry.getEntryName())); |
|
|
|
|
|
checkBox.setTextColor(primaryTextColor); |
|
|
checkBox.setTextColor(primaryTextColor); |
|
|
container.addView(checkBox); |
|
|
holder.optionsLayout.addView(checkBox); |
|
|
container.addView(label); |
|
|
|
|
|
holder.optionsLayout.addView(container); |
|
|
|
|
|
} |
|
|
} |
|
|
holder.voteChart.setVisibility(View.GONE); |
|
|
holder.voteChart.setVisibility(View.GONE); |
|
|
holder.optionsLayout.setVisibility(View.VISIBLE); |
|
|
holder.optionsLayout.setVisibility(View.VISIBLE); |
|
|