I 've a widget for my app,which contains only one button.It starts a service when it is clicked and changes widget icon color to green.When i stop it changes its color to red.But when i clear memory from task manager the widget is setting to initial layout designed for the widget.(In widget layout button color is not set).But it is not showing the color to button what it has before clear memory is done.Help me in solving this.Thanks in advance..
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="73dp"
android:weightSum="4"
android:background="@drawable/widget_background_1">
<LinearLayout
android:layout_width="0dp"
android:layout_height="fill_parent"
android
rientation="horizontal"
android:layout_weight="2.2" >
<ImageView
android:id="@+id/player"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="1"
android
addingLeft="5dp"
android:src="@drawable/player_disable" />
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="73dp"
android:weightSum="4"
android:background="@drawable/widget_background_1">
<LinearLayout
android:layout_width="0dp"
android:layout_height="fill_parent"
android
rientation="horizontal"android:layout_weight="2.2" >
<ImageView
android:id="@+id/player"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="1"
android
addingLeft="5dp"android:src="@drawable/player_disable" />
</LinearLayout>