Placed decrease buttons before increase buttons
This commit is contained in:
parent
b0ee9bb0d5
commit
8268a8f2dd
|
@ -63,11 +63,11 @@ open class ChipTanFlickerCodeView @JvmOverloads constructor(
|
|||
val inflater = context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater
|
||||
val rootView = inflater.inflate(R.layout.view_flicker_code, this, true)
|
||||
|
||||
rootView.btnIncreaseSize.setOnClickListener { increaseSize() }
|
||||
rootView.btnDecreaseSize.setOnClickListener { decreaseSize() }
|
||||
rootView.btnIncreaseSize.setOnClickListener { increaseSize() }
|
||||
|
||||
rootView.btnIncreaseSpeed.setOnClickListener { increaseFrequency() }
|
||||
rootView.btnDecreaseSpeed.setOnClickListener { decreaseFrequency() }
|
||||
rootView.btnIncreaseSpeed.setOnClickListener { increaseFrequency() }
|
||||
|
||||
btnPauseFlickerCode = rootView.btnPauseFlickerCode
|
||||
btnPauseFlickerCode.setOnClickListener { togglePauseFlickerCode() }
|
||||
|
@ -99,14 +99,6 @@ open class ChipTanFlickerCodeView @JvmOverloads constructor(
|
|||
|
||||
|
||||
|
||||
open fun increaseSize() {
|
||||
stripesHeight += StripesHeightStepSize
|
||||
stripesWidth += StripesWidthStepSize
|
||||
stripesMarginRight += StripesRightMarginStepSize
|
||||
|
||||
setWidth(context)
|
||||
}
|
||||
|
||||
open fun decreaseSize() {
|
||||
stripesHeight -= StripesHeightStepSize
|
||||
stripesWidth -= StripesWidthStepSize
|
||||
|
|
|
@ -39,19 +39,19 @@ open class TanImageView @JvmOverloads constructor(
|
|||
|
||||
imgTanImageView = rootView.imgTanImageView
|
||||
|
||||
rootView.btnIncreaseSize.setOnClickListener { increaseSize() }
|
||||
rootView.btnDecreaseSize.setOnClickListener { decreaseSize() }
|
||||
rootView.btnIncreaseSize.setOnClickListener { increaseSize() }
|
||||
}
|
||||
|
||||
|
||||
open fun increaseSize() {
|
||||
changeSizeBy(ChangeSizeStepSizeDp)
|
||||
}
|
||||
|
||||
open fun decreaseSize() {
|
||||
changeSizeBy(ChangeSizeStepSizeDp * -1)
|
||||
}
|
||||
|
||||
open fun increaseSize() {
|
||||
changeSizeBy(ChangeSizeStepSizeDp)
|
||||
}
|
||||
|
||||
protected open fun changeSizeBy(changeSizeBy: Float) {
|
||||
val params = imgTanImageView.layoutParams
|
||||
val newWidthAndHeight = params.height + convertDpToPx(context, changeSizeBy).toInt()
|
||||
|
|
|
@ -29,13 +29,6 @@
|
|||
android:text="@string/view_flicker_code_frequency"
|
||||
/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnIncreaseSpeed"
|
||||
android:layout_width="@dimen/view_tan_image_controls_buttons_width"
|
||||
android:layout_height="@dimen/view_tan_image_controls_buttons_height"
|
||||
android:text="@string/view_flicker_code_increase_frequency"
|
||||
/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnDecreaseSpeed"
|
||||
android:layout_width="@dimen/view_tan_image_controls_buttons_width"
|
||||
|
@ -43,6 +36,13 @@
|
|||
android:text="@string/view_flicker_code_decrease_frequency"
|
||||
/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnIncreaseSpeed"
|
||||
android:layout_width="@dimen/view_tan_image_controls_buttons_width"
|
||||
android:layout_height="@dimen/view_tan_image_controls_buttons_height"
|
||||
android:text="@string/view_flicker_code_increase_frequency"
|
||||
/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btnPauseFlickerCode"
|
||||
android:layout_width="@dimen/view_tan_image_controls_buttons_width"
|
||||
|
|
|
@ -15,13 +15,6 @@
|
|||
android:text="@string/view_tan_image_size_controls_size"
|
||||
/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnIncreaseSize"
|
||||
android:layout_width="@dimen/view_tan_image_controls_buttons_width"
|
||||
android:layout_height="@dimen/view_tan_image_controls_buttons_height"
|
||||
android:text="@string/view_tan_image_size_controls_increase_size"
|
||||
/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnDecreaseSize"
|
||||
android:layout_width="@dimen/view_tan_image_controls_buttons_width"
|
||||
|
@ -29,4 +22,11 @@
|
|||
android:text="@string/view_tan_image_size_controls_decrease_size"
|
||||
/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnIncreaseSize"
|
||||
android:layout_width="@dimen/view_tan_image_controls_buttons_width"
|
||||
android:layout_height="@dimen/view_tan_image_controls_buttons_height"
|
||||
android:text="@string/view_tan_image_size_controls_increase_size"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
|
@ -55,12 +55,12 @@
|
|||
<string name="dialog_transfer_money_message_transfer_failed">Could not transfer %1$s %2$s to %3$s:\n%4$s.</string>
|
||||
|
||||
<string name="view_tan_image_size_controls_size">Size:</string>
|
||||
<string name="view_tan_image_size_controls_increase_size">+</string>
|
||||
<string name="view_tan_image_size_controls_decrease_size">-</string>
|
||||
<string name="view_tan_image_size_controls_increase_size">+</string>
|
||||
|
||||
<string name="view_flicker_code_frequency">Frequency:</string>
|
||||
<string name="view_flicker_code_increase_frequency">+</string>
|
||||
<string name="view_flicker_code_decrease_frequency">-</string>
|
||||
<string name="view_flicker_code_increase_frequency">+</string>
|
||||
|
||||
<string name="dialog_enter_tan_select_tan_procedure">TAN procedure</string>
|
||||
<string name="dialog_enter_tan_select_tan_medium">TAN medium</string>
|
||||
|
|
Loading…
Reference in New Issue