Commit da427cab authored by Vladislav Bogdashkin's avatar Vladislav Bogdashkin 🎣

proper close floating button

parent d32c134f
...@@ -11,7 +11,6 @@ import androidx.recyclerview.widget.RecyclerView ...@@ -11,7 +11,6 @@ import androidx.recyclerview.widget.RecyclerView
import butterknife.BindView import butterknife.BindView
import com.biganto.visual.roompark.R import com.biganto.visual.roompark.R
import com.biganto.visual.roompark.conductor.dialogs.change_handler.DialogChangeHandler import com.biganto.visual.roompark.conductor.dialogs.change_handler.DialogChangeHandler
import com.biganto.visual.roompark.conductor.dialogs.change_handler.PhotoDialogController
import com.biganto.visual.roompark.domain.model.PhotoResolutionModel import com.biganto.visual.roompark.domain.model.PhotoResolutionModel
import com.biganto.visual.roompark.presentation.screen.settings.util.CommonRecyclerAdapter import com.biganto.visual.roompark.presentation.screen.settings.util.CommonRecyclerAdapter
import com.biganto.visual.roompark.presentation.screen.settings.util.CommonViewHolder import com.biganto.visual.roompark.presentation.screen.settings.util.CommonViewHolder
...@@ -68,7 +67,11 @@ class ChooseResolutionDialogController : Controller { ...@@ -68,7 +67,11 @@ class ChooseResolutionDialogController : Controller {
detachDisposable.add( detachDisposable.add(
(recyclerView.adapter as PhotoSizeAdapter).onItemClicked.subscribe { (recyclerView.adapter as PhotoSizeAdapter).onItemClicked.subscribe {
Timber.d("gonna shit : $it") Timber.d("gonna shit : $it")
router.replaceTopController(RouterTransaction.with(PhotoDialogController(it.url)) router.replaceTopController(RouterTransaction.with(
PhotoDialogController(
it.url
)
)
.popChangeHandler(DialogChangeHandler()) .popChangeHandler(DialogChangeHandler())
.pushChangeHandler(DialogChangeHandler()) .pushChangeHandler(DialogChangeHandler())
) )
......
package com.biganto.visual.roompark.conductor.dialogs.change_handler package com.biganto.visual.roompark.conductor.dialogs
import android.content.pm.ActivityInfo import android.content.pm.ActivityInfo
import android.graphics.Bitmap import android.graphics.Bitmap
...@@ -43,6 +43,8 @@ class PhotoDialogController : Controller { ...@@ -43,6 +43,8 @@ class PhotoDialogController : Controller {
val progress = view.findViewById<ProgressBar>(R.id.photo_load_progress_bar) val progress = view.findViewById<ProgressBar>(R.id.photo_load_progress_bar)
progress.visibility = View.VISIBLE progress.visibility = View.VISIBLE
view.findViewById<View>(R.id.close_current_button).setOnClickListener { handleBack() }
activity?.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER_LANDSCAPE activity?.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER_LANDSCAPE
args.getString(PHOTO_URL_KEY)?.let { args.getString(PHOTO_URL_KEY)?.let {
......
...@@ -72,7 +72,6 @@ class SettingsScreenController : ...@@ -72,7 +72,6 @@ class SettingsScreenController :
@BindView(R.id.signOutButton) @BindView(R.id.signOutButton)
lateinit var signOutButton:MaterialTextView lateinit var signOutButton:MaterialTextView
private fun setToolbar(){ private fun setToolbar(){
toolBar.appBar.liftOnScrollTargetViewId = R.id.nestedScrollContainer toolBar.appBar.liftOnScrollTargetViewId = R.id.nestedScrollContainer
pushRecycler.isNestedScrollingEnabled = false pushRecycler.isNestedScrollingEnabled = false
......
...@@ -7,6 +7,7 @@ import android.view.View ...@@ -7,6 +7,7 @@ import android.view.View
import android.view.WindowManager import android.view.WindowManager
import androidx.core.os.bundleOf import androidx.core.os.bundleOf
import butterknife.BindView import butterknife.BindView
import butterknife.OnClick
import com.biganto.visual.roompark.R import com.biganto.visual.roompark.R
import com.biganto.visual.roompark.base.RoomParkApplication import com.biganto.visual.roompark.base.RoomParkApplication
import com.biganto.visual.roompark.base.RoomParkMainActivity import com.biganto.visual.roompark.base.RoomParkMainActivity
...@@ -44,6 +45,11 @@ class WebCamScreenController : ...@@ -44,6 +45,11 @@ class WebCamScreenController :
constructor(id: Int) : super(bundleOf(SELECTED_CAM_INDEX_KEY to id)) constructor(id: Int) : super(bundleOf(SELECTED_CAM_INDEX_KEY to id))
@OnClick(R.id.close_current_button)
private fun onClickExit(){
handleBack()
}
@BindView(R.id.webCamPlayerView) @BindView(R.id.webCamPlayerView)
lateinit var playerView:PlayerView lateinit var playerView:PlayerView
......
...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
app:itemBackground="@color/colorCommonBackground" app:itemBackground="@color/colorCommonBackground"
app:itemHorizontalTranslationEnabled="false" app:itemHorizontalTranslationEnabled="false"
app:itemIconTint="@drawable/bottom_navigation_icon_selector" app:itemIconTint="@drawable/bottom_navigation_icon_selector"
app:labelVisibilityMode="labeled" app:labelVisibilityMode="unlabeled"
app:menu="@menu/bottom_navigation_menu" app:menu="@menu/bottom_navigation_menu"
tools:visibility="visible"> tools:visibility="visible">
......
...@@ -43,15 +43,19 @@ ...@@ -43,15 +43,19 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/articlePreview" /> app:layout_constraintStart_toEndOf="@+id/articlePreview" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
<ImageView
android:id="@+id/articleCloseButton" android:id="@+id/articleCloseButton"
android:layout_width="wrap_content" android:layout_width="32dp"
android:layout_height="wrap_content" android:layout_height="32dp"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:clickable="true" android:clickable="true"
android:contentDescription="@string/content_description_close"
android:focusable="true"
android:scaleType="fitXY"
android:src="@drawable/ic_close_circled"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent" />
app:srcCompat="@android:drawable/presence_offline" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
android:background="#000000"> android:background="#000000">
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
android:id="@+id/photoTitle"
style="@style/Common_Text.Inverted" style="@style/Common_Text.Inverted"
android:id="@+id/photoTitle"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="56dp" android:layout_marginTop="56dp"
...@@ -19,13 +19,16 @@ ...@@ -19,13 +19,16 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.floatingactionbutton.FloatingActionButton <ImageView
android:id="@+id/floatingActionButton2" android:id="@+id/close_current_button"
android:layout_width="wrap_content" android:layout_width="32dp"
android:layout_height="wrap_content" android:layout_height="32dp"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:clickable="true" android:clickable="true"
android:contentDescription="@string/content_description_close"
android:focusable="true"
android:scaleType="fitXY"
android:src="@drawable/ic_close_circled" android:src="@drawable/ic_close_circled"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
...@@ -70,7 +73,7 @@ ...@@ -70,7 +73,7 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/guideline2" app:layout_constraintTop_toTopOf="@+id/guideline2"
app:layout_constraintVertical_bias="0.0" app:layout_constraintVertical_bias="0.0"
app:srcCompat="@drawable/iic_full_view" /> app:srcCompat="@drawable/iic_full_view"/>
<com.biganto.visual.roompark.presentation.screen.photo.util.PhotoPreviewSlider <com.biganto.visual.roompark.presentation.screen.photo.util.PhotoPreviewSlider
android:id="@+id/photosPreviewSlider" android:id="@+id/photosPreviewSlider"
......
...@@ -2,8 +2,10 @@ ...@@ -2,8 +2,10 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="#000000"> android:background="#000000">
<com.github.chrisbanes.photoview.PhotoView <com.github.chrisbanes.photoview.PhotoView
android:id="@+id/photo_frame" android:id="@+id/photo_frame"
android:layout_width="match_parent" android:layout_width="match_parent"
...@@ -15,7 +17,22 @@ ...@@ -15,7 +17,22 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:indeterminate="true" android:layout_gravity="center"
android:layout_gravity="center" /> android:indeterminate="true" />
<ImageView
android:id="@+id/close_current_button"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_marginTop="16dp"
android:layout_marginEnd="8dp"
android:clickable="true"
android:contentDescription="@string/content_description_close"
android:focusable="true"
android:focusableInTouchMode="true"
android:scaleType="fitXY"
android:src="@drawable/ic_close_circled" />
</RelativeLayout> </RelativeLayout>
\ No newline at end of file
...@@ -90,6 +90,7 @@ ...@@ -90,6 +90,7 @@
<string name="estate_type_store_short">КЛ.%s</string> <string name="estate_type_store_short">КЛ.%s</string>
<string name="estate_type_other_short">ОБ.%s</string> <string name="estate_type_other_short">ОБ.%s</string>
<string name="tour_not_allowed">Запуск туров пока недоступен!</string> <string name="tour_not_allowed">Запуск туров пока недоступен!</string>
<string name="content_description_close">Close</string>
<!--endregion--> <!--endregion-->
</resources> </resources>
<resources xmlns:tools="http://schemas.android.com/tools" <resources>
xmlns:app="http://schemas.android.com/apk/res-auto">
<!-- Base application theme. --> <!-- Base application theme. -->
<style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar"> <style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
......
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