mirror of
https://github.com/nextcloud/talk-android
synced 2025-02-10 08:32:34 +00:00
fix margins for poll checkboxes
checkbox was cut off to the left. probably some material design update changed this. Now there is no need to modify the margin anymore. Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
eaa0743027
commit
89d004b32d
@ -15,7 +15,6 @@ import android.view.View
|
|||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.widget.CheckBox
|
import android.widget.CheckBox
|
||||||
import android.widget.CompoundButton
|
import android.widget.CompoundButton
|
||||||
import android.widget.LinearLayout
|
|
||||||
import android.widget.RadioButton
|
import android.widget.RadioButton
|
||||||
import androidx.appcompat.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
@ -139,16 +138,9 @@ class PollVoteFragment : Fragment() {
|
|||||||
} else {
|
} else {
|
||||||
binding.voteOptionsCheckboxesWrapper.removeAllViews()
|
binding.voteOptionsCheckboxesWrapper.removeAllViews()
|
||||||
|
|
||||||
val layoutParams = LinearLayout.LayoutParams(
|
|
||||||
ViewGroup.LayoutParams.WRAP_CONTENT,
|
|
||||||
ViewGroup.LayoutParams.WRAP_CONTENT
|
|
||||||
)
|
|
||||||
layoutParams.marginStart = CHECKBOX_MARGIN_LEFT
|
|
||||||
|
|
||||||
poll.options?.map { option ->
|
poll.options?.map { option ->
|
||||||
CheckBox(context).apply {
|
CheckBox(context).apply {
|
||||||
text = option
|
text = option
|
||||||
setLayoutParams(layoutParams)
|
|
||||||
}
|
}
|
||||||
}?.forEachIndexed { index, checkBox ->
|
}?.forEachIndexed { index, checkBox ->
|
||||||
viewThemeUtils.platform.themeCheckbox(checkBox)
|
viewThemeUtils.platform.themeCheckbox(checkBox)
|
||||||
@ -216,7 +208,6 @@ class PollVoteFragment : Fragment() {
|
|||||||
companion object {
|
companion object {
|
||||||
private val TAG = PollVoteFragment::class.java.simpleName
|
private val TAG = PollVoteFragment::class.java.simpleName
|
||||||
private const val UNLIMITED_VOTES = 0
|
private const val UNLIMITED_VOTES = 0
|
||||||
private const val CHECKBOX_MARGIN_LEFT = -18
|
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun newInstance(): PollVoteFragment {
|
fun newInstance(): PollVoteFragment {
|
||||||
|
Loading…
Reference in New Issue
Block a user