Skip to content

Commit

Permalink
chore: remove AppCompat dependency from SquareTextView (#1214)
Browse files Browse the repository at this point in the history
* chore: removing AppCompat dependency from SquareTextView

* chore: supress warning

* chore: adding same Kotlin version for plugin
  • Loading branch information
kikoso authored Aug 8, 2023
1 parent da68d5e commit 7516512
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ buildscript {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath 'com.hiya:jacoco-android:0.2'
classpath "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:2.0.1"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,19 @@

package com.google.maps.android.ui;

import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.widget.TextView;

import androidx.appcompat.widget.AppCompatTextView;

public class SquareTextView extends AppCompatTextView {
/**
* This class is extending from TextView to avoid introducing App Compat dependencies. Android Studio might show an error here or
* not, depending on the Inspection Settings. It's not really an error, just a warning.
*
*/
@SuppressLint("AppCompatCustomView")
public class SquareTextView extends TextView {
private int mOffsetTop = 0;
private int mOffsetLeft = 0;

Expand Down

0 comments on commit 7516512

Please sign in to comment.