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
1c4cc126
Commit
1c4cc126
authored
Jan 24, 2020
by
Vladislav Bogdashkin
🎣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prove tourpreview via dealpreviewmodel
parent
2271b480
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
7 deletions
+28
-7
DealPreviewModel.kt
.../biganto/visual/roompark/domain/model/DealPreviewModel.kt
+2
-0
Adapter.kt
...visual/roompark/presentation/screen/deals/util/Adapter.kt
+10
-0
start_tour_viewholder.xml
app/src/main/res/layout/start_tour_viewholder.xml
+3
-3
start_tour_viewholder_big.xml
app/src/main/res/layout/start_tour_viewholder_big.xml
+12
-4
colors.xml
app/src/main/res/values/colors.xml
+1
-0
No files found.
app/src/main/java/com/biganto/visual/roompark/domain/model/DealPreviewModel.kt
View file @
1c4cc126
...
...
@@ -17,6 +17,7 @@ data class DealPreviewModel(
val
dealToPay
:
Int
,
val
dealTourIds
:
List
<
Int
?>?,
val
isViewed
:
Boolean
=
true
,
val
tourPreview
:
String
?,
val
statusList
:
List
<
StatusModel
>
){
constructor
(
data
:
Pair
<
DealModel
,
List
<
StatusModel
>>)
:
this
(
...
...
@@ -33,6 +34,7 @@ data class DealPreviewModel(
data
.
first
.
amount_pay_sum
,
arrayListOf
<
Int
?>(
data
.
first
.
estate
.
multitourId
),
false
,
null
,
data
.
second
)
}
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/deals/util/Adapter.kt
View file @
1c4cc126
...
...
@@ -15,9 +15,11 @@ import com.biganto.visual.roompark.domain.model.typeDoubleString
import
com.biganto.visual.roompark.presentation.screen.settings.util.CommonRecyclerAdapter
import
com.biganto.visual.roompark.presentation.screen.settings.util.CommonViewHolder
import
com.biganto.visual.roompark.util.extensions.toRubly
import
com.biganto.visual.roompark.util.view_utils.image_view.RoundedImageView
import
com.biganto.visual.roompark.util.view_utils.status_progress_view.StatusProgressAnimationState
import
com.biganto.visual.roompark.util.view_utils.status_progress_view.StatusProgressCeil
import
com.google.android.material.textview.MaterialTextView
import
com.squareup.picasso.Picasso
/**
* Created by Vladislav Bogdashkin on 16.10.2019.
...
...
@@ -49,6 +51,8 @@ class DealViewHolder(itemView: View) : CommonViewHolder<DealPreviewModel>(itemVi
@BindView
(
R
.
id
.
statusContainer
)
lateinit
var
statusLayout
:
LinearLayout
@BindView
(
R
.
id
.
start_tour_image_view
)
lateinit
var
tourScreen
:
RoundedImageView
private
fun
typeName
(
type
:
String
)
=
when
(
type
){
"flat"
->
"КВАРТИРА"
...
...
@@ -82,6 +86,12 @@ class DealViewHolder(itemView: View) : CommonViewHolder<DealPreviewModel>(itemVi
currentStatusText
.
text
=
model
.
statusList
[
model
.
statusNo
-
1
].
title
statusLayout
.
addView
(
currentStatusText
,
0
)
statusLayout
.
invalidate
()
model
.
tourPreview
?.
let
{
Picasso
.
get
()
.
load
(
it
)
.
into
(
tourScreen
)
}
}
private
fun
renderCommonInfo
(
info
:
DealPreviewModel
){
...
...
app/src/main/res/layout/start_tour_viewholder.xml
View file @
1c4cc126
...
...
@@ -15,7 +15,7 @@
android:orientation=
"vertical"
>
<com.biganto.visual.roompark.util.view_utils.image_view.RoundedImageView
android:id=
"@+id/
roundedImageView2
"
android:id=
"@+id/
start_tour_image_view
"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:foreground=
"@color/playTourCardOpacityBackground"
...
...
@@ -32,9 +32,9 @@
android:scaleType=
"fitCenter"
android:tint=
"@color/colorCommonBackground"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"@+id/
roundedImageView2
"
app:layout_constraintEnd_toEndOf=
"@+id/
start_tour_image_view
"
app:layout_constraintHorizontal_bias=
"0.22"
app:layout_constraintStart_toStartOf=
"@+id/
roundedImageView2
"
app:layout_constraintStart_toStartOf=
"@+id/
start_tour_image_view
"
app:layout_constraintTop_toTopOf=
"parent"
app:srcCompat=
"@drawable/ic_feeds"
/>
...
...
app/src/main/res/layout/start_tour_viewholder_big.xml
View file @
1c4cc126
...
...
@@ -3,17 +3,24 @@
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
app:cardElevation=
"4dp"
>
android:layout_margin=
"16dp"
app:cardElevation=
"8dp"
app:cardMaxElevation=
"12dp"
android:padding=
"16dp"
app:cardCornerRadius=
"4dp"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"160dp"
android:orientation=
"vertical"
>
<com.biganto.visual.roompark.util.view_utils.image_view.RoundedImageView
android:id=
"@+id/
roundedImageView2
"
android:id=
"@+id/
start_tour_image_view
"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:foreground=
"@color/playTourCardOpacityLight"
android:foregroundTintMode=
"src_in"
android:scaleType=
"centerCrop"
android:src=
"@drawable/default_image_placeholder"
app:layout_constraintBottom_toBottomOf=
"parent"
...
...
@@ -21,6 +28,7 @@
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<ImageView
android:id=
"@+id/roundedImageView"
android:layout_width=
"32dp"
...
...
@@ -32,8 +40,8 @@
android:scaleType=
"fitCenter"
android:tint=
"@color/colorCommonBackground"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"@+id/
roundedImageView2
"
app:layout_constraintStart_toStartOf=
"@+id/
roundedImageView2
"
app:layout_constraintEnd_toEndOf=
"@+id/
start_tour_image_view
"
app:layout_constraintStart_toStartOf=
"@+id/
start_tour_image_view
"
app:layout_constraintTop_toTopOf=
"parent"
app:srcCompat=
"@drawable/ic_feeds"
/>
...
...
app/src/main/res/values/colors.xml
View file @
1c4cc126
...
...
@@ -16,6 +16,7 @@
<color
name=
"colorOpacityCardBackground"
>
#5C000000
</color>
<color
name=
"colorDividerLightGray"
>
#F2F2F2
</color>
<color
name=
"playTourCardOpacityBackground"
>
#B2000000
</color>
<color
name=
"playTourCardOpacityLight"
>
#20000000
</color>
<color
name=
"colorCheckListGradientStart"
>
@color/colorAccent
</color>
<color
name=
"colorCheckListGradientEnd"
>
@color/colorAccentSecondary
</color>
//endregion
...
...
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