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
52167543
Commit
52167543
authored
Mar 10, 2020
by
Vladislav Bogdashkin
🎣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix description and view sizes
parent
d688ee87
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
5 deletions
+18
-5
ScreenController.kt
...al/roompark/presentation/screen/photo/ScreenController.kt
+1
-2
PhotoViewAdapter.kt
...ompark/presentation/screen/photo/util/PhotoViewAdapter.kt
+7
-0
photo_view_screen.xml
app/src/main/res/layout/photo_view_screen.xml
+10
-3
No files found.
app/src/main/java/com/biganto/visual/roompark/presentation/screen/photo/ScreenController.kt
View file @
52167543
...
...
@@ -84,8 +84,7 @@ class PhotoScreenController :
fun
getComponent
()
=
DaggerPhotoScreenComponent
.
factory
()
.
create
(
RoomParkApplication
.
component
,
activity
as
RoomParkMainActivity
,
args
.
getInt
(
SELECTED_PHOTO_KEY
))
.
inject
(
this
)
,
args
.
getInt
(
SELECTED_PHOTO_KEY
)).
inject
(
this
)
override
fun
render
(
viewState
:
PhotoScreenViewState
)
{
Timber
.
d
(
"render: $viewState"
)
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/photo/util/PhotoViewAdapter.kt
View file @
52167543
...
...
@@ -9,6 +9,7 @@ import com.biganto.visual.roompark.domain.model.PhotoResolutionModel
import
com.biganto.visual.roompark.presentation.screen.settings.util.CommonRecyclerAdapter
import
com.biganto.visual.roompark.presentation.screen.settings.util.CommonViewHolder
import
com.github.chrisbanes.photoview.PhotoView
import
com.google.android.material.textview.MaterialTextView
import
timber.log.Timber
/**
...
...
@@ -37,11 +38,17 @@ class PhotosViewHolder(itemView: View) : CommonViewHolder<PhotoModel>(itemView)
@BindView
(
R
.
id
.
photo_view
)
lateinit
var
photoPreview
:
PhotoView
@BindView
(
R
.
id
.
photo_description
)
lateinit
var
description
:
MaterialTextView
private
val
picassoAsync
by
lazy
{
return
@lazy
RoomParkApplication
.
component
.
providePicassoAsync
()
}
override
fun
onViewBound
(
model
:
PhotoModel
)
{
description
.
visibility
=
if
(
model
.
description
!=
null
)
View
.
VISIBLE
else
View
.
GONE
model
.
description
?.
let
{
description
.
text
=
it
}
model
.
resolutionList
.
lowelest
()
?.
let
{
picassoAsync
.
load
(
it
.
url
)
...
...
app/src/main/res/layout/photo_view_screen.xml
View file @
52167543
...
...
@@ -53,8 +53,10 @@
android:layout_height=
"24dp"
android:layout_marginStart=
"16dp"
android:layout_marginTop=
"16dp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"@+id/guideline2"
app:layout_constraintVertical_bias=
"0.0"
app:srcCompat=
"@drawable/iic_full_view"
/>
<ImageView
...
...
@@ -63,21 +65,26 @@
android:layout_height=
"24dp"
android:layout_marginTop=
"16dp"
android:layout_marginEnd=
"16dp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"@+id/guideline2"
app:layout_constraintVertical_bias=
"0.0"
app:srcCompat=
"@drawable/iic_full_view"
/>
<com.biganto.visual.roompark.presentation.screen.photo.util.PhotoPreviewSlider
android:id=
"@+id/photosPreviewSlider"
android:layout_width=
"0dp"
android:layout_height=
"0dp"
android:layout_marginTop=
"8dp"
android:layout_height=
"32dp"
android:layout_marginStart=
"16dp"
android:layout_marginTop=
"12dp"
android:layout_marginEnd=
"16dp"
android:layout_marginBottom=
"16dp"
android:orientation=
"horizontal"
android:visibility=
"invisible"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toStartOf=
"@+id/change_size_button"
app:layout_constraintStart_toEndOf=
"@+id/show_full_button"
app:layout_constraintTop_toTopOf=
"@+id/guideline2"
/>
app:layout_constraintTop_toTopOf=
"@+id/guideline2"
app:layout_constraintVertical_bias=
"0.0"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ 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