mirror of
				https://codeberg.org/tom79/Fedilab.git
				synced 2025-10-20 11:20:16 +03:00 
			
		
		
		
	Fix issue #71 - Fix colors for poll buttons
This commit is contained in:
		
							parent
							
								
									59df0d65a7
								
							
						
					
					
						commit
						cdeb2eb2db
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		|  | @ -1001,6 +1001,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> | ||||||
|         }); |         }); | ||||||
| 
 | 
 | ||||||
|         // --- POLL --- |         // --- POLL --- | ||||||
|  | 
 | ||||||
|         if (statusToDeal.poll != null && statusToDeal.poll.options != null) { |         if (statusToDeal.poll != null && statusToDeal.poll.options != null) { | ||||||
|             if (statusToDeal.poll.voted || statusToDeal.poll.expired) { |             if (statusToDeal.poll.voted || statusToDeal.poll.expired) { | ||||||
|                 holder.binding.poll.submitVote.setVisibility(View.GONE); |                 holder.binding.poll.submitVote.setVisibility(View.GONE); | ||||||
|  | @ -1047,6 +1048,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> | ||||||
|                         (holder.binding.poll.multipleChoice).removeAllViews(); |                         (holder.binding.poll.multipleChoice).removeAllViews(); | ||||||
|                     for (Poll.PollItem pollOption : statusToDeal.poll.options) { |                     for (Poll.PollItem pollOption : statusToDeal.poll.options) { | ||||||
|                         CheckBox cb = new CheckBox(context); |                         CheckBox cb = new CheckBox(context); | ||||||
|  |                         cb.setButtonTintList(ThemeHelper.getButtonColorStateList(context)); | ||||||
|                         cb.setText(pollOption.span_title, TextView.BufferType.SPANNABLE); |                         cb.setText(pollOption.span_title, TextView.BufferType.SPANNABLE); | ||||||
|                         holder.binding.poll.multipleChoice.addView(cb); |                         holder.binding.poll.multipleChoice.addView(cb); | ||||||
|                     } |                     } | ||||||
|  | @ -1057,6 +1059,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> | ||||||
|                         (holder.binding.poll.singleChoiceRadioGroup).removeAllViews(); |                         (holder.binding.poll.singleChoiceRadioGroup).removeAllViews(); | ||||||
|                     for (Poll.PollItem pollOption : statusToDeal.poll.options) { |                     for (Poll.PollItem pollOption : statusToDeal.poll.options) { | ||||||
|                         RadioButton rb = new RadioButton(context); |                         RadioButton rb = new RadioButton(context); | ||||||
|  |                         rb.setButtonTintList(ThemeHelper.getButtonColorStateList(context)); | ||||||
|                         rb.setText(pollOption.span_title, TextView.BufferType.SPANNABLE); |                         rb.setText(pollOption.span_title, TextView.BufferType.SPANNABLE); | ||||||
|                         holder.binding.poll.singleChoiceRadioGroup.addView(rb); |                         holder.binding.poll.singleChoiceRadioGroup.addView(rb); | ||||||
|                     } |                     } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue