Back to project page Cervantes.
The source code is released under:
Apache License
If you think the Android project Cervantes 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 me.alexrs.cervantes.ui.components; /*from w w w . j a v a 2 s . c om*/ import android.content.Context; import android.util.AttributeSet; import android.widget.TextView; /** * @author Alejandro on 27/11/14. */ public class CapitalizedTextView extends TextView { public CapitalizedTextView(Context context, AttributeSet attrs) { super(context, attrs); } @Override public void setText(CharSequence text, BufferType type) { if (text.length() > 0) { text = String.valueOf(text.charAt(0)).toUpperCase() + text.subSequence(1, text.length()); } super.setText(text, type); } }