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
36611c57
Commit
36611c57
authored
Oct 25, 2019
by
Vladislav Bogdashkin
🎣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added restore feeds model
parent
f6587b74
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
638 additions
and
17 deletions
+638
-17
RoomParkMainActivity.kt
.../com/biganto/visual/roompark/base/RoomParkMainActivity.kt
+19
-4
TopBar.kt
app/src/main/java/com/biganto/visual/roompark/base/TopBar.kt
+2
-0
ScreenController.kt
...ual/roompark/presentation/screen/auth/ScreenController.kt
+2
-2
ScreenController.kt
...al/roompark/presentation/screen/deals/ScreenController.kt
+1
-1
ScreenController.kt
...oompark/presentation/screen/favorites/ScreenController.kt
+1
-1
ScreenController.kt
...oompark/presentation/screen/feed_list/ScreenController.kt
+1
-1
ScreenController.kt
...al/roompark/presentation/screen/feeds/ScreenController.kt
+26
-0
ScreenPresenter.kt
...ual/roompark/presentation/screen/feeds/ScreenPresenter.kt
+28
-4
ScreenViewState.kt
...ual/roompark/presentation/screen/feeds/ScreenViewState.kt
+10
-1
ScreenDI.kt
...anto/visual/roompark/presentation/screen/home/ScreenDI.kt
+2
-0
BottomNavigationController.kt
...on/screen/home/home_routing/BottomNavigationController.kt
+363
-0
HomeBottomNavigationController.kt
...creen/home/home_routing/HomeBottomNavigationController.kt
+162
-0
ScreenController.kt
...roompark/presentation/screen/settings/ScreenController.kt
+1
-1
ScreenController.kt
.../roompark/presentation/screen/to_flat/ScreenController.kt
+2
-2
tab_routing_screen_view.xml
app/src/main/res/layout/tab_routing_screen_view.xml
+18
-0
No files found.
app/src/main/java/com/biganto/visual/roompark/base/RoomParkMainActivity.kt
View file @
36611c57
...
@@ -69,20 +69,27 @@ class RoomParkMainActivity(
...
@@ -69,20 +69,27 @@ class RoomParkMainActivity(
override
fun
hideAll
()
{
override
fun
hideAll
()
{
appBar
.
visibility
=
Toolbar
.
INVISIBLE
appBar
.
visibility
=
Toolbar
.
INVISIBLE
bottomNavigation
.
visibility
=
BottomNavigationView
.
GONE
bottomShadow
.
visibility
=
View
.
GONE
Timber
.
e
(
" lay params : ${appBar.layoutParams.javaClass}"
)
Timber
.
e
(
" lay params : ${appBar.layoutParams.javaClass}"
)
val
params
:
CoordinatorLayout
.
LayoutParams
=
conductor_container
.
layoutParams
as
CoordinatorLayout
.
LayoutParams
val
params
:
CoordinatorLayout
.
LayoutParams
=
conductor_container
.
layoutParams
as
CoordinatorLayout
.
LayoutParams
params
.
behavior
=
null
params
.
behavior
=
null
conductor_container
.
requestLayout
()
conductor_container
.
requestLayout
()
}
}
override
fun
hide
()
{
bottomNavigation
.
visibility
=
BottomNavigationView
.
GONE
bottomShadow
.
visibility
=
View
.
GONE
}
override
fun
show
()
{
bottomNavigation
.
visibility
=
Toolbar
.
VISIBLE
bottomShadow
.
visibility
=
View
.
VISIBLE
}
override
fun
showAll
()
{
override
fun
showAll
()
{
appBar
.
setExpanded
(
true
,
false
)
appBar
.
setExpanded
(
true
,
false
)
collapsingToolbarLayout
.
visibility
=
View
.
VISIBLE
collapsingToolbarLayout
.
visibility
=
View
.
VISIBLE
bottomNavigation
.
visibility
=
Toolbar
.
VISIBLE
bottomShadow
.
visibility
=
View
.
VISIBLE
appBar
.
visibility
=
View
.
VISIBLE
appBar
.
visibility
=
View
.
VISIBLE
topAppBar
.
visibility
=
View
.
VISIBLE
topAppBar
.
visibility
=
View
.
VISIBLE
...
@@ -96,4 +103,12 @@ class RoomParkMainActivity(
...
@@ -96,4 +103,12 @@ class RoomParkMainActivity(
val
behavior
=
params
.
behavior
as
DragControlAppBarLayoutBehaviour
val
behavior
=
params
.
behavior
as
DragControlAppBarLayoutBehaviour
behavior
.
allowDrag
=
allow
behavior
.
allowDrag
=
allow
}
}
override
fun
onBackPressed
()
{
if
(
router
.
handleBack
())
{
Timber
.
d
(
"In stack : "
+
router
.
backstackSize
)
}
else
{
super
.
onBackPressed
()
}
}
}
}
app/src/main/java/com/biganto/visual/roompark/base/TopBar.kt
View file @
36611c57
...
@@ -31,4 +31,6 @@ interface IConductorActivity{
...
@@ -31,4 +31,6 @@ interface IConductorActivity{
interface
IBottomNavigation
{
interface
IBottomNavigation
{
val
bottomNavigation
:
BottomNavigationView
val
bottomNavigation
:
BottomNavigationView
fun
hide
()
fun
show
()
}
}
app/src/main/java/com/biganto/visual/roompark/presentation/screen/auth/ScreenController.kt
View file @
36611c57
...
@@ -6,7 +6,7 @@ import com.biganto.visual.roompark.R
...
@@ -6,7 +6,7 @@ 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
import
com.biganto.visual.roompark.conductor.BigantoBaseController
import
com.biganto.visual.roompark.conductor.BigantoBaseController
import
com.biganto.visual.roompark.presentation.screen.home.
Home
Controller
import
com.biganto.visual.roompark.presentation.screen.home.
home_routing.HomeBottomNavigation
Controller
import
com.bluelinelabs.conductor.RouterTransaction
import
com.bluelinelabs.conductor.RouterTransaction
import
com.google.android.material.button.MaterialButton
import
com.google.android.material.button.MaterialButton
import
com.google.android.material.snackbar.Snackbar
import
com.google.android.material.snackbar.Snackbar
...
@@ -89,7 +89,7 @@ class AuthScreenController :
...
@@ -89,7 +89,7 @@ class AuthScreenController :
}
}
private
fun
render
(
viewState
:
AuthScreenViewState
.
SignedIn
){
private
fun
render
(
viewState
:
AuthScreenViewState
.
SignedIn
){
router
.
setRoot
(
RouterTransaction
.
with
(
HomeController
()))
router
.
setRoot
(
RouterTransaction
.
with
(
Home
BottomNavigation
Controller
()))
// snacky.showSnackBar("lul")
// snacky.showSnackBar("lul")
}
}
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/deals/ScreenController.kt
View file @
36611c57
...
@@ -59,7 +59,7 @@ class DealsScreenController :
...
@@ -59,7 +59,7 @@ class DealsScreenController :
override
fun
onViewBound
(
v
:
View
)
{
override
fun
onViewBound
(
v
:
View
)
{
//
setToolbar()
setToolbar
()
bindRecycler
()
bindRecycler
()
}
}
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/favorites/ScreenController.kt
View file @
36611c57
...
@@ -60,7 +60,7 @@ class FavoritesScreenController :
...
@@ -60,7 +60,7 @@ class FavoritesScreenController :
}
}
override
fun
onViewBound
(
v
:
View
)
{
override
fun
onViewBound
(
v
:
View
)
{
//
setToolbar()
setToolbar
()
bindRecycler
()
bindRecycler
()
}
}
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/feed_list/ScreenController.kt
View file @
36611c57
...
@@ -101,7 +101,7 @@ class ArticlesScreenController :
...
@@ -101,7 +101,7 @@ class ArticlesScreenController :
override
fun
handleBack
():
Boolean
{
override
fun
handleBack
():
Boolean
{
Timber
.
d
(
"handle back in class "
)
Timber
.
d
(
"handle back in class "
)
router
.
popController
(
this
)
router
.
popController
(
this
)
return
super
.
handleBack
()
return
true
}
}
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/feeds/ScreenController.kt
View file @
36611c57
...
@@ -97,6 +97,7 @@ class FeedsScreenController :
...
@@ -97,6 +97,7 @@ class FeedsScreenController :
override
lateinit
var
injectedPresenter
:
FeedsScreenPresenter
override
lateinit
var
injectedPresenter
:
FeedsScreenPresenter
override
fun
onViewBound
(
v
:
View
)
{
override
fun
onViewBound
(
v
:
View
)
{
toolBar
.
hideAll
()
bindRecycler
()
bindRecycler
()
feedsBlockView
.
findViewById
<
MaterialTextView
>(
R
.
id
.
to_feed_articles
).
clicks
()
feedsBlockView
.
findViewById
<
MaterialTextView
>(
R
.
id
.
to_feed_articles
).
clicks
()
.
map
{
feedsTabs
.
getTabAt
(
feedsTabs
.
selectedTabPosition
)}
.
map
{
feedsTabs
.
getTabAt
(
feedsTabs
.
selectedTabPosition
)}
...
@@ -121,6 +122,7 @@ class FeedsScreenController :
...
@@ -121,6 +122,7 @@ class FeedsScreenController :
is
FeedsScreenViewState
.
AlbumsPages
->
render
(
viewState
)
is
FeedsScreenViewState
.
AlbumsPages
->
render
(
viewState
)
is
FeedsScreenViewState
.
CamsList
->
render
(
viewState
)
is
FeedsScreenViewState
.
CamsList
->
render
(
viewState
)
is
FeedsScreenViewState
.
GetFeedArticlesPreview
->
render
(
viewState
)
is
FeedsScreenViewState
.
GetFeedArticlesPreview
->
render
(
viewState
)
is
FeedsScreenViewState
.
RestoreView
->
render
(
viewState
)
}
}
}
}
...
@@ -163,6 +165,30 @@ class FeedsScreenController :
...
@@ -163,6 +165,30 @@ class FeedsScreenController :
(
camsRecyclerView
.
adapter
as
CamsListAdapter
).
setItems
(
viewState
.
items
)
(
camsRecyclerView
.
adapter
as
CamsListAdapter
).
setItems
(
viewState
.
items
)
}
}
private
fun
render
(
viewState
:
FeedsScreenViewState
.
RestoreView
){
(
camsRecyclerView
.
adapter
as
CamsListAdapter
).
setItems
(
viewState
.
restore
.
cams
)
(
feedsRecyclerView
.
adapter
as
ArticlesPreviewAdapter
).
setItems
(
viewState
.
restore
.
articles
)
(
devProgressRecyclerView
.
adapter
as
AlbumsPreviewAdapter
).
setItems
(
viewState
.
restore
.
albums
)
feedsTabs
.
removeAllTabs
()
viewState
.
restore
.
feeds
.
forEach
{
feed
->
val
tab
=
feedsTabs
.
newTab
()
.
setCustomView
(
R
.
layout
.
feeds_tab_view
)
.
setTag
(
feed
.
feedId
)
tab
.
customView
?.
let
{
it
.
findViewById
<
TextView
>(
R
.
id
.
tab_title
)
?.
text
=
feed
.
title
it
.
findViewById
<
TextView
>(
R
.
id
.
tab_divider
)
?.
visibility
=
if
(
viewState
.
restore
.
feeds
.
indexOf
(
feed
)
==
viewState
.
restore
.
feeds
.
size
-
1
)
View
.
GONE
else
View
.
VISIBLE
}
feedsTabs
.
addTab
(
tab
)
}
storedFeedsList
=
viewState
.
restore
.
feeds
}
private
fun
getComponent
()
=
DaggerFeedsScreenComponent
.
factory
()
private
fun
getComponent
()
=
DaggerFeedsScreenComponent
.
factory
()
.
create
(
RoomParkApplication
.
component
,
activity
as
RoomParkMainActivity
)
.
create
(
RoomParkApplication
.
component
,
activity
as
RoomParkMainActivity
)
.
inject
(
this
)
.
inject
(
this
)
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/feeds/ScreenPresenter.kt
View file @
36611c57
...
@@ -17,21 +17,45 @@ class FeedsScreenPresenter @Inject constructor(
...
@@ -17,21 +17,45 @@ class FeedsScreenPresenter @Inject constructor(
)
)
:
BigantoBasePresenter
<
FeedsScreen
,
FeedsScreenViewState
>()
{
:
BigantoBasePresenter
<
FeedsScreen
,
FeedsScreenViewState
>()
{
private
val
restoreModel
=
RestoreModel
(
arrayListOf
(),
arrayListOf
(),
arrayListOf
(),
arrayListOf
())
override
fun
attachView
(
view
:
FeedsScreen
)
{
Timber
.
d
(
"AttachView "
)
restoreStateObservable
.
accept
(
FeedsScreenViewState
.
RestoreView
(
restoreModel
))
super
.
attachView
(
view
)
}
override
fun
bindIntents
()
{
override
fun
bindIntents
()
{
val
fetchCams
=
interactor
.
fetchCams
()
val
fetchCams
=
interactor
.
fetchCams
()
.
map
{
FeedsScreenViewState
.
CamsList
(
it
.
items
)
}
.
map
{
restoreModel
.
cams
=
it
.
items
FeedsScreenViewState
.
CamsList
(
it
.
items
)
}
val
fetchAlbums
=
interactor
.
fetchAlbums
()
val
fetchAlbums
=
interactor
.
fetchAlbums
()
.
map
{
FeedsScreenViewState
.
AlbumsPages
(
it
)
}
.
map
{
restoreModel
.
albums
=
it
FeedsScreenViewState
.
AlbumsPages
(
it
)
}
val
fetchFeeds
=
interactor
.
fetchTopFeeds
()
val
fetchFeeds
=
interactor
.
fetchTopFeeds
()
.
map
{
FeedsScreenViewState
.
FeedsPages
(
it
.
feeds
.
toList
())
}
.
map
{
restoreModel
.
feeds
=
it
.
feeds
FeedsScreenViewState
.
FeedsPages
(
it
.
feeds
.
toList
())
}
val
getFeedArticlesPreview
=
intent
(
FeedsScreen
::
feedsTabSelected
)
val
getFeedArticlesPreview
=
intent
(
FeedsScreen
::
feedsTabSelected
)
.
flatMapSingle
{
interactor
.
fetchArticles
(
it
)
}
.
flatMapSingle
{
interactor
.
fetchArticles
(
it
)
}
.
map
{
FeedsScreenViewState
.
GetFeedArticlesPreview
(
it
.
articles
.
toList
())
}
.
map
{
restoreModel
.
articles
=
it
.
articles
FeedsScreenViewState
.
GetFeedArticlesPreview
(
it
.
articles
.
toList
())
}
val
state
=
restoreStateObservable
val
state
=
restoreStateObservable
.
mergeWith
(
fetchFeeds
)
.
mergeWith
(
fetchFeeds
)
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/feeds/ScreenViewState.kt
View file @
36611c57
...
@@ -18,4 +18,13 @@ sealed class FeedsScreenViewState : BigantoBaseViewState() {
...
@@ -18,4 +18,13 @@ sealed class FeedsScreenViewState : BigantoBaseViewState() {
class
CamsList
(
val
items
:
List
<
WebCamModel
>)
:
FeedsScreenViewState
()
class
CamsList
(
val
items
:
List
<
WebCamModel
>)
:
FeedsScreenViewState
()
class
GetFeedArticlesPreview
(
val
items
:
List
<
ArticlePreviewModel
>)
:
FeedsScreenViewState
()
class
GetFeedArticlesPreview
(
val
items
:
List
<
ArticlePreviewModel
>)
:
FeedsScreenViewState
()
}
\ No newline at end of file
class
RestoreView
(
val
restore
:
RestoreModel
)
:
FeedsScreenViewState
()
}
data class
RestoreModel
(
var
feeds
:
List
<
FeedModel
>,
var
albums
:
List
<
AlbumPreviewModel
>,
var
cams
:
List
<
WebCamModel
>,
var
articles
:
List
<
ArticlePreviewModel
>
)
\ No newline at end of file
app/src/main/java/com/biganto/visual/roompark/presentation/screen/home/ScreenDI.kt
View file @
36611c57
...
@@ -8,6 +8,7 @@ import com.biganto.visual.roompark.di.dagger.AppComponent
...
@@ -8,6 +8,7 @@ import com.biganto.visual.roompark.di.dagger.AppComponent
import
com.biganto.visual.roompark.di.dagger.AuthContractModule
import
com.biganto.visual.roompark.di.dagger.AuthContractModule
import
com.biganto.visual.roompark.di.dagger.PerScreen
import
com.biganto.visual.roompark.di.dagger.PerScreen
import
com.biganto.visual.roompark.domain.contract.AuthContract
import
com.biganto.visual.roompark.domain.contract.AuthContract
import
com.biganto.visual.roompark.presentation.screen.home.home_routing.HomeBottomNavigationController
import
dagger.Binds
import
dagger.Binds
import
dagger.BindsInstance
import
dagger.BindsInstance
import
dagger.Component
import
dagger.Component
...
@@ -34,6 +35,7 @@ interface HomeScreenComponent {
...
@@ -34,6 +35,7 @@ interface HomeScreenComponent {
val
presenter
:
HomeScreenPresenter
val
presenter
:
HomeScreenPresenter
fun
inject
(
controller
:
HomeController
)
fun
inject
(
controller
:
HomeController
)
fun
inject
(
controller
:
HomeBottomNavigationController
)
}
}
@Module
@Module
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/home/home_routing/BottomNavigationController.kt
0 → 100644
View file @
36611c57
This diff is collapsed.
Click to expand it.
app/src/main/java/com/biganto/visual/roompark/presentation/screen/home/home_routing/HomeBottomNavigationController.kt
0 → 100644
View file @
36611c57
package
com.biganto.visual.roompark.presentation.screen.home.home_routing
import
android.os.Bundle
import
android.util.Log
import
android.view.View
import
androidx.annotation.IdRes
import
androidx.annotation.NonNull
import
com.biganto.visual.roompark.R
import
com.biganto.visual.roompark.base.IBottomNavigation
import
com.biganto.visual.roompark.base.ICollapsingToolBar
import
com.biganto.visual.roompark.base.RoomParkApplication
import
com.biganto.visual.roompark.base.RoomParkMainActivity
import
com.biganto.visual.roompark.presentation.screen.deals.DealsScreenController
import
com.biganto.visual.roompark.presentation.screen.favorites.FavoritesScreenController
import
com.biganto.visual.roompark.presentation.screen.feeds.FeedsScreenController
import
com.biganto.visual.roompark.presentation.screen.home.DaggerHomeScreenComponent
import
com.biganto.visual.roompark.presentation.screen.home.HomeScreenPresenter
import
com.biganto.visual.roompark.presentation.screen.home.HomeScreenViewState
import
com.biganto.visual.roompark.presentation.screen.settings.SettingsScreenController
import
com.biganto.visual.roompark.presentation.screen.to_flat.FindFlatScreenController
import
com.bluelinelabs.conductor.Controller
import
com.google.android.material.bottomnavigation.BottomNavigationView
import
timber.log.Timber
import
javax.inject.Inject
/**
* Created by Vladislav Bogdashkin on 14.02.2019.
*/
const
val
OPEN_CHILD_CONTROLLER_KEY
=
"OPEN_HOME_SCREEN_CHILD_CONTROLLER_ID"
fun
toPageBundle
(
@IdRes
menuItemId
:
Int
):
Bundle
{
val
b
=
Bundle
()
b
.
putInt
(
OPEN_CHILD_CONTROLLER_KEY
,
menuItemId
)
return
b
}
class
HomeBottomNavigationController
(
@IdRes
toPage
:
Int
=
R
.
id
.
tab_feeds
)
:
BottomNavigationController
(
toPageBundle
(
toPage
))
{
override
fun
injectDependencies
()
{
getComponent
()
}
override
fun
getStartupMenuId
():
Int
=
args
.
getInt
(
OPEN_CHILD_CONTROLLER_KEY
,
R
.
id
.
tab_feeds
)
@Inject
lateinit
var
tb
:
ICollapsingToolBar
@Inject
lateinit
var
bottomNavigation
:
IBottomNavigation
@Inject
override
lateinit
var
injectedPresenter
:
HomeScreenPresenter
fun
getComponent
()
=
DaggerHomeScreenComponent
.
factory
()
.
create
(
RoomParkApplication
.
component
,
activity
as
RoomParkMainActivity
)
.
inject
(
this
)
override
fun
render
(
viewState
:
HomeScreenViewState
)
{
when
(
viewState
){
is
HomeScreenViewState
.
Idle
->
render
(
viewState
)
is
HomeScreenViewState
.
ToScreen
->
render
(
viewState
)
}
}
private
fun
render
(
viewState
:
HomeScreenViewState
.
Idle
){
}
private
fun
render
(
viewState
:
HomeScreenViewState
.
ToScreen
){
// snacky.showSnackBar("lul")
}
override
fun
getLayoutId
()
=
R
.
layout
.
tab_routing_screen_view
override
val
tag
:
String
get
()
=
"BottomNavigationImpl"
override
fun
onViewBound
(
@NonNull
view
:
View
)
{
bottomNavigation
.
show
()
Timber
.
d
(
" onViewBound: ${this::class}"
)
bottomNavigationView
=
((
activity
as
RoomParkMainActivity
)
as
IBottomNavigation
).
bottomNavigation
bottomNavigationView
.
visibility
=
BottomNavigationView
.
VISIBLE
controllerContainer
=
view
.
findViewById
(
R
.
id
.
tabContainer
)
bottomNavigationView
.
setOnNavigationItemSelectedListener
{
item
->
navigateTo
(
getControllerFor
(
item
.
itemId
),
false
)
true
}
router
.
backstack
.
clear
()
val
toScreen
=
args
.
getInt
(
OPEN_CHILD_CONTROLLER_KEY
,
R
.
id
.
tab_feeds
)
}
override
fun
getControllerFor
(
menuItemId
:
Int
):
Controller
=
when
(
menuItemId
)
{
R
.
id
.
tab_feeds
->
FeedsScreenController
()
R
.
id
.
tab_favorites
->
FavoritesScreenController
()
R
.
id
.
tab_deals
->
DealsScreenController
()
R
.
id
.
tab_look_flat
->
FindFlatScreenController
()
R
.
id
.
tab_settings
->
SettingsScreenController
()
else
->
FeedsScreenController
()
}
override
fun
isSupportedController
(
controller
:
Controller
):
Boolean
{
return
true
}
override
fun
getIdForController
(
controller
:
Controller
):
Int
{
return
when
(
controller
)
{
is
FeedsScreenController
->
R
.
id
.
tab_feeds
is
FavoritesScreenController
->
R
.
id
.
tab_favorites
is
DealsScreenController
->
R
.
id
.
tab_deals
is
FindFlatScreenController
->
R
.
id
.
tab_look_flat
is
SettingsScreenController
->
R
.
id
.
tab_settings
else
->
0
}
}
override
fun
handleBack
():
Boolean
{
/*
* The childRouter should handleBack,
* as this BottomNavigationController doesn't have a back step sensible to the user.
*/
Timber
.
d
(
"in back stack "
)
val
childRouter
=
getChildRouter
(
currentlySelectedItemId
)
Timber
.
d
(
"in back stack - ${childRouter?.backstackSize}"
)
if
(
childRouter
!=
null
)
{
val
backStackSizeCondition
=
childRouter
.
backstackSize
<
0
val
backStackResult
=
childRouter
.
handleBack
()
if
(
backStackResult
&&
backStackSizeCondition
)
navigateTo
(
getControllerFor
(
R
.
id
.
tab_feeds
),
false
)
return
backStackResult
}
else
{
Log
.
e
(
TAG
,
"handleBack called with getChildRouter(currentlySelectedItemId) == null."
,
IllegalStateException
(
"handleBack called with getChildRouter(currentlySelectedItemId) == null."
))
}
return
false
}
}
app/src/main/java/com/biganto/visual/roompark/presentation/screen/settings/ScreenController.kt
View file @
36611c57
...
@@ -71,7 +71,7 @@ class SettingsScreenController :
...
@@ -71,7 +71,7 @@ class SettingsScreenController :
}
}
override
fun
onViewBound
(
v
:
View
)
{
override
fun
onViewBound
(
v
:
View
)
{
//
setToolbar()
setToolbar
()
pushRecycler
.
isNestedScrollingEnabled
=
true
pushRecycler
.
isNestedScrollingEnabled
=
true
pushRecycler
.
layoutManager
=
pushRecycler
.
layoutManager
=
LinearLayoutManager
(
activity
,
RecyclerView
.
VERTICAL
,
false
)
LinearLayoutManager
(
activity
,
RecyclerView
.
VERTICAL
,
false
)
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/to_flat/ScreenController.kt
View file @
36611c57
...
@@ -72,14 +72,14 @@ class FindFlatScreenController :
...
@@ -72,14 +72,14 @@ class FindFlatScreenController :
@Inject
@Inject
override
lateinit
var
injectedPresenter
:
FindFlatScreenPresenter
override
lateinit
var
injectedPresenter
:
FindFlatScreenPresenter
val
estateTabs
=
arrayListOf
(
private
val
estateTabs
=
arrayListOf
(
EstateTabModel
(
"Д1"
,
1
),
EstateTabModel
(
"Д1"
,
1
),
EstateTabModel
(
"Д2"
,
2
),
EstateTabModel
(
"Д2"
,
2
),
EstateTabModel
(
"Д3"
,
3
)
EstateTabModel
(
"Д3"
,
3
)
)
)
override
fun
onViewBound
(
v
:
View
)
{
override
fun
onViewBound
(
v
:
View
)
{
//
setToolbar()
setToolbar
()
estateTabs
.
forEach
{
estate
->
estateTabs
.
forEach
{
estate
->
val
tab
=
flatTabs
.
newTab
()
val
tab
=
flatTabs
.
newTab
()
.
setCustomView
(
R
.
layout
.
to_flat_tab_view
)
.
setCustomView
(
R
.
layout
.
to_flat_tab_view
)
...
...
app/src/main/res/layout/tab_routing_screen_view.xml
0 → 100644
View file @
36611c57
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/colorPrimary"
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<!--<com.biganto.visual.androidplayer.presentation.screen.home_routing.NonSwipeableViewPager-->
<!--android:id="@+id/tabsContainerViewPager"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="match_parent" />-->
<com.bluelinelabs.conductor.ChangeHandlerFrameLayout
android:id=
"@+id/tabContainer"
android:background=
"@color/colorPrimary"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
</FrameLayout>
\ No newline at end of file
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