Changed ATETextView from MaterialTextView
This commit is contained in:
parent
2be114da11
commit
b1c0f70f61
28 changed files with 152 additions and 135 deletions
|
@ -24,6 +24,7 @@ import android.widget.TextView;
|
|||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.AppCompatImageView;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import code.name.monkey.appthemehelper.ThemeStore;
|
||||
|
@ -36,7 +37,7 @@ import code.name.monkey.retromusic.R;
|
|||
public class OptionMenuItemView extends FrameLayout {
|
||||
|
||||
TextView textView;
|
||||
IconImageView iconImageView;
|
||||
AppCompatImageView iconImageView;
|
||||
|
||||
public OptionMenuItemView(@NonNull Context context) {
|
||||
this(context, null);
|
||||
|
|
|
@ -20,12 +20,15 @@ import android.text.TextPaint;
|
|||
import android.util.AttributeSet;
|
||||
import android.view.Gravity;
|
||||
|
||||
import androidx.appcompat.widget.AppCompatTextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
public class VerticalTextView extends AppCompatTextView {
|
||||
import com.google.android.material.textview.MaterialTextView;
|
||||
|
||||
public class VerticalTextView extends MaterialTextView {
|
||||
final boolean topDown;
|
||||
|
||||
public VerticalTextView(Context context, AttributeSet attrs) {
|
||||
public VerticalTextView(@NonNull Context context, @Nullable AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
final int gravity = getGravity();
|
||||
if (Gravity.isVertical(gravity) && (gravity & Gravity.VERTICAL_GRAVITY_MASK) == Gravity.BOTTOM) {
|
||||
|
@ -37,12 +40,12 @@ public class VerticalTextView extends AppCompatTextView {
|
|||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
super.onMeasure(heightMeasureSpec, widthMeasureSpec);
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||
setMeasuredDimension(getMeasuredHeight(), getMeasuredWidth());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
protected void onDraw(@NonNull Canvas canvas) {
|
||||
TextPaint textPaint = getPaint();
|
||||
textPaint.setColor(getCurrentTextColor());
|
||||
textPaint.drawableState = getDrawableState();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue