Back to project page AlertDialogPro.
The source code is released under:
Apache License
If you think the Android project AlertDialogPro listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.alertdialogpro.material; // w w w . ja va2 s . com import android.content.Context; import android.content.res.TypedArray; import android.support.v7.internal.text.AllCapsTransformationMethod; import android.util.AttributeSet; import android.widget.Button; /** * Introduce "textAllCaps" to Button for platform below API-14. */ public class ButtonCompat extends Button { public ButtonCompat(Context context) { this(context, null); } public ButtonCompat(Context context, AttributeSet attrs) { this(context, attrs, android.R.attr.buttonStyle); } public ButtonCompat(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); TypedArray style = context .obtainStyledAttributes(attrs, R.styleable.CompatTextView, defStyle, 0); boolean allCaps = style.getBoolean(R.styleable.CompatTextView_textAllCaps, false); style.recycle(); if (allCaps) { setTransformationMethod(new AllCapsTransformationMethod(context)); } } }