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
62322aa7
Commit
62322aa7
authored
Jan 27, 2020
by
Vladislav Bogdashkin
🎣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix backstack behaviour
parent
72b52335
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
57 additions
and
46 deletions
+57
-46
RoomParkMainActivity.kt
.../com/biganto/visual/roompark/base/RoomParkMainActivity.kt
+0
-6
BigantoBaseController.kt
...iganto/visual/roompark/conductor/BigantoBaseController.kt
+3
-1
ScreenController.kt
...ual/roompark/presentation/screen/deal/ScreenController.kt
+7
-7
ScreenController.kt
...al/roompark/presentation/screen/deals/ScreenController.kt
+13
-8
ScreenController.kt
...oompark/presentation/screen/favorites/ScreenController.kt
+13
-9
HomeBottomNavigationController.kt
...creen/home/home_routing/HomeBottomNavigationController.kt
+14
-8
deal_card_viewholder.xml
app/src/main/res/layout/deal_card_viewholder.xml
+7
-7
No files found.
app/src/main/java/com/biganto/visual/roompark/base/RoomParkMainActivity.kt
View file @
62322aa7
...
...
@@ -90,12 +90,6 @@ class RoomParkMainActivity(
get
()
=
headerToolbar
.
findViewById
<
MaterialTextView
>(
R
.
id
.
back_button_chevron
)
override
fun
setToolbar
(
header
:
HeaderToolbarModel
?,
status
:
StatusToolbarModel
?){
Timber
.
d
(
"pffff appbr: ${appBar.height}"
)
Timber
.
d
(
"pffff toolbar: ${topAppBar.height}"
)
Timber
.
d
(
"pffff tbContainer: ${tbContainer.height}"
)
Timber
.
d
(
"pffff headerToolbar: ${headerToolbar.height}"
)
Timber
.
d
(
"pffff statusToolbar: ${statusToolbar.height}"
)
appBar
.
setExpanded
(
false
,
false
)
if
(
header
==
null
&&
status
==
null
){
hideAll
()
...
...
app/src/main/java/com/biganto/visual/roompark/conductor/BigantoBaseController.kt
View file @
62322aa7
...
...
@@ -74,6 +74,7 @@ abstract class BigantoBaseController<VS : BigantoBaseViewState,V: BigantoBaseCon
override
fun
onCreateView
(
inflater
:
LayoutInflater
,
container
:
ViewGroup
):
View
{
val
view
=
inflater
.
inflate
(
getLayoutId
(),
container
,
false
)
// instantiate the view
retainViewMode
=
RetainViewMode
.
RELEASE_DETACH
ButterKnife
.
bind
(
this
,
view
)
(
activity
as
RoomParkMainActivity
).
let
{
snackbar
=
ActivityModule
.
provideSnackBar
(
it
)
...
...
@@ -102,7 +103,8 @@ abstract class BigantoBaseController<VS : BigantoBaseViewState,V: BigantoBaseCon
override
fun
handleBack
():
Boolean
{
router
.
popController
(
this
)
return
super
.
handleBack
()
return
true
// return super.handleBack()
}
fun
showError
(
e
:
ExceptionString
)
=
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/deal/ScreenController.kt
View file @
62322aa7
...
...
@@ -13,6 +13,7 @@ import com.biganto.visual.roompark.base.RoomParkApplication
import
com.biganto.visual.roompark.base.RoomParkMainActivity
import
com.biganto.visual.roompark.conductor.BigantoBaseController
import
com.biganto.visual.roompark.domain.model.DealModel
import
com.biganto.visual.roompark.domain.model.typeDoubleString
import
com.biganto.visual.roompark.domain.model.typeShortString
import
com.biganto.visual.roompark.util.extensions.toRubly
import
com.biganto.visual.roompark.util.view_utils.status_progress_view.StatusProgressAnimationState
...
...
@@ -91,12 +92,10 @@ class DealScreenController :
)
}
detachDisposable
.
add
(
dealContainer
.
scrollChangeEvents
()
.
subscribeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
{
if
(
it
.
scrollY
>
dealTitle
.
measuredHeight
)
dealModel
?.
let
{
deal
->
toolBar
.
setToolbar
(
...
...
@@ -118,7 +117,6 @@ class DealScreenController :
,
true
)
)
}
)
}
...
...
@@ -159,6 +157,12 @@ class DealScreenController :
private
fun
render
(
viewState
:
DealScreenViewState
.
LoadDeal
)
{
dealTitle
.
text
=
resources
?.
getString
(
viewState
.
estate
.
estate
.
type
.
typeDoubleString
(),
viewState
.
estate
.
estate
.
number
)
info1
.
title
.
text
=
resources
?.
getString
(
R
.
string
.
building
)
info1
.
text
.
text
=
viewState
.
estate
.
estate
.
commonInfo
?.
building
.
toString
()
...
...
@@ -218,10 +222,6 @@ class DealScreenController :
progressLayout
.
addView
(
statusLayout
)
}
progressLayout
.
invalidate
()
}
private
fun
getComponent
()
=
DaggerDealScreenComponent
.
factory
()
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/deals/ScreenController.kt
View file @
62322aa7
...
...
@@ -63,18 +63,17 @@ class DealsScreenController :
@Inject
override
lateinit
var
injectedPresenter
:
DealsScreenPresenter
override
fun
onViewBound
(
v
:
View
)
{
bottomNavigationController
.
show
()
setToolbar
()
bindRecycler
()
override
fun
onAttach
(
view
:
View
)
{
super
.
onAttach
(
view
)
Timber
.
d
(
"On attach View"
)
detachDisposable
.
addAll
(
(
dealsRecyclerView
.
adapter
as
DealsListAdapter
)
.
onItemClicked
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
{
Timber
.
d
(
"got card clicked $it"
)
router
.
pushController
(
RouterTransaction
.
with
(
DealScreenController
(
it
.
id
))
router
.
pushController
(
RouterTransaction
.
with
(
DealScreenController
(
it
.
id
))
.
pushChangeHandler
(
FadeChangeHandler
())
.
popChangeHandler
(
FadeChangeHandler
())
)
...
...
@@ -82,6 +81,12 @@ class DealsScreenController :
)
}
override
fun
onViewBound
(
v
:
View
)
{
bottomNavigationController
.
show
()
setToolbar
()
bindRecycler
()
}
override
fun
render
(
viewState
:
DealsScreenViewState
)
{
super
.
render
(
viewState
)
Timber
.
d
(
"Render state $viewState"
)
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/favorites/ScreenController.kt
View file @
62322aa7
...
...
@@ -38,6 +38,18 @@ class FavoritesScreenController :
lateinit
var
favoritesRecyclerView
:
RecyclerView
override
fun
onAttach
(
view
:
View
)
{
super
.
onAttach
(
view
)
detachDisposable
.
addAll
(
(
favoritesRecyclerView
.
adapter
as
FavoritesListAdapter
)
.
onItemClicked
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
{
Timber
.
d
(
"got card clicked $it"
)
router
.
pushController
(
RouterTransaction
.
with
(
EstateScreenController
(
it
.
id
)))
}
)
}
private
fun
setToolbar
(){
favoritesRecyclerView
.
isNestedScrollingEnabled
=
false
...
...
@@ -68,15 +80,6 @@ class FavoritesScreenController :
bottomNavigationController
.
show
()
setToolbar
()
bindRecycler
()
detachDisposable
.
addAll
(
(
favoritesRecyclerView
.
adapter
as
FavoritesListAdapter
)
.
onItemClicked
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
{
Timber
.
d
(
"got card clicked $it"
)
router
.
pushController
(
RouterTransaction
.
with
(
EstateScreenController
(
it
.
id
)))
}
)
}
override
fun
render
(
viewState
:
FavoritesScreenViewState
)
{
...
...
@@ -108,4 +111,5 @@ class FavoritesScreenController :
override
fun
getLayoutId
():
Int
=
R
.
layout
.
favorites_screen
}
\ No newline at end of file
app/src/main/java/com/biganto/visual/roompark/presentation/screen/home/home_routing/HomeBottomNavigationController.kt
View file @
62322aa7
...
...
@@ -5,7 +5,6 @@ import android.view.View
import
androidx.annotation.IdRes
import
androidx.annotation.NonNull
import
com.biganto.visual.roompark.R
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
...
...
@@ -42,10 +41,6 @@ class HomeBottomNavigationController(@IdRes toPage: Int = R.id.tab_feeds)
override
fun
getStartupMenuId
():
Int
=
args
.
getInt
(
OPEN_CHILD_CONTROLLER_KEY
,
R
.
id
.
tab_feeds
)
@Inject
lateinit
var
tb
:
ICollapsingToolBar
@Inject
override
lateinit
var
injectedPresenter
:
HomeScreenPresenter
...
...
@@ -131,12 +126,23 @@ class HomeBottomNavigationController(@IdRes toPage: Int = R.id.tab_feeds)
Timber
.
d
(
"in back stack "
)
val
childRouter
=
getChildRouter
(
currentlySelectedItemId
)
Timber
.
d
(
"in back stack
-
${childRouter?.backstackSize}"
)
Timber
.
d
(
"in back stack
#
${childRouter?.backstackSize}"
)
if
(
childRouter
!=
null
)
{
Timber
.
d
(
"in back stack -1"
)
if
(
childRouter
.
backstackSize
<
2
)
return
false
if
(
childRouter
.
handleBack
())
navigateTo
(
getControllerFor
(
R
.
id
.
tab_feeds
),
false
)
Timber
.
d
(
"in back stack -2 ${childRouter.backstack}"
)
val
handleBackResult
=
childRouter
.
handleBack
()
// if ()
// navigateTo(getControllerFor(R.id.tab_feeds), false)
Timber
.
d
(
"in back stack __# ${getChildRouter(currentlySelectedItemId)?.backstackSize}"
)
Timber
.
d
(
"in back stack -3 $handleBackResult"
)
return
true
...
...
app/src/main/res/layout/deal_card_viewholder.xml
View file @
62322aa7
...
...
@@ -72,11 +72,12 @@
</LinearLayout>
<LinearLayout
android:id=
"@+id/statusContainer"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"16dp"
android:layout_marginBottom=
"8dp"
android:background=
"@drawable/gradient_background_accent"
android:orientation=
"vertical"
android:padding=
"16dp"
>
...
...
@@ -85,8 +86,7 @@
android:id=
"@+id/progress_holder"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
</LinearLayout>
android:orientation=
"horizontal"
></LinearLayout>
</LinearLayout>
<LinearLayout
...
...
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