fab: use AppCompatTextView for label

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
Harsh Shandilya 2018-06-01 00:00:36 +05:30 committed by Jason A. Donenfeld
parent 3c84b48f08
commit 125f725a03

View File

@ -22,6 +22,7 @@ import android.os.Parcelable;
import android.support.annotation.ColorRes;
import android.support.annotation.Keep;
import android.support.annotation.NonNull;
import android.support.v7.widget.AppCompatTextView;
import android.util.AttributeSet;
import android.view.ContextThemeWrapper;
import android.view.TouchDelegate;
@ -415,8 +416,8 @@ public class FloatingActionsMenu extends ViewGroup {
if (button == mAddButton || title == null ||
button.getTag(R.id.fab_label) != null) continue;
final TextView label = new TextView(context);
label.setTextAppearance(context, mLabelsStyle);
final AppCompatTextView label = new AppCompatTextView(context);
label.setTextAppearance(getContext(), mLabelsStyle);
label.setText(button.getTitle());
addView(label);