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
1b5cd5fc
Commit
1b5cd5fc
authored
Jan 27, 2020
by
Vladislav Bogdashkin
🎣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move flat type layout into separate view
parent
62322aa7
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
289 additions
and
274 deletions
+289
-274
ScreenController.kt
...l/roompark/presentation/screen/estate/ScreenController.kt
+19
-4
HomeBottomNavigationController.kt
...creen/home/home_routing/HomeBottomNavigationController.kt
+4
-20
flat_full_card_screen.xml
app/src/main/res/layout/flat_full_card_screen.xml
+4
-250
flat_plan_type_selector_view.xml
app/src/main/res/layout/flat_plan_type_selector_view.xml
+262
-0
No files found.
app/src/main/java/com/biganto/visual/roompark/presentation/screen/estate/ScreenController.kt
View file @
1b5cd5fc
...
@@ -18,10 +18,7 @@ import com.biganto.visual.roompark.base.RoomParkMainActivity
...
@@ -18,10 +18,7 @@ import com.biganto.visual.roompark.base.RoomParkMainActivity
import
com.biganto.visual.roompark.base.StatusState
import
com.biganto.visual.roompark.base.StatusState
import
com.biganto.visual.roompark.base.StatusToolbarModel
import
com.biganto.visual.roompark.base.StatusToolbarModel
import
com.biganto.visual.roompark.conductor.BigantoBaseController
import
com.biganto.visual.roompark.conductor.BigantoBaseController
import
com.biganto.visual.roompark.domain.model.EstateModel
import
com.biganto.visual.roompark.domain.model.*
import
com.biganto.visual.roompark.domain.model.FeatureModel
import
com.biganto.visual.roompark.domain.model.PlanPresetModel
import
com.biganto.visual.roompark.domain.model.typeShortString
import
com.biganto.visual.roompark.presentation.screen.estate.util.FlatInfoAdapter
import
com.biganto.visual.roompark.presentation.screen.estate.util.FlatInfoAdapter
import
com.biganto.visual.roompark.util.extensions.setGone
import
com.biganto.visual.roompark.util.extensions.setGone
import
com.biganto.visual.roompark.util.extensions.startUrl
import
com.biganto.visual.roompark.util.extensions.startUrl
...
@@ -111,6 +108,9 @@ class EstateScreenController :
...
@@ -111,6 +108,9 @@ class EstateScreenController :
@Inject
@Inject
override
lateinit
var
injectedPresenter
:
EstateScreenPresenter
override
lateinit
var
injectedPresenter
:
EstateScreenPresenter
@BindView
(
R
.
id
.
flatTypesCustomView
)
lateinit
var
flatTypeView
:
ViewGroup
@BindView
(
R
.
id
.
planTypesTabs
)
@BindView
(
R
.
id
.
planTypesTabs
)
lateinit
var
planTypesTabLayout
:
TabLayout
lateinit
var
planTypesTabLayout
:
TabLayout
...
@@ -260,6 +260,21 @@ class EstateScreenController :
...
@@ -260,6 +260,21 @@ class EstateScreenController :
}
}
startTour
.
setGone
(
viewState
.
estate
.
multitourId
==
null
)
startTour
.
setGone
(
viewState
.
estate
.
multitourId
==
null
)
when
(
viewState
.
estate
.
type
){
FlatType
.
FLAT
->
{
flatTypeView
.
setGone
(
false
)
planTypesTabLayout
.
setGone
(
false
)
planWebView
.
setGone
(
false
)
explicationTab
.
setGone
(
false
)
}
else
->
{
flatTypeView
.
setGone
(
true
)
planTypesTabLayout
.
setGone
(
true
)
planWebView
.
setGone
(
true
)
explicationTab
.
setGone
(
true
)
}
}
}
}
private
fun
render
(
viewState
:
EstateScreenViewState
.
ShowEstateInfo
)
{
private
fun
render
(
viewState
:
EstateScreenViewState
.
ShowEstateInfo
)
{
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/home/home_routing/HomeBottomNavigationController.kt
View file @
1b5cd5fc
...
@@ -60,15 +60,12 @@ class HomeBottomNavigationController(@IdRes toPage: Int = R.id.tab_feeds)
...
@@ -60,15 +60,12 @@ class HomeBottomNavigationController(@IdRes toPage: Int = R.id.tab_feeds)
}
}
private
fun
render
(
viewState
:
HomeScreenViewState
.
Idle
)
{
private
fun
render
(
viewState
:
HomeScreenViewState
.
Idle
)
{
}
}
private
fun
render
(
viewState
:
HomeScreenViewState
.
SomeError
)
=
private
fun
render
(
viewState
:
HomeScreenViewState
.
SomeError
)
=
showError
(
viewState
.
exception
)
showError
(
viewState
.
exception
)
private
fun
render
(
viewState
:
HomeScreenViewState
.
ToScreen
)
{
private
fun
render
(
viewState
:
HomeScreenViewState
.
ToScreen
)
{
// snacky.showSnackBar("lul")
// snacky.showSnackBar("lul")
}
}
...
@@ -79,12 +76,12 @@ class HomeBottomNavigationController(@IdRes toPage: Int = R.id.tab_feeds)
...
@@ -79,12 +76,12 @@ class HomeBottomNavigationController(@IdRes toPage: Int = R.id.tab_feeds)
get
()
=
"BottomNavigationImpl"
get
()
=
"BottomNavigationImpl"
override
fun
onViewBound
(
@NonNull
v
iew
:
View
)
{
override
fun
onViewBound
(
@NonNull
v
:
View
)
{
super
.
onViewBound
(
v
iew
)
super
.
onViewBound
(
v
)
toolBar
.
setToolbar
()
toolBar
.
setToolbar
()
bottomNavigationController
.
show
()
bottomNavigationController
.
show
()
Timber
.
d
(
" onViewBound: ${this::class}"
)
Timber
.
d
(
" onViewBound: ${this::class}"
)
controllerContainer
=
v
iew
.
findViewById
(
R
.
id
.
tabContainer
)
controllerContainer
=
v
.
findViewById
(
R
.
id
.
tabContainer
)
bottomNavigationController
.
bottomNavigation
.
setOnNavigationItemSelectedListener
{
item
->
bottomNavigationController
.
bottomNavigation
.
setOnNavigationItemSelectedListener
{
item
->
navigateTo
(
getControllerFor
(
item
.
itemId
),
false
)
navigateTo
(
getControllerFor
(
item
.
itemId
),
false
)
true
true
...
@@ -123,29 +120,17 @@ class HomeBottomNavigationController(@IdRes toPage: Int = R.id.tab_feeds)
...
@@ -123,29 +120,17 @@ class HomeBottomNavigationController(@IdRes toPage: Int = R.id.tab_feeds)
* The childRouter should handleBack,
* The childRouter should handleBack,
* as this BottomNavigationController doesn't have a back step sensible to the user.
* as this BottomNavigationController doesn't have a back step sensible to the user.
*/
*/
Timber
.
d
(
"in back stack "
)
val
childRouter
=
getChildRouter
(
currentlySelectedItemId
)
val
childRouter
=
getChildRouter
(
currentlySelectedItemId
)
Timber
.
d
(
"in back stack # ${childRouter?.backstackSize}"
)
if
(
childRouter
!=
null
)
{
if
(
childRouter
!=
null
)
{
Timber
.
d
(
"in back stack -1"
)
if
(
childRouter
.
backstackSize
<
2
)
return
false
if
(
childRouter
.
backstackSize
<
2
)
return
false
Timber
.
d
(
"in back stack -2 ${childRouter.backstack}"
)
val
handleBackResult
=
childRouter
.
handleBack
()
val
handleBackResult
=
childRouter
.
handleBack
()
// if ()
// if ()
// navigateTo(getControllerFor(R.id.tab_feeds), false)
// navigateTo(getControllerFor(R.id.tab_feeds), false)
Timber
.
d
(
"in back stack __# ${getChildRouter(currentlySelectedItemId)?.backstackSize}"
)
Timber
.
d
(
"backstack result $handleBackResult"
)
Timber
.
d
(
"in back stack -3 $handleBackResult"
)
return
true
return
true
}
else
{
}
else
{
Timber
.
e
(
Timber
.
e
(
IllegalStateException
(
IllegalStateException
(
...
@@ -156,5 +141,4 @@ class HomeBottomNavigationController(@IdRes toPage: Int = R.id.tab_feeds)
...
@@ -156,5 +141,4 @@ class HomeBottomNavigationController(@IdRes toPage: Int = R.id.tab_feeds)
}
}
return
false
return
false
}
}
}
}
app/src/main/res/layout/flat_full_card_screen.xml
View file @
1b5cd5fc
This diff is collapsed.
Click to expand it.
app/src/main/res/layout/flat_plan_type_selector_view.xml
0 → 100644
View file @
1b5cd5fc
This diff is collapsed.
Click to expand it.
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