Fix onButtonClick bug on Android 6.0
This commit is contained in:
parent
7db42212ea
commit
691bddcc00
4 changed files with 7 additions and 5 deletions
|
@ -56,6 +56,8 @@ class ConfirmationActivity : ActivityBase() {
|
|||
setContentView(R.layout.activity_confirmation)
|
||||
actionBar?.setDisplayHomeAsUpEnabled(true)
|
||||
|
||||
confirm_fab.setOnClickListener(this::onButtonClicked)
|
||||
|
||||
// displayImageLayout must be called before displayDetails
|
||||
// to ensure uncompressed image size is available
|
||||
displayImageLayout()
|
||||
|
|
|
@ -12,6 +12,7 @@ import eu.depau.etchdroid.R
|
|||
import eu.depau.etchdroid.StateKeeper
|
||||
import eu.depau.etchdroid.enums.FlashMethod
|
||||
import eu.depau.etchdroid.utils.DoNotShowAgainDialogFragment
|
||||
import kotlinx.android.synthetic.main.activity_start.*
|
||||
import java.io.File
|
||||
|
||||
|
||||
|
@ -34,6 +35,8 @@ class StartActivity : ActivityBase() {
|
|||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_start)
|
||||
btn_image_raw.setOnClickListener(this::onButtonClicked)
|
||||
btn_image_dmg.setOnClickListener(this::onButtonClicked)
|
||||
}
|
||||
|
||||
fun onButtonClicked(view: View) = onButtonClicked(view, true)
|
||||
|
|
|
@ -215,7 +215,6 @@
|
|||
android:layout_marginBottom="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:onClick="onButtonClicked"
|
||||
app:srcCompat="@drawable/ic_twotone_save_alt_24px"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -38,8 +38,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:theme="@style/CardContentStyle"
|
||||
android:foreground="?attr/selectableItemBackground"
|
||||
android:onClick="onButtonClicked">
|
||||
android:foreground="?attr/selectableItemBackground">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
|
@ -102,8 +101,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:theme="@style/CardContentStyle"
|
||||
android:foreground="?attr/selectableItemBackground"
|
||||
android:onClick="onButtonClicked">
|
||||
android:foreground="?attr/selectableItemBackground">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView2"
|
||||
|
|
Loading…
Reference in a new issue