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
ada433bd
Commit
ada433bd
authored
Apr 09, 2020
by
Vladislav Bogdashkin
🎣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sort albums by publish date
parent
0d2af45b
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
73 deletions
+21
-73
AlbumsRepository.kt
...to/visual/roompark/data/data_provider/AlbumsRepository.kt
+3
-1
AlbumHeaderAdapter.kt
...ark/presentation/screen/albums/util/AlbumHeaderAdapter.kt
+7
-0
DevProgressPreviewAdapter.kt
...sentation/screen/feeds/utils/DevProgressPreviewAdapter.kt
+3
-0
estate_card_viewholder.xml
app/src/main/res/layout-v23/estate_card_viewholder.xml
+5
-1
album_header_preview_viewholder.xml
app/src/main/res/layout/album_header_preview_viewholder.xml
+0
-2
album_preview_card_viewholder.xml
app/src/main/res/layout/album_preview_card_viewholder.xml
+3
-3
estate_card_viewholder.xml
app/src/main/res/layout/estate_card_viewholder.xml
+0
-66
No files found.
app/src/main/java/com/biganto/visual/roompark/data/data_provider/AlbumsRepository.kt
View file @
ada433bd
...
...
@@ -73,7 +73,9 @@ class AlbumsContractModule @Inject constructor(
arrayListOf
(
fetchTopLevelAlbumsDb
,
fetchTopLevelAlbumsApi
)
)
.
doOnNext
{
Timber
.
d
(
"got entity $it"
)
}
.
map
{
fromEntity
(
it
,
::
fromEntity
)
}
.
map
{
fromEntity
(
it
,
::
fromEntity
).
sortedByDescending
{
album
->
album
.
published
}
}
//endregion allAlbums
//region concrete Albums
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/albums/util/AlbumHeaderAdapter.kt
View file @
ada433bd
...
...
@@ -10,6 +10,8 @@ import com.biganto.visual.roompark.presentation.screen.settings.util.CommonRecyc
import
com.biganto.visual.roompark.presentation.screen.settings.util.CommonViewHolder
import
com.bumptech.glide.Glide
import
com.bumptech.glide.load.engine.DiskCacheStrategy
import
java.text.SimpleDateFormat
import
java.util.*
/**
...
...
@@ -31,12 +33,17 @@ class AlbumsHeaderAdapter : CommonRecyclerAdapter<AlbumsHeaderViewHolder, AlbumP
class
AlbumsHeaderViewHolder
(
itemView
:
View
)
:
CommonViewHolder
<
AlbumPreviewModel
>(
itemView
)
{
private
val
dateFormatter
=
SimpleDateFormat
(
"dd MMMM yyyy"
,
Locale
(
"ru"
))
@BindView
(
R
.
id
.
preview
)
lateinit
var
preview
:
ImageView
@BindView
(
R
.
id
.
card_title
)
lateinit
var
articleTitle
:
TextView
@BindView
(
R
.
id
.
card_updated
)
lateinit
var
articleDate
:
TextView
override
fun
onViewBound
(
model
:
AlbumPreviewModel
)
{
articleTitle
.
text
=
model
.
title
articleDate
.
text
=
dateFormatter
.
format
(
model
.
published
)
Glide
.
with
(
itemView
)
.
load
(
model
.
previewUrl
)
.
centerCrop
()
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/feeds/utils/DevProgressPreviewAdapter.kt
View file @
ada433bd
...
...
@@ -41,6 +41,9 @@ class AlbumCardViewHolder(itemView: View) : CommonViewHolder<AlbumPreviewModel>(
articleTitle
.
text
=
model
.
title
articleTitle
.
text
=
model
.
title
articleDate
.
text
=
dateFormatter
.
format
(
model
.
published
)
Glide
.
with
(
preview
)
.
load
(
model
.
previewUrl
)
.
centerCrop
()
...
...
app/src/main/res/layout-v23/estate_card_viewholder.xml
View file @
ada433bd
...
...
@@ -4,7 +4,11 @@
android:layout_width=
"284dp"
android:layout_height=
"189dp"
android:layout_margin=
"16dp"
app:cardElevation=
"0dp"
app:cardElevation=
"8dp"
app:cardMaxElevation=
"12dp"
android:padding=
"16dp"
app:cardCornerRadius=
"4dp"
app:cardForegroundColor=
"#00000000"
app:cardPreventCornerOverlap=
"false"
app:cardUseCompatPadding=
"false"
>
...
...
app/src/main/res/layout/album_header_preview_viewholder.xml
View file @
ada433bd
...
...
@@ -35,7 +35,6 @@
android:layout_marginTop=
"32dp"
android:layout_marginBottom=
"4dp"
android:includeFontPadding=
"false"
android:text=
"Дом №1"
android:textAlignment=
"center"
/>
<com.google.android.material.textview.MaterialTextView
...
...
@@ -49,7 +48,6 @@
android:gravity=
"center"
android:includeFontPadding=
"false"
android:maxLines=
"1"
android:text=
"14 декабря 2019г"
android:textAlignment=
"center"
/>
<FrameLayout
...
...
app/src/main/res/layout/album_preview_card_viewholder.xml
View file @
ada433bd
...
...
@@ -4,9 +4,11 @@
android:layout_width=
"142dp"
android:layout_height=
"94dp"
android:layout_margin=
"16dp"
android:padding=
"8dp"
app:cardCornerRadius=
"4dp"
app:cardElevation=
"4dp"
app:cardMaxElevation=
"8dp"
app:cardForegroundColor=
"#00000000"
app:cardMaxElevation=
"6dp"
app:cardPreventCornerOverlap=
"false"
app:cardUseCompatPadding=
"false"
app:contentPadding=
"8dp"
>
...
...
@@ -34,7 +36,6 @@
android:layout_height=
"wrap_content"
android:layout_marginTop=
"32dp"
android:layout_marginBottom=
"4dp"
android:text=
"Дом №1"
android:textAlignment=
"center"
/>
<com.google.android.material.textview.MaterialTextView
...
...
@@ -47,7 +48,6 @@
android:layout_marginEnd=
"8dp"
android:gravity=
"center"
android:maxLines=
"1"
android:text=
"14 декабря 2019г"
android:textAlignment=
"center"
/>
<FrameLayout
...
...
app/src/main/res/layout/estate_card_viewholder.xml
deleted
100644 → 0
View file @
0d2af45b
<?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"
android:layout_width=
"284dp"
android:layout_height=
"189dp"
android:layout_margin=
"16dp"
app:cardElevation=
"4dp"
app:cardMaxElevation=
"8dp"
app:cardForegroundColor=
"#00000000"
app:cardPreventCornerOverlap=
"false"
app:cardUseCompatPadding=
"false"
>
<com.biganto.visual.roompark.util.view_utils.image_view.RoundedImageView
android:id=
"@+id/preview"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:adjustViewBounds=
"true"
android:background=
"@drawable/default_image_placeholder"
android:cropToPadding=
"true"
android:foreground=
"@color/colorOpacityBackground"
android:scaleType=
"centerCrop"
app:image_corner_radius=
"4dp"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/card_title"
style=
"@style/Header_TextView.Inverted_Header"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"64dp"
android:layout_marginBottom=
"4dp"
android:text=
"Дом №1"
android:textAlignment=
"center"
/>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/textView6"
style=
"@style/Common_Text.Inverted"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"Последнее обновление"
android:textAlignment=
"center"
/>
<com.google.android.material.textview.MaterialTextView
android:id=
"@+id/card_updated"
style=
"@style/Accent_Minor_TextView.DatePlaceHolder"
android:layout_width=
"match_parent"
android:layout_height=
"24dp"
android:layout_marginStart=
"64dp"
android:layout_marginTop=
"4dp"
android:layout_marginEnd=
"64dp"
android:gravity=
"center"
android:maxLines=
"1"
android:text=
"14 декабря 2019г"
android:textAlignment=
"center"
/>
<FrameLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
</FrameLayout>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
\ No newline at end of file
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