Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Room Park Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vladislav Bogdashkin
Room Park Android
Commits
2124455a
Commit
2124455a
authored
Mar 13, 2020
by
Vladislav Bogdashkin
🎣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webcams view update
parent
e74f9910
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
0 deletions
+15
-0
CamsLIstAdapter.kt
...ompark/presentation/screen/feeds/utils/CamsLIstAdapter.kt
+1
-0
ScreenController.kt
.../roompark/presentation/screen/web_cam/ScreenController.kt
+12
-0
webcam_screen.xml
app/src/main/res/layout/webcam_screen.xml
+2
-0
No files found.
app/src/main/java/com/biganto/visual/roompark/presentation/screen/feeds/utils/CamsLIstAdapter.kt
View file @
2124455a
...
@@ -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
}
}
}
}
app/src/main/java/com/biganto/visual/roompark/presentation/screen/web_cam/ScreenController.kt
View file @
2124455a
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
){
}
}
...
...
app/src/main/res/layout/webcam_screen.xml
View file @
2124455a
<?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"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment