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
2680ca1a
Commit
2680ca1a
authored
Jan 14, 2020
by
Vladislav Bogdashkin
🎣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resolve issues
parent
4c946d7f
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
51 additions
and
48 deletions
+51
-48
deal.kt
...ava/com/biganto/visual/roompark/domain/interactor/deal.kt
+1
-1
ScreenController.kt
...ual/roompark/presentation/screen/deal/ScreenController.kt
+8
-4
ScreenDI.kt
...anto/visual/roompark/presentation/screen/deal/ScreenDI.kt
+1
-1
ScreenPresenter.kt
...sual/roompark/presentation/screen/deal/ScreenPresenter.kt
+2
-2
ScreenController.kt
...al/roompark/presentation/screen/deals/ScreenController.kt
+1
-2
ScreenController.kt
...l/roompark/presentation/screen/estate/ScreenController.kt
+2
-2
ScreenDI.kt
...to/visual/roompark/presentation/screen/estate/ScreenDI.kt
+1
-1
ScreenPresenter.kt
...al/roompark/presentation/screen/estate/ScreenPresenter.kt
+1
-1
deal_screen.xml
app/src/main/res/layout/deal_screen.xml
+31
-34
progress_status_title_vertical.xml
app/src/main/res/layout/progress_status_title_vertical.xml
+3
-0
No files found.
app/src/main/java/com/biganto/visual/roompark/domain/interactor/deal.kt
View file @
2680ca1a
...
@@ -11,7 +11,7 @@ import javax.inject.Inject
...
@@ -11,7 +11,7 @@ import javax.inject.Inject
class
DealInteractor
@Inject
constructor
(
class
DealInteractor
@Inject
constructor
(
){
){
fun
getDeal
(
id
:
Int
)
=
Single
.
just
(
dealFlat
)
fun
getDeal
(
id
:
String
)
=
Single
.
just
(
dealFlat
)
fun
getStatusList
()
=
Single
.
just
(
statusList
.
sortedBy
{
it
.
orderId
})
fun
getStatusList
()
=
Single
.
just
(
statusList
.
sortedBy
{
it
.
orderId
})
companion
object
{
companion
object
{
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/deal/ScreenController.kt
View file @
2680ca1a
...
@@ -21,7 +21,7 @@ import javax.inject.Inject
...
@@ -21,7 +21,7 @@ import javax.inject.Inject
* Created by Vladislav Bogdashkin on 30.09.2019.
* Created by Vladislav Bogdashkin on 30.09.2019.
*/
*/
const
val
SELECTED_
ESTATE_ID_KEY
=
"SELECTED_ESTATE_INDEX
"
const
val
SELECTED_
DEAL_ID_KEY
=
"SELECTED_DEAL_GUID
"
class
DealScreenController
:
class
DealScreenController
:
...
@@ -32,7 +32,7 @@ class DealScreenController :
...
@@ -32,7 +32,7 @@ class DealScreenController :
constructor
(
args
:
Bundle
):
super
(
args
)
constructor
(
args
:
Bundle
):
super
(
args
)
constructor
(
id
:
Int
)
:
super
(
bundleOf
(
SELECTED_ESTATE
_ID_KEY
to
id
))
constructor
(
id
:
String
)
:
super
(
bundleOf
(
SELECTED_DEAL
_ID_KEY
to
id
))
override
fun
injectDependencies
()
{
override
fun
injectDependencies
()
{
getComponent
()
getComponent
()
...
@@ -94,12 +94,15 @@ class DealScreenController :
...
@@ -94,12 +94,15 @@ class DealScreenController :
viewState
.
statusList
.
forEach
{
viewState
.
statusList
.
forEach
{
val
statusLayout
=
LayoutInflater
.
from
(
activity
)
val
statusLayout
=
LayoutInflater
.
from
(
activity
)
.
inflate
(
R
.
layout
.
progress_
deal_state_pattern_view_horizont
al
.
inflate
(
R
.
layout
.
progress_
status_title_vertic
al
,
progressLayout
,
progressLayout
,
false
)
,
false
)
as
LinearLayout
as
LinearLayout
Timber
.
d
(
"layouted: $statusLayout"
)
val
statusCeil
=
statusLayout
.
findViewById
<
StatusProgressCeil
>(
R
.
id
.
status
)
val
statusCeil
=
statusLayout
.
findViewById
<
StatusProgressCeil
>(
R
.
id
.
status
)
Timber
.
d
(
"layouted ceail : $statusCeil"
)
val
position
=
it
.
orderId
val
position
=
it
.
orderId
val
statusCount
=
viewState
.
statusList
.
size
val
statusCount
=
viewState
.
statusList
.
size
val
lastStatusPassed
=
viewState
.
estate
.
statusId
val
lastStatusPassed
=
viewState
.
estate
.
statusId
...
@@ -113,6 +116,7 @@ class DealScreenController :
...
@@ -113,6 +116,7 @@ class DealScreenController :
statusCeil
.
invalidate
()
statusCeil
.
invalidate
()
val
statusTitle
=
statusLayout
.
findViewById
<
MaterialTextView
>(
R
.
id
.
title
)
val
statusTitle
=
statusLayout
.
findViewById
<
MaterialTextView
>(
R
.
id
.
title
)
Timber
.
d
(
"layouted statusTitle : $statusTitle"
)
statusTitle
.
text
=
it
.
title
statusTitle
.
text
=
it
.
title
progressLayout
.
addView
(
statusLayout
)
progressLayout
.
addView
(
statusLayout
)
}
}
...
@@ -123,7 +127,7 @@ class DealScreenController :
...
@@ -123,7 +127,7 @@ class DealScreenController :
private
fun
getComponent
()
=
DaggerDealScreenComponent
.
factory
()
private
fun
getComponent
()
=
DaggerDealScreenComponent
.
factory
()
.
create
(
RoomParkApplication
.
component
,
activity
as
RoomParkMainActivity
.
create
(
RoomParkApplication
.
component
,
activity
as
RoomParkMainActivity
,
args
.
get
Int
(
SELECTED_ESTATE_ID_KEY
))
,
args
.
get
String
(
SELECTED_DEAL_ID_KEY
)
?:
error
(
"Deal Id is empty!"
))
.
inject
(
this
)
.
inject
(
this
)
override
fun
getLayoutId
():
Int
=
R
.
layout
.
deal_screen
override
fun
getLayoutId
():
Int
=
R
.
layout
.
deal_screen
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/deal/ScreenDI.kt
View file @
2680ca1a
...
@@ -22,7 +22,7 @@ interface DealScreenComponent {
...
@@ -22,7 +22,7 @@ interface DealScreenComponent {
fun
create
(
fun
create
(
appComponent
:
AppComponent
appComponent
:
AppComponent
,
@BindsInstance
activity
:
RoomParkMainActivity
,
@BindsInstance
activity
:
RoomParkMainActivity
,
@BindsInstance
@Named
(
SELECTED_
ESTATE_ID_KEY
)
selectedDealId
:
Int
,
@BindsInstance
@Named
(
SELECTED_
DEAL_ID_KEY
)
selectedDealId
:
String
):
DealScreenComponent
):
DealScreenComponent
}
}
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/deal/ScreenPresenter.kt
View file @
2680ca1a
...
@@ -22,7 +22,7 @@ import javax.inject.Named
...
@@ -22,7 +22,7 @@ import javax.inject.Named
class
DealScreenPresenter
@Inject
constructor
(
class
DealScreenPresenter
@Inject
constructor
(
private
val
interactor
:
DealInteractor
,
private
val
interactor
:
DealInteractor
,
private
val
context
:
Context
,
private
val
context
:
Context
,
@Named
(
SELECTED_
ESTATE_ID_KEY
)
private
val
estateId
:
Int
@Named
(
SELECTED_
DEAL_ID_KEY
)
private
val
dealId
:
String
)
)
:
BigantoBasePresenter
<
DealScreen
,
DealScreenViewState
>()
{
:
BigantoBasePresenter
<
DealScreen
,
DealScreenViewState
>()
{
...
@@ -38,7 +38,7 @@ class DealScreenPresenter @Inject constructor(
...
@@ -38,7 +38,7 @@ class DealScreenPresenter @Inject constructor(
override
fun
bindIntents
()
{
override
fun
bindIntents
()
{
val
fetchDeal
=
interactor
.
getDeal
(
estate
Id
)
val
fetchDeal
=
interactor
.
getDeal
(
deal
Id
)
.
flatMap
{
deal
->
.
flatMap
{
deal
->
interactor
.
getStatusList
().
map
{
DealScreenViewState
.
LoadDeal
(
deal
,
it
)
}
interactor
.
getStatusList
().
map
{
DealScreenViewState
.
LoadDeal
(
deal
,
it
)
}
}
}
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/deals/ScreenController.kt
View file @
2680ca1a
...
@@ -68,11 +68,10 @@ class DealsScreenController :
...
@@ -68,11 +68,10 @@ class DealsScreenController :
detachDisposable
.
addAll
(
detachDisposable
.
addAll
(
(
dealsRecyclerView
.
adapter
as
DealsListAdapter
)
(
dealsRecyclerView
.
adapter
as
DealsListAdapter
)
.
onItemClicked
.
onItemClicked
.
map
{
it
.
id
.
toInt
()
}
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
{
.
subscribe
{
Timber
.
d
(
"got card clicked $it"
)
Timber
.
d
(
"got card clicked $it"
)
router
.
pushController
(
RouterTransaction
.
with
(
DealScreenController
(
it
))
router
.
pushController
(
RouterTransaction
.
with
(
DealScreenController
(
it
.
id
))
.
pushChangeHandler
(
FadeChangeHandler
())
.
pushChangeHandler
(
FadeChangeHandler
())
.
popChangeHandler
(
FadeChangeHandler
())
.
popChangeHandler
(
FadeChangeHandler
())
)
)
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/estate/ScreenController.kt
View file @
2680ca1a
...
@@ -94,7 +94,7 @@ class EstateScreenController :
...
@@ -94,7 +94,7 @@ class EstateScreenController :
constructor
(
args
:
Bundle
):
super
(
args
)
constructor
(
args
:
Bundle
):
super
(
args
)
constructor
(
id
:
Int
)
:
super
(
bundleOf
(
com
.
biganto
.
visual
.
roompark
.
presentation
.
screen
.
deal
.
SELECTED_ESTATE_ID_KEY
to
id
))
constructor
(
id
:
Int
)
:
super
(
bundleOf
(
SELECTED_ESTATE_ID_KEY
to
id
))
override
fun
injectDependencies
()
{
override
fun
injectDependencies
()
{
getComponent
()
getComponent
()
...
@@ -278,7 +278,7 @@ class EstateScreenController :
...
@@ -278,7 +278,7 @@ class EstateScreenController :
private
fun
getComponent
()
=
DaggerEstateScreenComponent
.
factory
()
private
fun
getComponent
()
=
DaggerEstateScreenComponent
.
factory
()
.
create
(
RoomParkApplication
.
component
,
activity
as
RoomParkMainActivity
.
create
(
RoomParkApplication
.
component
,
activity
as
RoomParkMainActivity
,
args
.
getInt
(
com
.
biganto
.
visual
.
roompark
.
presentation
.
screen
.
deal
.
SELECTED_ESTATE_ID_KEY
))
,
args
.
getInt
(
SELECTED_ESTATE_ID_KEY
))
.
inject
(
this
)
.
inject
(
this
)
override
fun
getLayoutId
():
Int
=
R
.
layout
.
flat_full_card_screen
override
fun
getLayoutId
():
Int
=
R
.
layout
.
flat_full_card_screen
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/estate/ScreenDI.kt
View file @
2680ca1a
...
@@ -22,7 +22,7 @@ interface EstateScreenComponent {
...
@@ -22,7 +22,7 @@ interface EstateScreenComponent {
fun
create
(
fun
create
(
appComponent
:
AppComponent
appComponent
:
AppComponent
,
@BindsInstance
activity
:
RoomParkMainActivity
,
@BindsInstance
activity
:
RoomParkMainActivity
,
@BindsInstance
@Named
(
com
.
biganto
.
visual
.
roompark
.
presentation
.
screen
.
deal
.
SELECTED_ESTATE_ID_KEY
)
selectedEstateId
:
Int
,
@BindsInstance
@Named
(
SELECTED_ESTATE_ID_KEY
)
selectedEstateId
:
Int
):
EstateScreenComponent
):
EstateScreenComponent
}
}
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/estate/ScreenPresenter.kt
View file @
2680ca1a
...
@@ -24,7 +24,7 @@ import javax.inject.Named
...
@@ -24,7 +24,7 @@ import javax.inject.Named
class
EstateScreenPresenter
@Inject
constructor
(
class
EstateScreenPresenter
@Inject
constructor
(
private
val
interactor
:
EstateInteractor
,
private
val
interactor
:
EstateInteractor
,
private
val
context
:
Context
,
private
val
context
:
Context
,
@Named
(
com
.
biganto
.
visual
.
roompark
.
presentation
.
screen
.
deal
.
SELECTED_ESTATE_ID_KEY
)
private
val
estateId
:
Int
@Named
(
SELECTED_ESTATE_ID_KEY
)
private
val
estateId
:
Int
)
)
:
BigantoBasePresenter
<
EstateScreen
,
EstateScreenViewState
>()
{
:
BigantoBasePresenter
<
EstateScreen
,
EstateScreenViewState
>()
{
...
...
app/src/main/res/layout/deal_screen.xml
View file @
2680ca1a
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView
xmlns:android=
"http://schemas.android.com/apk/res/android"
<androidx.core.widget.NestedScrollView
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_margin=
"16dp"
android:layout_marginBottom=
"8dp"
android:layout_marginBottom=
"8dp"
android:orientation=
"vertical"
android:background=
"@color/colorPrimary"
app:cardElevation=
"6dp"
android:orientation=
"vertical"
>
app:cardMaxElevation=
"8dp"
>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -126,7 +123,7 @@
...
@@ -126,7 +123,7 @@
android:layout_weight=
"1"
android:layout_weight=
"1"
android:gravity=
"bottom"
android:gravity=
"bottom"
android:includeFontPadding=
"true"
android:includeFontPadding=
"true"
android:text=
"Сумма договора"
/>
android:text=
"Сумма договора"
/>
<com.google.android.material.textview.MaterialTextView
<com.google.android.material.textview.MaterialTextView
...
@@ -259,32 +256,32 @@
...
@@ -259,32 +256,32 @@
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginTop=
"24dp"
android:layout_marginEnd=
"16dp"
android:layout_marginBottom=
"16dp"
android:background=
"@color/colorCommonBackground"
android:weightSum=
"3"
>
<com.google.android.material.textview.MaterialTextView
style=
"@style/Default_TextView.Header_Text"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/colorCommonBackground"
android:layout_gravity=
"center|center_vertical"
android:weightSum=
"3"
android:layout_weight=
"2"
android:layout_marginTop=
"24dp"
android:gravity=
"start"
android:layout_marginBottom=
"16dp"
android:text=
"Открыть карточку квартиры"
android:layout_marginEnd=
"16dp"
>
android:textAlignment=
"gravity"
/>
<com.google.android.material.textview.MaterialTextView
<ImageView
style=
"@style/Default_TextView.Header_Text"
android:layout_width=
"24dp"
android:layout_width=
"wrap_content"
android:layout_height=
"24dp"
android:layout_height=
"match_parent"
android:layout_gravity=
"end|center_vertical"
android:layout_gravity=
"center|center_vertical"
android:layout_weight=
"1"
android:layout_weight=
"2"
android:baselineAlignBottom=
"false"
android:gravity=
"start"
android:src=
"@drawable/ic_flat"
android:text=
"Открыть карточку квартиры"
android:tint=
"@color/colorAccent"
/>
android:textAlignment=
"gravity"
/>
</LinearLayout>
<ImageView
android:layout_width=
"24dp"
android:layout_height=
"24dp"
android:layout_gravity=
"end|center_vertical"
android:layout_weight=
"1"
android:tint=
"@color/colorAccent"
android:baselineAlignBottom=
"false"
android:src=
"@drawable/ic_flat"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
</androidx.core.widget.NestedScrollView>
\ No newline at end of file
\ No newline at end of file
app/src/main/res/layout/progress_status_title_vertical.xml
View file @
2680ca1a
...
@@ -19,6 +19,9 @@
...
@@ -19,6 +19,9 @@
style=
"@style/Common_Text.Inverted"
style=
"@style/Common_Text.Inverted"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"16dp"
android:layout_marginTop=
"8dp"
android:layout_marginBottom=
"8dp"
android:orientation=
"vertical"
android:orientation=
"vertical"
android:text=
"Договор готовится для подачи на гос. регистрацию b,kf,kf,fk"
>
android:text=
"Договор готовится для подачи на гос. регистрацию b,kf,kf,fk"
>
...
...
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