Skip to content
Snippets Groups Projects
Verified Commit 94d4d2d2 authored by Torsten Grote's avatar Torsten Grote
Browse files

Add cancel button in STARTING state

parent 8bb7f4a3
No related branches found
No related tags found
1 merge request!164Add cancel button in STARTING state
......@@ -23,6 +23,7 @@ import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.Button
import android.widget.TextView
import androidx.fragment.app.Fragment
import androidx.fragment.app.activityViewModels
......@@ -53,6 +54,11 @@ class StartupFragment : Fragment() {
}
viewModel.startLifecycle()
v.findViewById<Button>(R.id.button).setOnClickListener {
viewModel.stopLifecycle()
requireActivity().finishAffinity()
}
}
private fun onAppStateChanged(state: MailboxAppState) {
......
......@@ -46,4 +46,16 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/statusHeadline" />
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:text="@string/cancel"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/statusDetail"
app:layout_constraintVertical_bias="1.0" />
</androidx.constraintlayout.widget.ConstraintLayout>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment