package com.basic.security.widget; import android.annotation.SuppressLint; import android.content.Context; import android.support.annotation.Nullable; import android.util.AttributeSet; import android.widget.TextView; @SuppressLint("AppCompatCustomView") public class MyTextView extends TextView { public int textColor; public MyTextView(Context context) { super(context); } public MyTextView(Context context, @Nullable AttributeSet attrs) { super(context, attrs); } public MyTextView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); } public MyTextView(Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) { super(context, attrs, defStyleAttr, defStyleRes); } public void setTextColor1(int textColor) { this.textColor = textColor; } public int getCurrentTextColor1() { return this.textColor; } }