diff --git a/app/src/main/java/com/simplemobiletools/gallery/MyImageView.java b/app/src/main/java/com/simplemobiletools/gallery/MyImageView.java deleted file mode 100644 index 4dde27413..000000000 --- a/app/src/main/java/com/simplemobiletools/gallery/MyImageView.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.simplemobiletools.gallery; - -import android.content.Context; -import android.util.AttributeSet; -import android.widget.ImageView; - -public class MyImageView extends ImageView { - - public MyImageView(Context context) { - super(context); - } - - public MyImageView(Context context, AttributeSet attrs) { - super(context, attrs); - } - - public MyImageView(Context context, AttributeSet attrs, int defStyle) { - super(context, attrs, defStyle); - } - - @Override - protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { - super.onMeasure(widthMeasureSpec, heightMeasureSpec); - setMeasuredDimension(getMeasuredWidth(), getMeasuredWidth()); - } -} diff --git a/app/src/main/java/com/simplemobiletools/gallery/MyViewPager.java b/app/src/main/java/com/simplemobiletools/gallery/MyViewPager.java deleted file mode 100644 index 734f232ba..000000000 --- a/app/src/main/java/com/simplemobiletools/gallery/MyViewPager.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.simplemobiletools.gallery; - -import android.content.Context; -import android.util.AttributeSet; -import android.view.MotionEvent; - -import com.booking.rtlviewpager.RtlViewPager; - -public class MyViewPager extends RtlViewPager { - - public MyViewPager(Context context) { - super(context); - } - - public MyViewPager(Context context, AttributeSet attrs) { - super(context, attrs); - } - - @Override - public boolean onInterceptTouchEvent(MotionEvent ev) { - try { - return super.onInterceptTouchEvent(ev); - } catch (IllegalArgumentException ex) { - ex.printStackTrace(); - } - return false; - } - - @Override - public boolean onTouchEvent(MotionEvent ev) { - try { - return super.onTouchEvent(ev); - } catch (IllegalArgumentException ex) { - ex.printStackTrace(); - } - return false; - } -} diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/views/MyImageView.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/views/MyImageView.kt new file mode 100644 index 000000000..156070b52 --- /dev/null +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/views/MyImageView.kt @@ -0,0 +1,22 @@ +package com.simplemobiletools.gallery.views + +import android.content.Context +import android.util.AttributeSet +import android.widget.ImageView + +class MyImageView : ImageView { + + constructor(context: Context) : super(context) { + } + + constructor(context: Context, attrs: AttributeSet) : super(context, attrs) { + } + + constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(context, attrs, defStyle) { + } + + override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) { + super.onMeasure(widthMeasureSpec, heightMeasureSpec) + setMeasuredDimension(measuredWidth, measuredWidth) + } +} diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/views/MyViewPager.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/views/MyViewPager.kt new file mode 100644 index 000000000..1ad8f25b5 --- /dev/null +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/views/MyViewPager.kt @@ -0,0 +1,36 @@ +package com.simplemobiletools.gallery.views + +import android.content.Context +import android.util.AttributeSet +import android.view.MotionEvent + +import com.booking.rtlviewpager.RtlViewPager + +class MyViewPager : RtlViewPager { + + constructor(context: Context) : super(context) { + } + + constructor(context: Context, attrs: AttributeSet) : super(context, attrs) { + } + + override fun onInterceptTouchEvent(ev: MotionEvent): Boolean { + try { + return super.onInterceptTouchEvent(ev) + } catch (ex: IllegalArgumentException) { + ex.printStackTrace() + } + + return false + } + + override fun onTouchEvent(ev: MotionEvent): Boolean { + try { + return super.onTouchEvent(ev) + } catch (ex: IllegalArgumentException) { + ex.printStackTrace() + } + + return false + } +} diff --git a/app/src/main/res/layout-v23/directory_tmb.xml b/app/src/main/res/layout-v23/directory_tmb.xml index 1a1caa96d..4c17ccc19 100644 --- a/app/src/main/res/layout-v23/directory_tmb.xml +++ b/app/src/main/res/layout-v23/directory_tmb.xml @@ -1,5 +1,5 @@ - - - diff --git a/app/src/main/res/layout/directory_tmb.xml b/app/src/main/res/layout/directory_tmb.xml index 5ec42ee05..b6b9d4f7e 100644 --- a/app/src/main/res/layout/directory_tmb.xml +++ b/app/src/main/res/layout/directory_tmb.xml @@ -7,7 +7,7 @@ android:layout_height="match_parent" android:foreground="@drawable/selector"> - diff --git a/app/src/main/res/layout/photo_video_tmb.xml b/app/src/main/res/layout/photo_video_tmb.xml index 0c2c92d22..c14d9fce1 100644 --- a/app/src/main/res/layout/photo_video_tmb.xml +++ b/app/src/main/res/layout/photo_video_tmb.xml @@ -8,7 +8,7 @@ android:layout_height="match_parent" android:foreground="@drawable/selector"> -