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
Show 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
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
})
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
* 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
:
...
...
@@ -32,7 +32,7 @@ class DealScreenController :
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
()
{
getComponent
()
...
...
@@ -94,12 +94,15 @@ class DealScreenController :
viewState
.
statusList
.
forEach
{
val
statusLayout
=
LayoutInflater
.
from
(
activity
)
.
inflate
(
R
.
layout
.
progress_
deal_state_pattern_view_horizont
al
.
inflate
(
R
.
layout
.
progress_
status_title_vertic
al
,
progressLayout
,
false
)
as
LinearLayout
Timber
.
d
(
"layouted: $statusLayout"
)
val
statusCeil
=
statusLayout
.
findViewById
<
StatusProgressCeil
>(
R
.
id
.
status
)
Timber
.
d
(
"layouted ceail : $statusCeil"
)
val
position
=
it
.
orderId
val
statusCount
=
viewState
.
statusList
.
size
val
lastStatusPassed
=
viewState
.
estate
.
statusId
...
...
@@ -113,6 +116,7 @@ class DealScreenController :
statusCeil
.
invalidate
()
val
statusTitle
=
statusLayout
.
findViewById
<
MaterialTextView
>(
R
.
id
.
title
)
Timber
.
d
(
"layouted statusTitle : $statusTitle"
)
statusTitle
.
text
=
it
.
title
progressLayout
.
addView
(
statusLayout
)
}
...
...
@@ -123,7 +127,7 @@ class DealScreenController :
private
fun
getComponent
()
=
DaggerDealScreenComponent
.
factory
()
.
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
)
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 {
fun
create
(
appComponent
:
AppComponent
,
@BindsInstance
activity
:
RoomParkMainActivity
,
@BindsInstance
@Named
(
SELECTED_
ESTATE_ID_KEY
)
selectedDealId
:
Int
,
@BindsInstance
@Named
(
SELECTED_
DEAL_ID_KEY
)
selectedDealId
:
String
):
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
class
DealScreenPresenter
@Inject
constructor
(
private
val
interactor
:
DealInteractor
,
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
>()
{
...
...
@@ -38,7 +38,7 @@ class DealScreenPresenter @Inject constructor(
override
fun
bindIntents
()
{
val
fetchDeal
=
interactor
.
getDeal
(
estate
Id
)
val
fetchDeal
=
interactor
.
getDeal
(
deal
Id
)
.
flatMap
{
deal
->
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 :
detachDisposable
.
addAll
(
(
dealsRecyclerView
.
adapter
as
DealsListAdapter
)
.
onItemClicked
.
map
{
it
.
id
.
toInt
()
}
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
{
Timber
.
d
(
"got card clicked $it"
)
router
.
pushController
(
RouterTransaction
.
with
(
DealScreenController
(
it
))
router
.
pushController
(
RouterTransaction
.
with
(
DealScreenController
(
it
.
id
))
.
pushChangeHandler
(
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 :
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
()
{
getComponent
()
...
...
@@ -278,7 +278,7 @@ class EstateScreenController :
private
fun
getComponent
()
=
DaggerEstateScreenComponent
.
factory
()
.
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
)
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 {
fun
create
(
appComponent
:
AppComponent
,
@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
}
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/estate/ScreenPresenter.kt
View file @
2680ca1a
...
...
@@ -24,7 +24,7 @@ import javax.inject.Named
class
EstateScreenPresenter
@Inject
constructor
(
private
val
interactor
:
EstateInteractor
,
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
>()
{
...
...
app/src/main/res/layout/deal_screen.xml
View file @
2680ca1a
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
<androidx.core.widget.NestedScrollView
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_margin=
"16dp"
android:layout_marginBottom=
"8dp"
android:orientation=
"vertical"
app:cardElevation=
"6dp"
app:cardMaxElevation=
"8dp"
>
android:background=
"@color/colorPrimary"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
...
...
@@ -126,7 +123,7 @@
android:layout_weight=
"1"
android:gravity=
"bottom"
android:includeFontPadding=
"true"
android:text=
"Сумма договора"
/>
android:text=
"Сумма договора"
/>
<com.google.android.material.textview.MaterialTextView
...
...
@@ -261,11 +258,11 @@
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/colorCommonBackground"
android:weightSum=
"3"
android:layout_marginTop=
"24dp"
android:layout_marginEnd=
"16dp"
android:layout_marginBottom=
"16dp"
android:layout_marginEnd=
"16dp"
>
android:background=
"@color/colorCommonBackground"
android:weightSum=
"3"
>
<com.google.android.material.textview.MaterialTextView
style=
"@style/Default_TextView.Header_Text"
...
...
@@ -275,16 +272,16 @@
android:layout_weight=
"2"
android:gravity=
"start"
android:text=
"Открыть карточку квартиры"
android:textAlignment=
"gravity"
/>
android:textAlignment=
"gravity"
/>
<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"
/>
android:src=
"@drawable/ic_flat"
android:tint=
"@color/colorAccent"
/>
</LinearLayout>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
\ No newline at end of file
</androidx.core.widget.NestedScrollView>
\ No newline at end of file
app/src/main/res/layout/progress_status_title_vertical.xml
View file @
2680ca1a
...
...
@@ -19,6 +19,9 @@
style=
"@style/Common_Text.Inverted"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"16dp"
android:layout_marginTop=
"8dp"
android:layout_marginBottom=
"8dp"
android:orientation=
"vertical"
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