Commit 2124455a authored by Vladislav Bogdashkin's avatar Vladislav Bogdashkin 🎣

webcams view update

parent e74f9910
...@@ -28,6 +28,7 @@ class CamListViewHolder(itemView: View) : CommonViewHolder<WebCamModel>(itemView ...@@ -28,6 +28,7 @@ class CamListViewHolder(itemView: View) : CommonViewHolder<WebCamModel>(itemView
override fun onViewBound(model: WebCamModel) { override fun onViewBound(model: WebCamModel) {
camTitle.text = model.title camTitle.text = model.title
camStatus.text = if (model.streams.isNullOrEmpty()) "ОФФЛАЙН" else "ОНЛАЙН" camStatus.text = if (model.streams.isNullOrEmpty()) "ОФФЛАЙН" else "ОНЛАЙН"
itemView.isEnabled = !model.streams.isNullOrEmpty()
camStatusIcon.visibility = if (model.streams.isNullOrEmpty()) View.GONE else View.VISIBLE camStatusIcon.visibility = if (model.streams.isNullOrEmpty()) View.GONE else View.VISIBLE
} }
} }
package com.biganto.visual.roompark.presentation.screen.web_cam package com.biganto.visual.roompark.presentation.screen.web_cam
import android.content.pm.ActivityInfo
import android.net.Uri import android.net.Uri
import android.os.Bundle import android.os.Bundle
import android.view.View import android.view.View
import android.view.WindowManager
import androidx.core.os.bundleOf import androidx.core.os.bundleOf
import butterknife.BindView import butterknife.BindView
import com.biganto.visual.roompark.R import com.biganto.visual.roompark.R
...@@ -50,6 +52,10 @@ class WebCamScreenController : ...@@ -50,6 +52,10 @@ class WebCamScreenController :
override fun onViewBound(v: View) { override fun onViewBound(v: View) {
activity?.window?.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN)
activity?.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER_LANDSCAPE
toolBar.setToolbar() toolBar.setToolbar()
bottomNavigationController.hide() bottomNavigationController.hide()
} }
...@@ -77,6 +83,12 @@ class WebCamScreenController : ...@@ -77,6 +83,12 @@ class WebCamScreenController :
} }
} }
override fun handleBack(): Boolean {
activity?.window?.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN)
activity?.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT
return super.handleBack()
}
private fun render(viewState: WebCamScreenViewState.Idle){ private fun render(viewState: WebCamScreenViewState.Idle){
} }
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/linearLayout9" android:id="@+id/linearLayout9"
android:background="#FF000000"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
<com.google.android.exoplayer2.ui.PlayerView <com.google.android.exoplayer2.ui.PlayerView
android:id="@+id/webCamPlayerView" android:id="@+id/webCamPlayerView"
android:background="#FF000000"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"/> android:layout_height="match_parent"/>
......
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