Merge change I2abbb876 into eclair
* changes: New widgets
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 173 B |
BIN
res/drawable-hdpi/appwidget_inner_focus_c.9.png
Normal file
After Width: | Height: | Size: 221 B |
BIN
res/drawable-hdpi/appwidget_inner_focus_l.9.png
Normal file
After Width: | Height: | Size: 400 B |
BIN
res/drawable-hdpi/appwidget_inner_focus_r.9.png
Normal file
After Width: | Height: | Size: 423 B |
BIN
res/drawable-hdpi/appwidget_inner_press_c.9.png
Normal file
After Width: | Height: | Size: 223 B |
BIN
res/drawable-hdpi/appwidget_inner_press_l.9.png
Normal file
After Width: | Height: | Size: 408 B |
BIN
res/drawable-hdpi/appwidget_inner_press_r.9.png
Normal file
After Width: | Height: | Size: 419 B |
Before Width: | Height: | Size: 310 B |
Before Width: | Height: | Size: 312 B |
Before Width: | Height: | Size: 163 B |
Before Width: | Height: | Size: 293 B |
Before Width: | Height: | Size: 294 B |
BIN
res/drawable-hdpi/appwidget_settings_divider.9.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
res/drawable-hdpi/appwidget_settings_ind_mid_c.9.png
Normal file
After Width: | Height: | Size: 437 B |
BIN
res/drawable-hdpi/appwidget_settings_ind_mid_l.9.png
Normal file
After Width: | Height: | Size: 541 B |
BIN
res/drawable-hdpi/appwidget_settings_ind_mid_r.9.png
Normal file
After Width: | Height: | Size: 524 B |
BIN
res/drawable-hdpi/appwidget_settings_ind_off_c.9.png
Normal file
After Width: | Height: | Size: 163 B |
BIN
res/drawable-hdpi/appwidget_settings_ind_off_l.9.png
Normal file
After Width: | Height: | Size: 197 B |
BIN
res/drawable-hdpi/appwidget_settings_ind_off_r.9.png
Normal file
After Width: | Height: | Size: 191 B |
BIN
res/drawable-hdpi/appwidget_settings_ind_on_c.9.png
Normal file
After Width: | Height: | Size: 400 B |
BIN
res/drawable-hdpi/appwidget_settings_ind_on_l.9.png
Normal file
After Width: | Height: | Size: 480 B |
BIN
res/drawable-hdpi/appwidget_settings_ind_on_r.9.png
Normal file
After Width: | Height: | Size: 478 B |
BIN
res/drawable-hdpi/ic_appwidget_settings_bluetooth_off.png
Normal file
After Width: | Height: | Size: 760 B |
BIN
res/drawable-hdpi/ic_appwidget_settings_bluetooth_on.png
Normal file
After Width: | Height: | Size: 814 B |
BIN
res/drawable-hdpi/ic_appwidget_settings_brightness_mid.png
Normal file
After Width: | Height: | Size: 1018 B |
BIN
res/drawable-hdpi/ic_appwidget_settings_brightness_off.png
Normal file
After Width: | Height: | Size: 970 B |
BIN
res/drawable-hdpi/ic_appwidget_settings_brightness_on.png
Normal file
After Width: | Height: | Size: 932 B |
BIN
res/drawable-hdpi/ic_appwidget_settings_gps_off.png
Normal file
After Width: | Height: | Size: 777 B |
BIN
res/drawable-hdpi/ic_appwidget_settings_gps_on.png
Normal file
After Width: | Height: | Size: 793 B |
BIN
res/drawable-hdpi/ic_appwidget_settings_sync_off.png
Normal file
After Width: | Height: | Size: 884 B |
BIN
res/drawable-hdpi/ic_appwidget_settings_sync_on.png
Normal file
After Width: | Height: | Size: 809 B |
BIN
res/drawable-hdpi/ic_appwidget_settings_wifi_off.png
Normal file
After Width: | Height: | Size: 766 B |
BIN
res/drawable-hdpi/ic_appwidget_settings_wifi_on.png
Normal file
After Width: | Height: | Size: 806 B |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 172 B |
BIN
res/drawable-mdpi/appwidget_inner_focus_c.9.png
Normal file
After Width: | Height: | Size: 212 B |
BIN
res/drawable-mdpi/appwidget_inner_focus_l.9.png
Normal file
After Width: | Height: | Size: 325 B |
BIN
res/drawable-mdpi/appwidget_inner_focus_r.9.png
Normal file
After Width: | Height: | Size: 324 B |
BIN
res/drawable-mdpi/appwidget_inner_press_c.9.png
Normal file
After Width: | Height: | Size: 212 B |
BIN
res/drawable-mdpi/appwidget_inner_press_l.9.png
Normal file
After Width: | Height: | Size: 335 B |
BIN
res/drawable-mdpi/appwidget_inner_press_r.9.png
Normal file
After Width: | Height: | Size: 330 B |
Before Width: | Height: | Size: 285 B |
Before Width: | Height: | Size: 293 B |
Before Width: | Height: | Size: 179 B |
Before Width: | Height: | Size: 288 B |
Before Width: | Height: | Size: 298 B |
BIN
res/drawable-mdpi/appwidget_settings_divider.9.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
res/drawable-mdpi/appwidget_settings_ind_mid_c.9.png
Normal file
After Width: | Height: | Size: 302 B |
BIN
res/drawable-mdpi/appwidget_settings_ind_mid_l.9.png
Normal file
After Width: | Height: | Size: 365 B |
BIN
res/drawable-mdpi/appwidget_settings_ind_mid_r.9.png
Normal file
After Width: | Height: | Size: 360 B |
BIN
res/drawable-mdpi/appwidget_settings_ind_off_c.9.png
Normal file
After Width: | Height: | Size: 162 B |
BIN
res/drawable-mdpi/appwidget_settings_ind_off_l.9.png
Normal file
After Width: | Height: | Size: 188 B |
BIN
res/drawable-mdpi/appwidget_settings_ind_off_r.9.png
Normal file
After Width: | Height: | Size: 198 B |
BIN
res/drawable-mdpi/appwidget_settings_ind_on_c.9.png
Normal file
After Width: | Height: | Size: 288 B |
BIN
res/drawable-mdpi/appwidget_settings_ind_on_l.9.png
Normal file
After Width: | Height: | Size: 341 B |
BIN
res/drawable-mdpi/appwidget_settings_ind_on_r.9.png
Normal file
After Width: | Height: | Size: 341 B |
BIN
res/drawable-mdpi/ic_appwidget_settings_bluetooth_off.png
Normal file
After Width: | Height: | Size: 537 B |
BIN
res/drawable-mdpi/ic_appwidget_settings_bluetooth_on.png
Normal file
After Width: | Height: | Size: 557 B |
BIN
res/drawable-mdpi/ic_appwidget_settings_brightness_mid.png
Normal file
After Width: | Height: | Size: 720 B |
BIN
res/drawable-mdpi/ic_appwidget_settings_brightness_off.png
Normal file
After Width: | Height: | Size: 668 B |
BIN
res/drawable-mdpi/ic_appwidget_settings_brightness_on.png
Normal file
After Width: | Height: | Size: 613 B |
BIN
res/drawable-mdpi/ic_appwidget_settings_gps_off.png
Normal file
After Width: | Height: | Size: 541 B |
BIN
res/drawable-mdpi/ic_appwidget_settings_gps_on.png
Normal file
After Width: | Height: | Size: 494 B |
BIN
res/drawable-mdpi/ic_appwidget_settings_sync_off.png
Normal file
After Width: | Height: | Size: 613 B |
BIN
res/drawable-mdpi/ic_appwidget_settings_sync_on.png
Normal file
After Width: | Height: | Size: 598 B |
BIN
res/drawable-mdpi/ic_appwidget_settings_wifi_off.png
Normal file
After Width: | Height: | Size: 528 B |
BIN
res/drawable-mdpi/ic_appwidget_settings_wifi_on.png
Normal file
After Width: | Height: | Size: 555 B |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 847 B |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 885 B |
Before Width: | Height: | Size: 1.1 KiB |
@@ -16,18 +16,13 @@
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:state_window_focused="false" android:state_enabled="true"
|
||||
android:drawable="@drawable/appwidget_inner_default" />
|
||||
|
||||
<item android:state_pressed="true"
|
||||
android:drawable="@drawable/appwidget_inner_pressed" />
|
||||
android:drawable="@drawable/appwidget_inner_press_c" />
|
||||
|
||||
<item android:state_focused="true" android:state_enabled="true"
|
||||
android:drawable="@drawable/appwidget_inner_selected" />
|
||||
|
||||
<item android:state_enabled="true"
|
||||
android:drawable="@drawable/appwidget_inner_default" />
|
||||
android:state_window_focused="true"
|
||||
android:drawable="@drawable/appwidget_inner_focus_c" />
|
||||
|
||||
<item
|
||||
android:drawable="@drawable/appwidget_inner_default" />
|
||||
android:drawable="@android:color/transparent" />
|
||||
</selector>
|
@@ -16,18 +16,13 @@
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:state_window_focused="false" android:state_enabled="true"
|
||||
android:drawable="@drawable/appwidget_outer_default" />
|
||||
|
||||
<item android:state_pressed="true"
|
||||
android:drawable="@drawable/appwidget_outer_pressed" />
|
||||
android:drawable="@drawable/appwidget_inner_press_l" />
|
||||
|
||||
<item android:state_focused="true" android:state_enabled="true"
|
||||
android:drawable="@drawable/appwidget_outer_selected" />
|
||||
|
||||
<item android:state_enabled="true"
|
||||
android:drawable="@drawable/appwidget_outer_default" />
|
||||
android:state_window_focused="true"
|
||||
android:drawable="@drawable/appwidget_inner_focus_l" />
|
||||
|
||||
<item
|
||||
android:drawable="@drawable/appwidget_outer_default" />
|
||||
android:drawable="@android:color/transparent" />
|
||||
</selector>
|
28
res/drawable/appwidget_button_right.xml
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2009 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:state_pressed="true"
|
||||
android:drawable="@drawable/appwidget_inner_press_r" />
|
||||
|
||||
<item android:state_focused="true" android:state_enabled="true"
|
||||
android:state_window_focused="true"
|
||||
android:drawable="@drawable/appwidget_inner_focus_r" />
|
||||
|
||||
<item
|
||||
android:drawable="@android:color/transparent" />
|
||||
</selector>
|
@@ -1,64 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2009 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/main"
|
||||
android:layout_width="@dimen/appwidget_width"
|
||||
android:layout_height="@dimen/appwidget_height"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/appwidget_bg" >
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_wifi"
|
||||
android:layout_width="79dip"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@drawable/appwidget_outer"
|
||||
android:layout_gravity="center_horizontal"
|
||||
/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_bluetooth"
|
||||
android:layout_width="79dip"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@drawable/appwidget_inner"
|
||||
android:layout_gravity="center_horizontal"
|
||||
/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_gps"
|
||||
android:layout_width="79dip"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@drawable/appwidget_inner"
|
||||
android:layout_gravity="center_horizontal"
|
||||
/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_sync"
|
||||
android:layout_width="79dip"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@drawable/appwidget_inner"
|
||||
android:layout_gravity="center_horizontal"
|
||||
/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_brightness"
|
||||
android:layout_width="79dip"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@drawable/appwidget_inner"
|
||||
android:layout_gravity="center_horizontal"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
@@ -14,51 +14,166 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/main"
|
||||
android:layout_width="@dimen/appwidget_width"
|
||||
android:layout_height="@dimen/appwidget_height"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/appwidget_bg" >
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/main"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/appwidget_bg" >
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_wifi"
|
||||
android:layout_width="57dip"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@drawable/appwidget_outer"
|
||||
android:layout_gravity="center_horizontal"
|
||||
<LinearLayout
|
||||
android:id="@+id/btn_wifi"
|
||||
android:layout_width="0dip"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@drawable/appwidget_button_left"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_wifi"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="1"
|
||||
android:scaleType="center"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ind_wifi"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="fitXY"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="1dip"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@drawable/appwidget_settings_divider"
|
||||
/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_bluetooth"
|
||||
android:layout_width="57dip"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@drawable/appwidget_inner"
|
||||
android:layout_gravity="center_horizontal"
|
||||
/>
|
||||
<LinearLayout
|
||||
android:id="@+id/btn_bluetooth"
|
||||
android:layout_width="0dip"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@drawable/appwidget_button_center"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_gps"
|
||||
android:layout_width="57dip"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@drawable/appwidget_inner"
|
||||
android:layout_gravity="center_horizontal"
|
||||
/>
|
||||
<ImageView
|
||||
android:id="@+id/img_bluetooth"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="1"
|
||||
android:scaleType="center"
|
||||
/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_sync"
|
||||
android:layout_width="57dip"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@drawable/appwidget_inner"
|
||||
android:layout_gravity="center_horizontal"
|
||||
/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_brightness"
|
||||
android:layout_width="57dip"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@drawable/appwidget_inner"
|
||||
android:layout_gravity="center_horizontal"
|
||||
/>
|
||||
<ImageView
|
||||
android:id="@+id/ind_bluetooth"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="fitXY"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="1dip"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@drawable/appwidget_settings_divider"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/btn_gps"
|
||||
android:layout_width="0dip"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@drawable/appwidget_button_center"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_gps"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="1"
|
||||
android:scaleType="center"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ind_gps"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="fitXY"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="1dip"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@drawable/appwidget_settings_divider"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/btn_sync"
|
||||
android:layout_width="0dip"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@drawable/appwidget_button_center"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_sync"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="1"
|
||||
android:scaleType="center"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ind_sync"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="fitXY"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="1dip"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@drawable/appwidget_settings_divider"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/btn_brightness"
|
||||
android:layout_width="0dip"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="fill_parent"
|
||||
android:background="@drawable/appwidget_button_right"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_brightness"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="0dip"
|
||||
android:layout_weight="1"
|
||||
android:scaleType="center"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ind_brightness"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="fitXY"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
@@ -18,7 +18,4 @@
|
||||
<dimen name="vpn_connect_margin_right">10sp</dimen>
|
||||
<dimen name="vpn_connect_normal_text_size">16sp</dimen>
|
||||
<dimen name="vpn_connect_input_box_label_width">90sp</dimen>
|
||||
|
||||
<dimen name="appwidget_width">311dip</dimen>
|
||||
<dimen name="appwidget_height">80dip</dimen>
|
||||
</resources>
|
||||
|
@@ -144,40 +144,51 @@ public class SettingsAppWidgetProvider extends AppWidgetProvider {
|
||||
private static void updateButtons(RemoteViews views, Context context) {
|
||||
switch (getWifiState(context)) {
|
||||
case STATE_DISABLED:
|
||||
views.setImageViewResource(R.id.btn_wifi, R.drawable.widget_btn_wifi_off);
|
||||
views.setImageViewResource(R.id.img_wifi, R.drawable.ic_appwidget_settings_wifi_off);
|
||||
views.setImageViewResource(R.id.ind_wifi, R.drawable.appwidget_settings_ind_off_l);
|
||||
break;
|
||||
case STATE_ENABLED:
|
||||
views.setImageViewResource(R.id.btn_wifi, R.drawable.widget_btn_wifi);
|
||||
views.setImageViewResource(R.id.img_wifi, R.drawable.ic_appwidget_settings_wifi_on);
|
||||
views.setImageViewResource(R.id.ind_wifi, R.drawable.appwidget_settings_ind_on_l);
|
||||
break;
|
||||
case STATE_INTERMEDIATE:
|
||||
views.setImageViewResource(R.id.btn_wifi, R.drawable.widget_btn_wifi_gray);
|
||||
views.setImageViewResource(R.id.img_wifi, R.drawable.ic_appwidget_settings_wifi_off);
|
||||
views.setImageViewResource(R.id.ind_wifi, R.drawable.appwidget_settings_ind_mid_l);
|
||||
break;
|
||||
}
|
||||
if (getBrightness(context)) {
|
||||
views.setImageViewResource(R.id.btn_brightness, R.drawable.widget_btn_brightness);
|
||||
views.setImageViewResource(R.id.img_brightness, R.drawable.ic_appwidget_settings_brightness_on);
|
||||
views.setImageViewResource(R.id.ind_brightness, R.drawable.appwidget_settings_ind_on_r);
|
||||
} else {
|
||||
views.setImageViewResource(R.id.btn_brightness, R.drawable.widget_btn_brightness_off);
|
||||
views.setImageViewResource(R.id.img_brightness, R.drawable.ic_appwidget_settings_brightness_off);
|
||||
views.setImageViewResource(R.id.ind_brightness, R.drawable.appwidget_settings_ind_off_r);
|
||||
}
|
||||
if (getSync(context)) {
|
||||
views.setImageViewResource(R.id.btn_sync, R.drawable.widget_btn_sync);
|
||||
views.setImageViewResource(R.id.img_sync, R.drawable.ic_appwidget_settings_sync_on);
|
||||
views.setImageViewResource(R.id.ind_sync, R.drawable.appwidget_settings_ind_on_c);
|
||||
} else {
|
||||
views.setImageViewResource(R.id.btn_sync, R.drawable.widget_btn_sync_off);
|
||||
views.setImageViewResource(R.id.img_sync, R.drawable.ic_appwidget_settings_sync_off);
|
||||
views.setImageViewResource(R.id.ind_sync, R.drawable.appwidget_settings_ind_off_c);
|
||||
}
|
||||
if (getGpsState(context)) {
|
||||
views.setImageViewResource(R.id.btn_gps, R.drawable.widget_btn_gps);
|
||||
views.setImageViewResource(R.id.img_gps, R.drawable.ic_appwidget_settings_gps_on);
|
||||
views.setImageViewResource(R.id.ind_gps, R.drawable.appwidget_settings_ind_on_c);
|
||||
} else {
|
||||
views.setImageViewResource(R.id.btn_gps, R.drawable.widget_btn_gps_off);
|
||||
views.setImageViewResource(R.id.img_gps, R.drawable.ic_appwidget_settings_gps_off);
|
||||
views.setImageViewResource(R.id.ind_gps, R.drawable.appwidget_settings_ind_off_c);
|
||||
}
|
||||
switch (getBluetoothState(context)) {
|
||||
case STATE_DISABLED:
|
||||
views.setImageViewResource(R.id.btn_bluetooth, R.drawable.widget_btn_bluetooth_off);
|
||||
views.setImageViewResource(R.id.img_bluetooth, R.drawable.ic_appwidget_settings_bluetooth_off);
|
||||
views.setImageViewResource(R.id.ind_bluetooth, R.drawable.appwidget_settings_ind_off_c);
|
||||
break;
|
||||
case STATE_ENABLED:
|
||||
views.setImageViewResource(R.id.btn_bluetooth, R.drawable.widget_btn_bluetooth);
|
||||
views.setImageViewResource(R.id.img_bluetooth, R.drawable.ic_appwidget_settings_bluetooth_on);
|
||||
views.setImageViewResource(R.id.ind_bluetooth, R.drawable.appwidget_settings_ind_on_c);
|
||||
break;
|
||||
case STATE_INTERMEDIATE:
|
||||
views.setImageViewResource(R.id.btn_bluetooth,
|
||||
R.drawable.widget_btn_bluetooth_gray);
|
||||
views.setImageViewResource(R.id.img_bluetooth, R.drawable.ic_appwidget_settings_bluetooth_off);
|
||||
views.setImageViewResource(R.id.ind_bluetooth, R.drawable.appwidget_settings_ind_mid_c);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|