Skip to content

Commit

Permalink
Merge pull request #12099 from nextcloud/refactor/convert--SquareLoad…
Browse files Browse the repository at this point in the history
…erImageView-to-kt

Convert SquareLoaderImageView to Kotlin
  • Loading branch information
AndyScherzinger committed Oct 30, 2023
2 parents 7d49856 + 7c80126 commit 9d5c55b
Showing 1 changed file with 10 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,21 @@
* You should have received a copy of the GNU Affero General Public
* License along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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)
}
}

0 comments on commit 9d5c55b

Please sign in to comment.