I have a TextView. I'm trying to capitalize the first letter in every word.
Here's the TextView:
<TextView
android:text="TextView"
android:id="@+id/textView1"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_alignParentRight="true"
android:textSize="30dip"
android:textStyle="bold"
android:layout_marginRight="5dip"
android:ellipsize="end"
android:capitalize="words">
</TextView>
Here's how I'm adding the text:
TextView titleView = (TextView) findViewById(R.id.textView1);
titleView.setText( section.replace("_", " ") );
Can I not add text dynamically and expect it to capitalize the words? Is another trait interfering with android:capitalize
? Is android:capitalize
broken?
Thanks for your replies.