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
844bf393
Commit
844bf393
authored
Apr 09, 2020
by
Vladislav Bogdashkin
🎣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix photo close dubble clck
parent
f9625f6d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
7 deletions
+18
-7
PhotoDialogController.kt
...isual/roompark/conductor/dialogs/PhotoDialogController.kt
+9
-1
ScreenController.kt
...l/roompark/presentation/screen/albums/ScreenController.kt
+2
-1
photo_viewer.xml
app/src/main/res/layout/photo_viewer.xml
+7
-5
No files found.
app/src/main/java/com/biganto/visual/roompark/conductor/dialogs/PhotoDialogController.kt
View file @
844bf393
...
@@ -7,6 +7,7 @@ import android.os.Bundle
...
@@ -7,6 +7,7 @@ import android.os.Bundle
import
android.view.LayoutInflater
import
android.view.LayoutInflater
import
android.view.View
import
android.view.View
import
android.view.ViewGroup
import
android.view.ViewGroup
import
android.widget.ImageView
import
android.widget.ProgressBar
import
android.widget.ProgressBar
import
androidx.annotation.LayoutRes
import
androidx.annotation.LayoutRes
import
androidx.core.os.bundleOf
import
androidx.core.os.bundleOf
...
@@ -21,6 +22,7 @@ import com.bumptech.glide.request.RequestListener
...
@@ -21,6 +22,7 @@ import com.bumptech.glide.request.RequestListener
import
com.bumptech.glide.request.target.Target
import
com.bumptech.glide.request.target.Target
import
com.github.chrisbanes.photoview.PhotoView
import
com.github.chrisbanes.photoview.PhotoView
import
com.google.android.material.snackbar.Snackbar
import
com.google.android.material.snackbar.Snackbar
import
timber.log.Timber
/**
/**
...
@@ -45,7 +47,6 @@ class PhotoDialogController : Controller {
...
@@ -45,7 +47,6 @@ class PhotoDialogController : Controller {
val
progress
=
view
.
findViewById
<
ProgressBar
>(
R
.
id
.
photo_load_progress_bar
)
val
progress
=
view
.
findViewById
<
ProgressBar
>(
R
.
id
.
photo_load_progress_bar
)
progress
.
visibility
=
View
.
VISIBLE
progress
.
visibility
=
View
.
VISIBLE
view
.
findViewById
<
View
>(
R
.
id
.
close_current_button
).
setOnClickListener
{
handleBack
()
}
activity
?.
requestedOrientation
=
ActivityInfo
.
SCREEN_ORIENTATION_USER_LANDSCAPE
activity
?.
requestedOrientation
=
ActivityInfo
.
SCREEN_ORIENTATION_USER_LANDSCAPE
...
@@ -81,6 +82,13 @@ class PhotoDialogController : Controller {
...
@@ -81,6 +82,13 @@ class PhotoDialogController : Controller {
})
})
.
into
(
photoView
)
.
into
(
photoView
)
}
}
view
.
findViewById
<
ImageView
>(
R
.
id
.
close_current_button
).
setOnClickListener
{
Timber
.
d
(
"Clicked"
)
handleBack
()
}
return
view
return
view
}
}
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/albums/ScreenController.kt
View file @
844bf393
...
@@ -289,7 +289,8 @@ class AlbumsScreenController :
...
@@ -289,7 +289,8 @@ class AlbumsScreenController :
private
fun
loadGlideBlurred
(
url
:
String
,
context
:
Context
,
drawable
:
Target
<
Drawable
>)
=
private
fun
loadGlideBlurred
(
url
:
String
,
context
:
Context
,
drawable
:
Target
<
Drawable
>)
=
Glide
.
with
(
context
)
Glide
.
with
(
context
)
.
load
(
url
)
.
load
(
url
)
.
transform
(
BlurTransformation
(
13
,
2
))
.
centerCrop
()
.
transform
(
BlurTransformation
(
13
,
8
))
.
transform
(
ColorFilterTransformation
(
0
xCC000000
.
toInt
()))
.
transform
(
ColorFilterTransformation
(
0
xCC000000
.
toInt
()))
.
into
(
drawable
)
.
into
(
drawable
)
...
...
app/src/main/res/layout/photo_viewer.xml
View file @
844bf393
...
@@ -22,16 +22,18 @@
...
@@ -22,16 +22,18 @@
<ImageView
<ImageView
android:id=
"@+id/close_current_button"
android:id=
"@+id/close_current_button"
android:layout_width=
"
32
dp"
android:layout_width=
"
56
dp"
android:layout_height=
"
32
dp"
android:layout_height=
"
64
dp"
android:layout_alignParentTop=
"true"
android:layout_alignParentTop=
"true"
android:layout_alignParentEnd=
"true"
android:layout_alignParentEnd=
"true"
android:layout_marginTop=
"
16
dp"
android:layout_marginTop=
"
0
dp"
android:layout_marginEnd=
"
8
dp"
android:layout_marginEnd=
"
0
dp"
android:clickable=
"true"
android:clickable=
"true"
android:contentDescription=
"@string/content_description_close"
android:contentDescription=
"@string/content_description_close"
android:focusable=
"true"
android:focusable=
"true"
android:focusableInTouchMode=
"true"
android:focusableInTouchMode=
"false"
android:padding=
"16dp"
android:paddingEnd=
"8dp"
android:scaleType=
"fitXY"
android:scaleType=
"fitXY"
android:src=
"@drawable/ic_close_circled"
/>
android:src=
"@drawable/ic_close_circled"
/>
...
...
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