Android widget text under image

Posted by Chandana on Stack Overflow See other posts from Stack Overflow or by Chandana
Published on 2010-12-26T13:18:18Z Indexed on 2010/12/26 13:53 UTC
Read the original article Hit count: 436

Filed under:

Hi All,

I have create android widget, But I need to display application name under the widget name.

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent"  android:layout_height="fill_parent"> 
      <ImageView android:id="@+id/starticon" android:layout_width="wrap_content" android:visibility="visible"
        android:layout_height="wrap_content" android:layout_alignParentRight="true" android:padding="5dip"
        android:src="@drawable/light_bulb_accept" />       
      <ImageView android:id="@+id/stopicon" android:layout_width="wrap_content" android:visibility="gone"
        android:layout_height="wrap_content" android:layout_alignParentRight="true" android:padding="5dip"
        android:src="@drawable/light_bulb_delete" />
      <TextView android:layout_below="@+id/starticon" android:layout_width="wrap_content" android:visibility="visible" android:layout_height="wrap_content" android:text="@string/app_name"
    />
</LinearLayout>

I have programmatically hide the Image ICON, Bu thing is Text View didn't diaplay undet the image.

Is any one know, why this Text does not display under Image?

Thank You.

© Stack Overflow or respective owner

Related posts about android