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
2271b480
Commit
2271b480
authored
Jan 24, 2020
by
Vladislav Bogdashkin
🎣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
estate card
parent
25709434
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
12 deletions
+42
-12
FavoritesAdapter.kt
...rk/presentation/screen/favorites/util/FavoritesAdapter.kt
+15
-0
favorite_card_viewholder.xml
app/src/main/res/layout/favorite_card_viewholder.xml
+26
-11
site_link_viewholder.xml
app/src/main/res/layout/site_link_viewholder.xml
+1
-1
No files found.
app/src/main/java/com/biganto/visual/roompark/presentation/screen/favorites/util/FavoritesAdapter.kt
View file @
2271b480
package
com.biganto.visual.roompark.presentation.screen.favorites.util
import
android.app.Activity
import
android.view.View
import
android.widget.TextView
import
butterknife.BindView
...
...
@@ -11,6 +12,7 @@ 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.setGone
import
com.biganto.visual.roompark.util.extensions.startUrl
/**
* Created by Vladislav Bogdashkin on 16.10.2019.
...
...
@@ -37,6 +39,11 @@ class FavoriteViewHolder(itemView: View) : CommonViewHolder<EstateModel>(itemVie
@BindView
(
R
.
id
.
info_ceil_7
)
lateinit
var
info7
:
View
@BindView
(
R
.
id
.
info_ceil_8
)
lateinit
var
info8
:
View
@BindView
(
R
.
id
.
site_link
)
lateinit
var
siteLink
:
View
@BindView
(
R
.
id
.
link_divider
)
lateinit
var
siteLinkDivider
:
View
init
{
ButterKnife
.
bind
(
this
,
itemView
)
}
...
...
@@ -48,6 +55,14 @@ class FavoriteViewHolder(itemView: View) : CommonViewHolder<EstateModel>(itemVie
model
.
commonInfo
?.
let
{
renderCommonInfo
(
it
)}
startTour
.
setGone
(
model
.
type
!=
"flat"
)
siteLink
.
setGone
(
model
.
url
==
null
)
siteLinkDivider
.
setGone
(
model
.
url
==
null
)
model
.
url
?.
let
{
url
->
siteLink
.
setOnClickListener
{
(
itemView
.
context
as
?
Activity
)
?.
startUrl
(
url
)
}
}
}
private
fun
renderCommonInfo
(
info
:
CommonInfoModel
){
...
...
app/src/main/res/layout/favorite_card_viewholder.xml
View file @
2271b480
<?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"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"16dp"
...
...
@@ -36,28 +37,20 @@
android:text=
"СВОБОДНА"
android:visibility=
"visible"
app:layout_constraintBottom_toBottomOf=
"@+id/feed_read"
app:layout_constraintEnd_to
StartOf=
"@+id/object_plan_icon
"
app:layout_constraintEnd_to
EndOf=
"parent
"
app:layout_constraintStart_toEndOf=
"@+id/feed_read"
app:layout_constraintTop_toTopOf=
"@+id/feed_read"
/>
<ImageView
android:id=
"@+id/object_plan_icon"
android:layout_width=
"24dp"
android:layout_height=
"24dp"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:srcCompat=
"@drawable/ic_favorites"
/>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/object_card_title"
style=
"@style/Header_TextView.Main_Header"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"
8
dp"
android:layout_marginTop=
"
16
dp"
android:text=
"КВАРТИРА\n№ 452"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/
object_plan_icon
"
/>
app:layout_constraintTop_toBottomOf=
"@+id/
feed_date_text_view3
"
/>
<include
android:id=
"@+id/header_divider"
...
...
@@ -87,6 +80,28 @@
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/common_info_block"
/>
<include
android:id=
"@+id/link_divider"
layout=
"@layout/horizontal_divider"
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:layout_marginTop=
"16dp"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/start_tour_button"
/>
<include
android:id=
"@+id/site_link"
layout=
"@layout/site_link_viewholder"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/link_divider"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
\ No newline at end of file
app/src/main/res/layout/site_link_viewholder.xml
View file @
2271b480
...
...
@@ -20,7 +20,7 @@
<ImageView
android:id=
"@+id/room_park_link_icon"
android:layout_width=
"wrap_content"
android:layout_height=
"
wrap_content
"
android:layout_height=
"
24dp
"
android:layout_marginTop=
"16dp"
android:layout_marginBottom=
"16dp"
app:layout_constraintBottom_toBottomOf=
"parent"
...
...
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