mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2025-01-19 06:48:00 +01:00
rename gif_view to photo_view
This commit is contained in:
parent
4c70706d49
commit
26963ffd43
2 changed files with 7 additions and 7 deletions
|
@ -59,7 +59,7 @@ class PhotoFragment : ViewPagerFragment() {
|
||||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
|
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
|
||||||
view = (inflater.inflate(R.layout.pager_photo_item, container, false) as ViewGroup).apply {
|
view = (inflater.inflate(R.layout.pager_photo_item, container, false) as ViewGroup).apply {
|
||||||
subsampling_view.setOnClickListener { photoClicked() }
|
subsampling_view.setOnClickListener { photoClicked() }
|
||||||
gif_view.setOnClickListener { photoClicked() }
|
photo_view.setOnClickListener { photoClicked() }
|
||||||
instant_prev_item.setOnClickListener { listener?.goToPrevItem() }
|
instant_prev_item.setOnClickListener { listener?.goToPrevItem() }
|
||||||
instant_next_item.setOnClickListener { listener?.goToNextItem() }
|
instant_next_item.setOnClickListener { listener?.goToNextItem() }
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ class PhotoFragment : ViewPagerFragment() {
|
||||||
if (subsampling_view.isVisible()) {
|
if (subsampling_view.isVisible()) {
|
||||||
subsampling_view.sendFakeClick(x, y)
|
subsampling_view.sendFakeClick(x, y)
|
||||||
} else {
|
} else {
|
||||||
gif_view.sendFakeClick(x, y)
|
photo_view.sendFakeClick(x, y)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -219,7 +219,7 @@ class PhotoFragment : ViewPagerFragment() {
|
||||||
gifDrawable!!.stop()
|
gifDrawable!!.stop()
|
||||||
}
|
}
|
||||||
|
|
||||||
view.gif_view.setImageDrawable(gifDrawable)
|
view.photo_view.setImageDrawable(gifDrawable)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
gifDrawable = null
|
gifDrawable = null
|
||||||
loadBitmap()
|
loadBitmap()
|
||||||
|
@ -269,7 +269,7 @@ class PhotoFragment : ViewPagerFragment() {
|
||||||
addZoomableView()
|
addZoomableView()
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}).into(view.gif_view)
|
}).into(view.photo_view)
|
||||||
} else {
|
} else {
|
||||||
val options = RequestOptions()
|
val options = RequestOptions()
|
||||||
.diskCacheStrategy(DiskCacheStrategy.NONE)
|
.diskCacheStrategy(DiskCacheStrategy.NONE)
|
||||||
|
@ -280,7 +280,7 @@ class PhotoFragment : ViewPagerFragment() {
|
||||||
.load(getPathToLoad(medium))
|
.load(getPathToLoad(medium))
|
||||||
.thumbnail(0.2f)
|
.thumbnail(0.2f)
|
||||||
.apply(options)
|
.apply(options)
|
||||||
.into(view.gif_view)
|
.into(view.photo_view)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -395,7 +395,7 @@ class PhotoFragment : ViewPagerFragment() {
|
||||||
override fun onDestroyView() {
|
override fun onDestroyView() {
|
||||||
super.onDestroyView()
|
super.onDestroyView()
|
||||||
if (activity?.isActivityDestroyed() == false) {
|
if (activity?.isActivityDestroyed() == false) {
|
||||||
Glide.with(context!!).clear(view.gif_view)
|
Glide.with(context!!).clear(view.photo_view)
|
||||||
view.subsampling_view.recycle()
|
view.subsampling_view.recycle()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<com.github.chrisbanes.photoview.PhotoView
|
<com.github.chrisbanes.photoview.PhotoView
|
||||||
android:id="@+id/gif_view"
|
android:id="@+id/photo_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:scaleType="fitCenter"/>
|
android:scaleType="fitCenter"/>
|
||||||
|
|
Loading…
Reference in a new issue