Commit 873b85cc authored by Vladislav Bogdashkin's avatar Vladislav Bogdashkin 🎣

fix handle back on tour load view

parent 922364ce
...@@ -125,8 +125,7 @@ class DownloadTourDialogController : Controller { ...@@ -125,8 +125,7 @@ class DownloadTourDialogController : Controller {
snackbar.showSnackBar(error.localizedMessage) snackbar.showSnackBar(error.localizedMessage)
} }
)) ))
cancelDownloadText.setOnClickListener { cancelDownloadText.setOnClickListener {handleBack() }
downloadToken.isCancelled = true;handleBack() }
// downloadTour(it.tour.tour_id, downloadToken) // downloadTour(it.tour.tour_id, downloadToken)
// view.findViewById<View>(R.id.close_current_button).setOnClickListener { handleBack() } // view.findViewById<View>(R.id.close_current_button).setOnClickListener { handleBack() }
...@@ -147,7 +146,8 @@ class DownloadTourDialogController : Controller { ...@@ -147,7 +146,8 @@ class DownloadTourDialogController : Controller {
fun getLayoutId() = R.layout.download_tour_layout fun getLayoutId() = R.layout.download_tour_layout
override fun handleBack(): Boolean { override fun handleBack(): Boolean {
return router.popCurrentController() downloadToken.isCancelled = true
return router.popController(this)
} }
......
...@@ -80,7 +80,7 @@ class ChooseTourDialogController : Controller { ...@@ -80,7 +80,7 @@ class ChooseTourDialogController : Controller {
.subscribe(::onTourClicked) .subscribe(::onTourClicked)
) )
//view.findViewById<View>(R.id.close_current_button).setOnClickListener { handleBack() } view.findViewById<View>(R.id.close_current_button).setOnClickListener { handleBack() }
view.setOnClickListener { handleBack() } view.setOnClickListener { handleBack() }
return view return view
......
...@@ -7,12 +7,20 @@ ...@@ -7,12 +7,20 @@
android:orientation="vertical"> android:orientation="vertical">
<ImageView <ImageView
android:layout_width="match_parent" android:id="@+id/backgroundDownloader"
android:layout_height="match_parent" android:layout_width="match_parent"
android:id="@+id/backgroundDownloader" android:layout_height="match_parent"
android:scaleType="centerCrop" android:background="#A62B2727"
android:background="#A62B2727" android:scaleType="centerCrop"
/> android:clickable="true"
android:focusableInTouchMode="true"
android:focusable="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
......
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/playTourCardOpacityLight"> android:background="@color/playTourCardOpacityLight"
android:clickable="true"
android:focusableInTouchMode="true">
<com.google.android.material.card.MaterialCardView <com.google.android.material.card.MaterialCardView
android:layout_width="0dp" android:layout_width="0dp"
...@@ -45,8 +47,8 @@ ...@@ -45,8 +47,8 @@
android:focusable="true" android:focusable="true"
android:focusableInTouchMode="true" android:focusableInTouchMode="true"
android:scaleType="fitXY" android:scaleType="fitXY"
app:layout_constraintTop_toTopOf="parent" android:src="@drawable/ic_close_circled"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
android:src="@drawable/ic_close_circled" /> app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment