Thanks Mark for your reply, But my requirement is little different. basically I am changing listview android:background Color dynamically. As you know that while list gets prepared every time, first it refers to the android:cacheColorHint from the cache to draw the list otherwise the scrolling of list gives a broken color of predefined cache color with black. Therefore I was looking if I can refer the attribute of background to the cacheColorHint then changing the background would not also conflict with the listview background color. Otherwise I can also use getListView().setBackgroundResource(R.Color.light_blue); But I am affraid how to handle the cacheColorHint. getListView().setCacheColorHint is not working in this case. Other than using transparent with android:cacheColorHint.
any light Mark would be wonderful. On Apr 4, 1:10 am, Mark Murphy <[email protected]> wrote: > adag wrote: > > Hello, > > I have problem to solve. I have listview in which > > android:background="#FFFF7W" value I would would like to put it in the > > android:cacheColorHint= "the value of the android:background". > > If anybody put some light how to refer the other attribute value to > > another attribute of the same element would be grateful. > > > <ListView android:id="@id/android:list" > > android:background="#FFFF7W" > > android:divider="#B0B0B0" > > android:dividerHeight="1dip" > > android:smoothScrollbar="true" > > android:fastScrollEnabled="true" > > android:layout_width="fill_parent" > > android:layout_height="0dip" > > android:layout_weight="1" > > android:choiceMode="multipleChoice" > > android:cacheColorHint= "<= I would like to refer the same value > > of > > android:background" > > /> > > Use a color resource to define the value, then reference the resource > from both attributes. > > http://developer.android.com/guide/topics/resources/available-resourc... > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > _Beginning Android 2_ from Apress Now Available! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using "remove me" as the subject.

