android - Set textColor in MULTIPLE textViews -


i change textcolor of lot of textviews, , set in red. now, here xml code, first textview changed red :

 <linearlayout         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:minwidth="150dp"         android:orientation="vertical" >          <textview             android:id="@+id/data1_text"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:text="latitude"              android:textcolor="#ff0000"/>          <textview             android:id="@+id/data1"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:text="latitude_val" />          <textview             android:id="@+id/data2_text"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:text="longitude" />          <textview             android:id="@+id/data2"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:text="longitude_val" />          <textview             android:id="@+id/data3_text"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:text="altitude" />          <textview             android:id="@+id/data3"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:text="altitude_val" />          <textview             android:id="@+id/data4_text"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:text="vitesse gps" />          <textview             android:id="@+id/data4"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:text="vitesse gps_val" />     </linearlayout> 

as can see, textviews inside linear layout, sadly, can't use android:textcolor in layout parameters.

here displayed 4 textviews, there lot more, , wouldn't give parameter each 1 one (imagine if want change color after that...)

is there sort of tag indicate style bunch of textviews?

styles you. check article: http://developer.android.com/guide/topics/resources/style-resource.html


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -