From d8cd0023ff3a80ad79efc12bb743671a468c7426 Mon Sep 17 00:00:00 2001 From: alperozturk Date: Fri, 27 Oct 2023 16:27:08 +0200 Subject: [PATCH 1/2] Rename .java to .kt Signed-off-by: alperozturk --- .../ui/{SquareLoaderImageView.java => SquareLoaderImageView.kt} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename app/src/main/java/com/nextcloud/ui/{SquareLoaderImageView.java => SquareLoaderImageView.kt} (100%) diff --git a/app/src/main/java/com/nextcloud/ui/SquareLoaderImageView.java b/app/src/main/java/com/nextcloud/ui/SquareLoaderImageView.kt similarity index 100% rename from app/src/main/java/com/nextcloud/ui/SquareLoaderImageView.java rename to app/src/main/java/com/nextcloud/ui/SquareLoaderImageView.kt From 7c80126b07e54e0be60834a378d66671f0f0710f Mon Sep 17 00:00:00 2001 From: alperozturk Date: Fri, 27 Oct 2023 16:27:09 +0200 Subject: [PATCH 2/2] Convert to kt Signed-off-by: alperozturk --- .../com/nextcloud/ui/SquareLoaderImageView.kt | 31 ++++++------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/app/src/main/java/com/nextcloud/ui/SquareLoaderImageView.kt b/app/src/main/java/com/nextcloud/ui/SquareLoaderImageView.kt index 217ef9a3c817..0677d145b28c 100644 --- a/app/src/main/java/com/nextcloud/ui/SquareLoaderImageView.kt +++ b/app/src/main/java/com/nextcloud/ui/SquareLoaderImageView.kt @@ -17,32 +17,21 @@ * You should have received a copy of the GNU Affero General Public * License along with this program. If not, see . */ +package com.nextcloud.ui -package com.nextcloud.ui; - -import android.content.Context; -import android.util.AttributeSet; - -import com.elyeproj.loaderviewlibrary.LoaderImageView; +import android.content.Context +import android.util.AttributeSet +import com.elyeproj.loaderviewlibrary.LoaderImageView /** * Square version of loader image. */ -class SquareLoaderImageView extends LoaderImageView { - public SquareLoaderImageView(Context context) { - super(context); - } - - public SquareLoaderImageView(Context context, AttributeSet attrs) { - super(context, attrs); - } - - public SquareLoaderImageView(Context context, AttributeSet attrs, int defStyle) { - super(context, attrs, defStyle); - } +internal class SquareLoaderImageView : LoaderImageView { + 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 - protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { - super.onMeasure(widthMeasureSpec, widthMeasureSpec); + override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) { + super.onMeasure(widthMeasureSpec, widthMeasureSpec) } }