定制自动开关机设置界面
来源:互联网 发布:湖南北大青鸟学校java 编辑:程序博客网 时间:2024/05/16 23:46
差分包:
--- 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.android.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"+ + <ImageView 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:paddingTop="10dip"+ android:paddingLeft="10dip"+ android:paddingRight="10dip"+ android:layout_weight="1">+ <TextView android:id="@+id/time"+ android:layout_width="wrap_content"+ android:layout_height="wrap_content"+ android:textColor="?android:attr/textColorPrimary"+ android:textSize="24dip"+ android:textAppearance="?android:attr/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/timerpower/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 bindView(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 @@ public class AlarmClock extends Activity implements OnItemClickListener { } }); 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 = (TextView)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.string.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.setText(alarm.daysOfWeek.toString(context, false)); } };
修改后如图:
0 0
- 定制自动开关机设置界面
- wes7 系统开关机界面定制
- wes7 系统开关机界面定制
- 设置电脑自动开关机
- 电脑自动开关机设置
- 电脑自动开关机设置
- 自动开关机设置
- Mac自动开关机设置
- centos设置自动开关机
- 定制开关机动画
- Android设置界面添加开关控制开关机铃声
- 巧改设置让Windows系统实现自动开关机
- 不用软件自动开关机
- XP自动开关机
- Android自动开关机实现
- Android 自动开关机
- 自动开关机播放音乐
- Android自动开关机实现
- 修改eclipse的默认编码方式
- 计算机视觉库
- Spring资源抽象接口--Resource
- Linux用到的汇编
- thymeleaf+bootstrap,onclick传参实现模态框中遇到的错误
- 定制自动开关机设置界面
- 国内首部android 5.0视频教程全集下载
- 织梦CMS百度编辑器(Ueditor)图片无水印解决办法
- ABAP指针
- 【电脑分区】——不用PE怎么进行电脑分区
- iText parse html with RichText and images to pdf
- jdk与jre的区别
- Mac Eclipse 配置Tomcat 出现localhost:8080/ 404错误
- 思科交换机配置TELNET连接