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
76a81cd5
Commit
76a81cd5
authored
Jan 13, 2020
by
Vladislav Bogdashkin
🎣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added actions to show properly explication or commoninfo based on selected plan type
parent
73e20f68
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
9 deletions
+22
-9
ScreenController.kt
...l/roompark/presentation/screen/estate/ScreenController.kt
+0
-1
ScreenPresenter.kt
...al/roompark/presentation/screen/estate/ScreenPresenter.kt
+15
-5
flat_full_card_screen.xml
app/src/main/res/layout/flat_full_card_screen.xml
+7
-3
No files found.
app/src/main/java/com/biganto/visual/roompark/presentation/screen/estate/ScreenController.kt
View file @
76a81cd5
...
@@ -214,7 +214,6 @@ class EstateScreenController :
...
@@ -214,7 +214,6 @@ class EstateScreenController :
viewState
.
types
.
forEach
{
viewState
.
types
.
forEach
{
try
{
try
{
val
tab
=
planTypesTabLayout
.
newTab
()
val
tab
=
planTypesTabLayout
.
newTab
()
.
setCustomView
(
R
.
layout
.
select_text_tab
).
setTag
(
it
.
planId
)
.
setCustomView
(
R
.
layout
.
select_text_tab
).
setTag
(
it
.
planId
)
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/estate/ScreenPresenter.kt
View file @
76a81cd5
...
@@ -53,13 +53,22 @@ class EstateScreenPresenter @Inject constructor(
...
@@ -53,13 +53,22 @@ class EstateScreenPresenter @Inject constructor(
val
fetchPlan
=
intent
(
EstateScreen
::
planTypesTabSelected
)
val
fetchPlan
=
intent
(
EstateScreen
::
planTypesTabSelected
)
.
map
{
planList
?.
get
(
it
)
}
.
map
{
planList
?.
get
(
it
)
}
.
flatMap
{
.
flatMap
{
planPreset
->
interactor
.
getPlan
(
i
t
)
interactor
.
getPlan
(
planPrese
t
)
.
map
<
EstateScreenViewState
>
{
plan
->
EstateScreenViewState
.
LoadPlan
(
plan
)
}
.
map
<
EstateScreenViewState
>
{
plan
->
EstateScreenViewState
.
LoadPlan
(
plan
)
}
.
startWith
(
.
startWith
(
Observable
.
just
<
EstateScreenViewState
>(
Observable
.
just
<
EstateScreenViewState
>(
EstateScreenViewState
.
PlanTypeSelected
(
EstateScreenViewState
.
PlanTypeSelected
(
planPreset
)
it
)
)
.
startWith
(
Observable
.
just
<
EstateScreenViewState
>(
EstateScreenViewState
.
ShowEstateInfo
(
showType
,
if
(
showType
==
InfoShowType
.
COMMON_INFO
)
mapCommonInfo
(
estate
?.
commonInfo
)
else
mapCommonInfo
(
planPreset
.
explication
)
)
)
)
)
)
)
...
@@ -136,8 +145,9 @@ class EstateScreenPresenter @Inject constructor(
...
@@ -136,8 +145,9 @@ class EstateScreenPresenter @Inject constructor(
}
}
)
)
private
fun
mapCommonInfo
(
info
:
CommonInfoModel
):
ArrayList
<
DisplayInfoModel
>
{
private
fun
mapCommonInfo
(
info
:
CommonInfoModel
?
):
ArrayList
<
DisplayInfoModel
>
{
val
r
=
arrayListOf
<
DisplayInfoModel
>()
val
r
=
arrayListOf
<
DisplayInfoModel
>()
if
(
info
==
null
)
return
r
info
.
building
.
let
{
info
.
building
.
let
{
r
.
add
(
DisplayInfoModel
(
langString
(
R
.
string
.
building
),
"$it"
))
r
.
add
(
DisplayInfoModel
(
langString
(
R
.
string
.
building
),
"$it"
))
}
}
...
...
app/src/main/res/layout/flat_full_card_screen.xml
View file @
76a81cd5
...
@@ -280,7 +280,7 @@
...
@@ -280,7 +280,7 @@
android:id=
"@+id/include10"
android:id=
"@+id/include10"
layout=
"@layout/horizontal_divider"
layout=
"@layout/horizontal_divider"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"
wrap_content
"
android:layout_height=
"
1dp
"
android:layout_marginTop=
"32dp"
android:layout_marginTop=
"32dp"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
...
@@ -307,7 +307,7 @@
...
@@ -307,7 +307,7 @@
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"16dp"
android:layout_marginStart=
"16dp"
android:layout_marginTop=
"
32
dp"
android:layout_marginTop=
"
8
dp"
android:layout_marginEnd=
"16dp"
android:layout_marginEnd=
"16dp"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
...
@@ -318,7 +318,7 @@
...
@@ -318,7 +318,7 @@
android:id=
"@+id/include11"
android:id=
"@+id/include11"
layout=
"@layout/horizontal_divider"
layout=
"@layout/horizontal_divider"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"
wrap_content
"
android:layout_height=
"
1dp
"
android:layout_marginTop=
"32dp"
android:layout_marginTop=
"32dp"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
...
@@ -331,8 +331,12 @@
...
@@ -331,8 +331,12 @@
layout=
"@layout/site_link_viewholder"
layout=
"@layout/site_link_viewholder"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"16dp"
android:layout_marginTop=
"24dp"
android:layout_marginTop=
"24dp"
android:layout_marginEnd=
"16dp"
android:layout_marginBottom=
"16dp"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/include11"
/>
app:layout_constraintTop_toBottomOf=
"@+id/include11"
/>
...
...
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