MT6763 N1 色温模式功能的实现,手动调节色温。

1,Settings/AndroidManifest.xml  在设置中注册一个广播+ <receiver android:name="com.android.settings.ColorTemperatureBrocastReceiver"> 10 + <intent-filter > 11 + <action andr...
摘要由CSDN通过智能技术生成
1,Settings/AndroidManifest.xml  在设置中注册一个广播
+    <receiver android:name="com.android.settings.ColorTemperatureBrocastReceiver">
 10 +        <intent-filter >
 11 +            <action android:name="android.intent.action.BOOT_COMPLETED"></action>
 12 +        </intent-filter>
 13 +    </receiver>
2.   Settings/res/layout/dialog_fragment.xml   写一个dialogFragment
+<?xml version="1.0" encoding="utf-8"?>^M
 23 +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"^M
 24 +    android:orientation="vertical"^M
 25 +    android:layout_width="match_parent"^M
 26 +    android:layout_height="match_parent">^M
 27 +^M
 28 +    <LinearLayout^M
 29 +        android:layout_width="match_parent"^M
 30 +        android:layout_height="60dp"^M
 31 +        android:gravity="center"^M
 32 +        >^M
 33 +        <TextView^M
 34 +            android:id="@+id/name"^M
 35 +            android:layout_width="wrap_content"^M
 36 +            android:layout_height="wrap_content"^M
 37 +            android:textColor="#000000"^M
 38 +            android:text="@string/color_temperature_fragment" />^M
 39 +    </LinearLayout>^M
 40 +^M
 41 +    <LinearLayout^M
 42 +        android:layout_width="match_parent"^M
 43 +        android:layout_height="wrap_content"^M
 44 +        android:gravity="center">^M
 45 +        <ImageView^M
 46 +            android:layout_width="match_parent"^M
 47 +            android:layout_height="200dp"^M
 48 +            android:layout_marginLeft="30dp"^M
 49 +            android:layout_marginRight="30dp"^M
 50 +            android:src="@drawable/caption_background"/>^M
 51 +    </LinearLayout>^M
 53 +    <LinearLayout^M
 54 +        android:layout_width="match_parent"^M
 55 +        android:layout_height="wrap_content"^M
 56 +        android:orientation="vertical"^M
 57 +        >^M<LinearLayout^M
 60 +            android:layout_width="match_parent"^M
 61 +            android:layout_height="wrap_content">^M
 62 +^M
 63 +            <CheckBox android:id="@+id/checkBox"^M
 64 +                android:layout_marginLeft="15dp"^M
 65 +                android:layout_width="wrap_content"^M
 66 +                android:layout_height="wrap_content" />^M
 67 +^M
 68 +            <TextView^M
 69 +                android:layout_width="wrap_content"^M
 70 +                android:layout_height="wrap_content"^M
 71 +                android:text="@string/color_temperature_default"^M
 72 +                android:textColor="#000000" />^M
 73 +        </LinearLayout>^M
 74 +^M
 75 +        <SeekBar android:id="@+id/seekbar"^M
 76 +            android:layout_width="match_parent"^M
 77 +            android:layout_height="wrap_content"^M
 78 +            android:layout_marginLeft="15dp"^M
 79 +            android:layout_marginRight="15dp"^M
 80 +            android:paddingTop="15dp"^M
 81 +            android:max="14"/>^M
 82 +^M
 83 +        <LinearLayout^M
 84 +            android:layout_width="match_parent"^M
 85 +            android:layout_height="wrap_content"^M
 86 +            android:paddingTop="10dp">^M
 87 +^M
 88 +            <TextView^M
 89 +                android:layout_width="wrap_content"^M
 90 +                android:layout_height="wrap_content"^M
 91 +                android:layout_marginLeft="30dp"^M
 92 +                android:layout_weight="1"^M
 93 +                android:text="@string/warm_color" />^M
<TextView^M
 96 +                android:layout_width="wrap_content"^M
 97 +                android:layout_height="wrap_content"^M
 98 +                android:layout_gravity="right"^M
 99 +                android:layout_marginRight="30dp"^M
100 +                android:text="@string/cool_color" />^M
101 +        </LinearLayout>^M
102 +^M
103 +        <LinearLayout^M
104 +            android:layout_width="match_parent"^M
105 +            android:layout_height="wrap_content"^M
106 +            android:layout_marginTop="40dp"^M
107 +            android:layout_marginBottom="20dp"^M
108 +            android:gravity="center">^M
109 +^M
110 +            <Button^M
111 +                android:id="@+id/cancel"^M
112 +                android:layout_width="120dp"^M
113 +                android:layout_height="40dp"^M
114 +                android:text="@string/color_temperature_cancle" />^M
115 +            <Button android:id="@+id/ok"^M
116 +                android:text="@string/color_temperature_ok"^M
117 +                android:layout_width="120dp"^M
118 +                android:layout_height="40dp" />^M
119 +        </Linear
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值