Custom Automatic Switch Setting interface

Source: Internet
Author: User

Differential packet:

---a/idh.code/packages/apps/settings/res/layout/alarm_time.xml+++ b/idh.code/packages/apps/settings/res/layout/ alarm_time.xml@@ -2,19 +2,35 @@ <!--Create by SPREADST-<linearlayout xmlns:android= "Http://schemas.andr Oid.com/apk/res/android "+ android:paddingleft=" 5dip "android:layout_width=" Match_parent "android:layout_height= "Wrap_content" android:orientation= "horizontal" >--<textview android:id= "@+id/poweronoff" + + <ImageV Iew android:id= "@+id/power_on_off" android:layout_width= "wrap_content"-android:layout_height= "wrap_content "-android:layout_weight=" 1 "-android:textcolor="? Android:attr/textcolorprimary "-android:paddingtop= "20dip"-android:paddingleft= "10dip"-android:paddingright= "10dip"-android:textappearance= "? Android:            Attr/textappearancemedium "/>+ android:layout_height=" match_parent "/>+ + <linearlayout+ Android:layout_width= "Wrap_coNtent "+ android:layout_height=" wrap_content "+ android:orientation=" vertical "+ android:pad Dingtop= "10dip" + android:paddingleft= "10dip" + android:paddingright= "10dip" + android:layou t_weight= "1" >+ <textview android:id= "@+id/time" + android:layout_width= "Wrap_cont Ent "+ android:layout_height=" wrap_content "+ android:textcolor="? android:attr/t Extcolorprimary "+ android:textsize=" 24dip "+ android:textappearance="? android:a Ttr/textappearancemedium "/>+ <textview android:id=" @+id/dayweek "+ android:layout _width= "wrap_content" + android:layout_height= "wrap_content" + android:textsize=        "14dip" + android:textcolor= "android:attr/textcolorprimary"/>+ </LinearLayout> <!--Modify at 2013-02-01, for Fix bug 123733 start-<!--android:background= "@drawable/clock_selector"-<!- -Modify at 2013-02-01, for fix bug 123733 end-->diff--git a/idh.code/packages/apps/settings/src/com/sprd/settings/t Imerpower/alarmclock.java b/idh.code/packages/apps/settings/src/comold mode 100644new mode 100755index 9c4ddf5. 7d16157---a/idh.code/packages/apps/settings/src/com/sprd/settings/timerpower/alarmclock.java+++ b/idh.code/ packages/apps/settings/src/com/sprd/settings/timerpower/alarmclock.java@@ -23,7 +23,6 @@ Import  Android.widget.AdapterView.OnItemClickListener; Import COM.ANDROID.SETTINGS.R;  Import com.android.settings.settings;-/** * Power on/off application. */@@ -61,7 +60,7 @@ public class AlarmClock extends Activity implements Onitemclicklistener {public void Bindvie            W (view view, context context, cursor cursor) {final Alarm Alarm = new Alarm (alarmclock.this,cursor);-+     Setalarm salarm = new Setalarm ();        View indicator = View.findviewbyid (r.id.indicator); Set the initial state of the clock "checkbox" @@ -78,15 +77,19 @@ -78,15 class AlarmClock extends Activity implements on             Itemclicklistener {}}); LOG.V ("Timerpower alarmclock-------------------->>>>>>>>>>>>>>>" +           Alarm.label);-Final TextView Poweronoff = (TextView) View.findviewbyid (R.id.poweronoff); + + Final ImageView Ipoweronoff = (ImageView) View.findviewbyid (R.id.power_on_off); + final TextView ttime = (textvi             EW) View.findviewbyid (r.id.time), + final TextView Tdayweek = (TextView) View.findviewbyid (R.id.dayweek); if (!alarm.label.equals (") && alarm.label.equals (" on ")) {-Poweronoff.settext (r.str ING.POWER_ON); + ipoweronoff.setimagedrawable (Context.getresources (). Getdrawable (R.drawable.ic_settings_pwron          ));   }else {-Poweronoff.settext (R.string.power_off); + ipoweronoff.setimagedrawable             (Context.getresources (). getdrawable (R.drawable.ic_settings_pwroff)); }-+ Ttime.settext (alarms.formattime (context, Alarm.hour, Alarm.minutes,alarm.daysofweek)); + Tdayweek.s         Ettext (alarm.daysOfWeek.toString (context, false)); }     };


After modification



Custom Automatic Switch Setting interface

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.