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
95959ef5
Commit
95959ef5
authored
Apr 07, 2020
by
Vladislav Bogdashkin
🎣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
start plaeyr func
parent
9f013f96
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
13 deletions
+47
-13
DownloadTourDialogController.kt
...ctor/dialogs/tour_chooser/DownloadTourDialogController.kt
+1
-5
TourChooserDialogController.kt
...uctor/dialogs/tour_chooser/TourChooserDialogController.kt
+12
-8
utils.kt
...o/visual/roompark/conductor/dialogs/tour_chooser/utils.kt
+33
-0
strings.xml
app/src/main/res/values/strings.xml
+1
-0
No files found.
app/src/main/java/com/biganto/visual/roompark/conductor/dialogs/tour_chooser/DownloadTourDialogController.kt
View file @
95959ef5
...
...
@@ -114,11 +114,7 @@ class DownloadTourDialogController : Controller {
{
model
->
updateProgressBar
(
model
.
downloadedFiles
,
model
.
overallFiles
)
if
(
model
.
overallFiles
==
model
.
downloadedFiles
)
{
Timber
.
w
(
"FINISH DOIWLNLOD"
)
//Start PLayer
}
// activity?.runOnUiThread { startPlayerById(model.id) }
activity
?.
let
{
startPlayer
(
it
,
tour
)
}
}
,{
error
->
Timber
.
e
(
error
)
...
...
app/src/main/java/com/biganto/visual/roompark/conductor/dialogs/tour_chooser/TourChooserDialogController.kt
View file @
95959ef5
...
...
@@ -77,7 +77,8 @@ class ChooseTourDialogController : Controller {
.
onItemClicked
.
debounce
(
300L
,
TimeUnit
.
MILLISECONDS
)
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
::
onTourClicked
))
.
subscribe
(
::
onTourClicked
)
)
//view.findViewById<View>(R.id.close_current_button).setOnClickListener { handleBack() }
view
.
setOnClickListener
{
handleBack
()
}
...
...
@@ -86,17 +87,20 @@ class ChooseTourDialogController : Controller {
}
private
fun
onTourClicked
(
tour
:
TourModel
)
=
when
(
tour
.
downloadState
){
DownloadState
.
Downloaded
->
{
TODO
(
"STart Player"
)
}
private
fun
onTourClicked
(
tour
:
TourModel
)
{
when
(
tour
.
downloadState
)
{
DownloadState
.
Downloaded
->
{
activity
?.
let
{
startPlayer
(
it
,
tour
)
}
}
else
->
{
router
.
replaceTopController
(
RouterTransaction
.
with
(
DownloadTourDialogController
(
tour
))
.
popChangeHandler
(
DialogChangeHandler
())
.
pushChangeHandler
(
DialogChangeHandler
())
router
.
replaceTopController
(
RouterTransaction
.
with
(
DownloadTourDialogController
(
tour
))
.
popChangeHandler
(
DialogChangeHandler
())
.
pushChangeHandler
(
DialogChangeHandler
())
)
}
}
}
@LayoutRes
fun
getLayoutId
()
=
R
.
layout
.
tours_chooser_screen
...
...
app/src/main/java/com/biganto/visual/roompark/conductor/dialogs/tour_chooser/utils.kt
0 → 100644
View file @
95959ef5
package
com.biganto.visual.roompark.conductor.dialogs.tour_chooser
import
android.content.Context
import
android.content.Intent
import
com.biganto.visual.roompark.R
import
com.biganto.visual.roompark.data.repository.file.FileModule
import
com.biganto.visual.roompark.domain.model.TourModel
import
com.biganto.visual.roompark.player.BigantoPlayerActivity
import
com.biganto.visual.roompark.player.unity_utils.LoadTourConfig
/**
* Created by Vladislav Bogdashkin on 07.04.2020.
*/
const
val
PLAY_TOUR_DATA_EXTRAS
=
"BIGANTO_PLAYER_TOUR_DATA"
fun
startPlayer
(
context
:
Context
,
tour
:
TourModel
)
{
// hideToursList()
val
playerIntent
=
Intent
(
context
,
BigantoPlayerActivity
::
class
.
java
)
val
tourConfig
=
LoadTourConfig
(
tour
.
tour_id
.
toInt
(),
tour
.
targetResolution
,
FileModule
.
assetsDirectory
(
context
),
tour
.
metaPredict
,
tour
.
previewUrl
,
context
.
resources
?.
getBoolean
(
R
.
bool
.
isTablet
)
?.
not
()
?:
true
,
true
)
playerIntent
.
putExtra
(
PLAY_TOUR_DATA_EXTRAS
,
tourConfig
)
context
.
startActivity
(
playerIntent
)
}
\ No newline at end of file
app/src/main/res/values/strings.xml
View file @
95959ef5
...
...
@@ -101,5 +101,6 @@
<string
name=
"game_view_content_description"
/>
</resources>
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