Thank you! I've been pulling my hair out trying to do exactly this. It seemed like it should be so simple (and, in fact, it is).
On Nov 17, 3:15 pm, G <[EMAIL PROTECTED]> wrote: > Figured it out... > > For those with the same problem, just set the background of the Layout > to @android:drawable/list_selector_background > > On Nov 17, 4:16 pm, G <[EMAIL PROTECTED]> wrote: > > > > > Hi, I've got a Linear Layout that I'm trying to make clickable... I've > > got the click functionality working just fine, but I was hoping for > > the background color to change when it has focus (like an item in a > > ListView). Can anyone help me do this? Below is the xml of the > > LinearLayout... > > > <LinearLayout android:layout_height="wrap_content" > > android:orientation="horizontal" android:layout_width="fill_parent" > > android:clickable="true" android:focusable="true" > > android:paddingBottom="5dip" android:paddingTop="5dip" android:id="@ > > +id/ll_ge_stars" android:focusableInTouchMode="true"> > > <TextView android:layout_width="wrap_content" > > android:layout_height="wrap_content" android:text="Star Rating:" > > android:textSize="25dip" android:layout_gravity="center_vertical"></ > > TextView> > > <LinearLayout android:layout_height="wrap_content" > > android:orientation="horizontal" android:gravity="right" > > android:layout_width="fill_parent"> > > <ImageView > > android:layout_width="wrap_content" > > android:layout_height="wrap_content" android:src="@drawable/ > > rate_star_big_off" android:id="@+id/iv_ge_star1"></ImageView> > > <ImageView > > android:layout_width="wrap_content" > > android:layout_height="wrap_content" android:src="@drawable/ > > rate_star_big_off" android:id="@+id/iv_ge_star2"></ImageView> > > <ImageView > > android:layout_width="wrap_content" > > android:layout_height="wrap_content" android:src="@drawable/ > > rate_star_big_off" android:id="@+id/iv_ge_star3"></ImageView> > > <ImageView > > android:layout_width="wrap_content" > > android:layout_height="wrap_content" android:src="@drawable/ > > rate_star_big_off" android:id="@+id/iv_ge_star4"></ImageView> > > <ImageView > > android:layout_width="wrap_content" > > android:layout_height="wrap_content" android:src="@drawable/ > > rate_star_big_off" android:id="@+id/iv_ge_star5"></ImageView> > > </LinearLayout> > > </LinearLayout>- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

