anyone? On 4 Ago, 09:13, Paolo <brand...@gmail.com> wrote: > I've done a Gallery view composed by just textviews as numbers. By > default if I don't set any colors the item in the centre is black. I > want to change it. > > Using a selector it doesn't work, any ideas? > > UPDATE: > if I try to use a selector also the default behavior gone and I can > see only grey textview > > So, this is the getVIew of my TextAdapter that extends BaseAdapter > > public View getView(int position, View convertView, ViewGroup > parent) { > TextView t = new TextView(mContext); > int val = position + 1; > t.setText("" + val); > t.setTextSize(30f); > t.setTextColor(R.drawable.numericgallery_selector); > > return t; > } > > and this is my selector. > > <selector xmlns:android="http://schemas.android.com/apk/res/ > android"> > > <item android:state_selected="true" android:color="#FDF132"></ > item> > > <item android:state_selected="false" android:color="#CADDCD"></ > item> > > <item android:color="#FFFFFF"></item> > </selector> > > but it doen't work.... :(
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en