Selaa lähdekoodia

增加点阵屏设置菜单

weizhengliang 3 vuotta sitten
vanhempi
commit
fd5ad9c4b7

+ 1 - 0
middleware/src/main/code/com/wdkl/ncs/android/middleware/common/Constants.kt

@@ -92,6 +92,7 @@ class Constants {
         var LedProgramTime = 6
         var LedVoiceTimes = 3
         var LedVoiceVolume = 5
+        var LedFontSize = 16
 
         //是否打开debug
         var DEBUG = true

+ 0 - 3
middleware/src/main/code/com/wdkl/ncs/android/middleware/model/bean/SettingConfiguration.java

@@ -34,9 +34,6 @@ public class SettingConfiguration {
     public int transferDuration;
     public int transferDurationLeader;
 
-    public int ledFontSize = 16;
-    public int ledInfoType = 0;
-
 
     private static SettingConfiguration instance;
 

+ 14 - 1
nursehome/src/main/java/com/wdkl/ncs/android/component/nursehome/activity/NurseHomeActivity.kt

@@ -113,6 +113,8 @@ class NurseHomeActivity  : BaseActivity<NurseHomeActivityPresenter, ActivityNurs
 
     private val localThread = Thread()
 
+    private var ledList = ArrayList<LedItem>()
+
     /**
      * 提供layoutID
      */
@@ -240,7 +242,7 @@ class NurseHomeActivity  : BaseActivity<NurseHomeActivityPresenter, ActivityNurs
 
     override fun setLedDeviceInfo(data: ArrayList<DeviceDO>) {
         if (data != null && data.size > 0) {
-            var ledList = ArrayList<LedItem>()
+            ledList.clear()
             for (item in data) {
                 var ledItem = LedItem(LedItem.TYPE_128_32, item.ethIp)
                 ledList.add(ledItem)
@@ -253,6 +255,10 @@ class NurseHomeActivity  : BaseActivity<NurseHomeActivityPresenter, ActivityNurs
         }
     }
 
+    fun getLedList() : ArrayList<LedItem> {
+        return ledList
+    }
+
     /**
      * 设置设置配置
      */
@@ -314,6 +320,7 @@ class NurseHomeActivity  : BaseActivity<NurseHomeActivityPresenter, ActivityNurs
         other_host_radio_bt.setOnClickListener(this)
         collocation_radio_bt.setOnClickListener(this)
         system_settings_radio_bt.setOnClickListener(this)
+        led_settings_radio_bt.setOnClickListener(this)
     }
     /**
      *页面销毁回调
@@ -525,6 +532,12 @@ class NurseHomeActivity  : BaseActivity<NurseHomeActivityPresenter, ActivityNurs
                    showRightFragment(SystemSettingsFragment())
                }
            }
+           R.id.led_settings_radio_bt -> {
+               if (select_id != 10) {
+                   showMiddleFragment(LedSettingsFragment())
+                   select_id = 10
+               }
+           }
        }
     }
 

+ 58 - 0
nursehome/src/main/java/com/wdkl/ncs/android/component/nursehome/adapter/LedItemAdapter.kt

@@ -0,0 +1,58 @@
+package com.wdkl.ncs.android.component.nursehome.adapter
+
+import android.support.v7.widget.RecyclerView
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import android.widget.TextView
+import com.wdkl.ncs.android.component.nursehome.R
+import com.wdkl.ncs.android.component.nursehome.led.LedItem
+
+class LedItemAdapter: RecyclerView.Adapter<LedItemAdapter.ViewHolder> {
+    private var data: ArrayList<LedItem>
+    private var clickListener: OnClickListener?=null
+    private var clickPos = -1
+
+    constructor(data: ArrayList<LedItem>) {
+        this.data = data
+    }
+
+    override fun onCreateViewHolder(p0: ViewGroup?, p1: Int): ViewHolder {
+        val view = LayoutInflater.from(p0?.context).inflate(R.layout.adapter_led_item, p0, false)
+        return ViewHolder(view)
+    }
+
+    override fun onBindViewHolder(p0: ViewHolder?, p1: Int) {
+        if (p1 == clickPos) {
+            p0?.ledName?.setBackgroundResource(R.color.main_color)
+        } else {
+            p0?.ledName?.setBackgroundResource(R.color.white)
+        }
+        p0?.ledName?.setText(data.get(p1).ip)
+        p0?.ledName?.setOnClickListener {
+            if (clickListener != null) {
+                clickListener?.onClick(data.get(p1))
+                clickPos = p0.adapterPosition
+                notifyDataSetChanged()
+            }
+        }
+    }
+
+    override fun getItemCount(): Int {
+        return data.size
+    }
+
+    class ViewHolder : RecyclerView.ViewHolder {
+        var ledName : TextView = itemView.findViewById(R.id.tv_led_name)
+
+        constructor(itemView: View): super(itemView)
+    }
+
+    fun setOnItemClickListener(listener: OnClickListener){
+        clickListener = listener
+    }
+
+    interface OnClickListener{
+        fun onClick(item: LedItem)
+    }
+}

+ 199 - 0
nursehome/src/main/java/com/wdkl/ncs/android/component/nursehome/fragment/LedSettingsFragment.kt

@@ -0,0 +1,199 @@
+package com.wdkl.ncs.android.component.nursehome.fragment
+
+import android.os.Bundle
+import android.support.v4.app.Fragment
+import android.support.v7.widget.LinearLayoutManager
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import android.widget.SeekBar
+import com.enation.javashop.utils.base.tool.BaseToolActivity
+import com.wdkl.ncs.android.component.nursehome.R
+import com.wdkl.ncs.android.component.nursehome.activity.NurseHomeActivity
+import com.wdkl.ncs.android.component.nursehome.adapter.LedItemAdapter
+import com.wdkl.ncs.android.component.nursehome.common.Constants
+import com.wdkl.ncs.android.component.nursehome.led.LedItem
+import com.wdkl.ncs.android.component.nursehome.led.LedManagerUtils
+import com.wdkl.ncs.android.component.nursehome.settingconfig.SettingConfig
+import com.wdkl.ncs.android.lib.utils.showMessage
+import kotlinx.android.synthetic.main.fragment_led_settings.*
+
+class LedSettingsFragment: Fragment() {
+
+    protected lateinit var baseActivity: NurseHomeActivity
+
+    private var adapter: LedItemAdapter? = null
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+        retainInstance = true
+    }
+
+    override fun onCreateView(
+        inflater: LayoutInflater,
+        container: ViewGroup?,
+        savedInstanceState: Bundle?
+    ): View {
+
+        /**初始化宿主Activity*/
+        baseActivity = getActivity() as NurseHomeActivity
+
+        return inflater.inflate(R.layout.fragment_led_settings, null)
+    }
+
+    override fun onViewCreated(view: View?, savedInstanceState: Bundle?) {
+        super.onViewCreated(view, savedInstanceState)
+
+        adapter = LedItemAdapter(baseActivity.getLedList())
+        val layoutManager = LinearLayoutManager(baseActivity)
+        recycler_led_list.layoutManager = layoutManager
+        recycler_led_list.adapter = adapter
+
+        if (LedManagerUtils.getInstance().ledList.size == 0) {
+            tv_led_empty_titile.visibility = View.VISIBLE
+        } else {
+            tv_led_empty_titile.visibility = View.GONE
+        }
+
+        adapter?.setOnItemClickListener(object : LedItemAdapter.OnClickListener{
+            override fun onClick(item: LedItem) {
+                tv_led_type.setText("点阵屏规格: " + item.type)
+                if (Constants.LedVoiceOn == 1) {
+                    tv_led_voice_on.setText("语音播报: 开启")
+                } else {
+                    tv_led_voice_on.setText("语音播报: 关闭")
+                }
+                tv_led_font_size.setText("字体大小: " + Constants.LedFontSize)
+            }
+        })
+
+        init()
+        bindEvent()
+    }
+
+    private fun init() {
+        val ledProgramTime = SettingConfig.getLedProgramTime(baseActivity)
+        val ledVoiceVolume = SettingConfig.getLedVoiceVolume(baseActivity)
+        val ledVoiceTimes = SettingConfig.getLedVoiceTimes(baseActivity)
+        val ledInfoType = SettingConfig.getLedInfoType(baseActivity)
+        val info = SettingConfig.getLedCustomInfo(baseActivity)
+
+        tv_led_program_time.setText("点阵屏呼叫信息显示时长: " + ledProgramTime)
+        skb_led_program_time.progress = ledProgramTime
+
+        tv_led_volume.setText("点阵屏语音呼叫音量:" + ledVoiceVolume)
+        skb_led_volume.progress = ledVoiceVolume
+
+        tv_led_voice_times.setText("点阵屏语音呼叫次数:" + ledVoiceTimes)
+        skb_led_voice_times.progress = ledVoiceTimes
+
+        if (ledInfoType == 1) {
+            rb_custom_info.isChecked = true
+            led_custom_content.visibility = View.VISIBLE
+            led_custom_content.setText(info)
+        } else {
+            rb_date_time.isChecked = true
+            led_custom_content.visibility = View.INVISIBLE
+        }
+    }
+
+    private fun bindEvent() {
+        btn_sync_time.setOnClickListener {
+            LedManagerUtils.getInstance().syncTime()
+        }
+
+        btn_reset_led.setOnClickListener {
+            LedManagerUtils.getInstance().removeAllProgram()
+        }
+
+        btn_check_font.setOnClickListener {
+            LedManagerUtils.getInstance().checkFontFile()
+        }
+
+        btn_power_on_off.setOnClickListener {
+            LedManagerUtils.getInstance().powerOnOff()
+        }
+
+        btn_update_font.setOnClickListener {
+            LedManagerUtils.getInstance().copyFont()
+        }
+
+        skb_led_program_time.setOnSeekBarChangeListener(object : SeekBar.OnSeekBarChangeListener {
+            override fun onProgressChanged(seekBar: SeekBar?, progress: Int, fromUser: Boolean) {
+                tv_led_program_time.setText("点阵屏呼叫信息显示时长: " + progress)
+            }
+
+            override fun onStartTrackingTouch(seekBar: SeekBar?) {
+                //
+            }
+
+            override fun onStopTrackingTouch(seekBar: SeekBar?) {
+                if (seekBar!!.progress < 5) {
+                    showMessage("最小值不能小于5")
+                    seekBar.progress = 5
+                }
+                SettingConfig.setLedProgramTime(baseActivity, seekBar.progress)
+            }
+        })
+
+        skb_led_volume.setOnSeekBarChangeListener(object : SeekBar.OnSeekBarChangeListener {
+            override fun onProgressChanged(seekBar: SeekBar?, progress: Int, fromUser: Boolean) {
+                tv_led_volume.setText("点阵屏语音呼叫音量:" + progress)
+            }
+
+            override fun onStartTrackingTouch(seekBar: SeekBar?) {
+                //
+            }
+
+            override fun onStopTrackingTouch(seekBar: SeekBar?) {
+                if (seekBar!!.progress <= 0) {
+                    showMessage("最小值不能小于1")
+                    seekBar.progress = 1
+                }
+                SettingConfig.setLedVoiceVolume(baseActivity, seekBar.progress)
+            }
+        })
+
+        skb_led_voice_times.setOnSeekBarChangeListener(object : SeekBar.OnSeekBarChangeListener {
+            override fun onProgressChanged(seekBar: SeekBar?, progress: Int, fromUser: Boolean) {
+                tv_led_voice_times.setText("点阵屏语音呼叫次数:" + progress)
+            }
+
+            override fun onStartTrackingTouch(seekBar: SeekBar?) {
+                //
+            }
+
+            override fun onStopTrackingTouch(seekBar: SeekBar?) {
+                if (seekBar!!.progress <= 0) {
+                    showMessage("最小值不能小于1")
+                    seekBar.progress = 1
+                }
+                SettingConfig.setLedVoiceTimes(baseActivity, seekBar.progress)
+            }
+        })
+
+        val info = SettingConfig.getLedCustomInfo(baseActivity)
+        group_led_info_type.setOnCheckedChangeListener { group, checkedId ->
+            if (checkedId == R.id.rb_date_time) {
+                led_custom_content.visibility = View.INVISIBLE
+            } else {
+                led_custom_content.setText(info)
+                led_custom_content.visibility = View.VISIBLE
+            }
+        }
+    }
+
+    override fun onDestroyView() {
+        super.onDestroyView()
+
+        if (group_led_info_type.checkedRadioButtonId == R.id.rb_date_time) {
+            SettingConfig.setLedInfoType(baseActivity, 0)
+            SettingConfig.setLedCustomInfo(baseActivity, "")
+        } else {
+            val info = led_custom_content.text.toString()
+            SettingConfig.setLedInfoType(baseActivity, 1)
+            SettingConfig.setLedCustomInfo(baseActivity, info)
+        }
+    }
+
+}

+ 9 - 5
nursehome/src/main/java/com/wdkl/ncs/android/component/nursehome/led/LedC2MManager.java

@@ -10,6 +10,7 @@ import android.util.Log;
 import com.listenvision.LedC2M;
 import com.listenvision.model.VoiceModel;
 import com.wdkl.ncs.android.component.nursehome.common.Constants;
+import com.wdkl.ncs.android.component.nursehome.settingconfig.SettingConfig;
 import com.wdkl.ncs.android.middleware.model.bean.SettingConfiguration;
 
 import java.io.File;
@@ -32,6 +33,7 @@ import java.util.concurrent.TimeUnit;
 public class LedC2MManager extends LedManager {
     private static final String TAG = "ledC2M";
 
+    private Application application;
     private LedC2M ledC2M;
     private static List<LedItem> ledList = new ArrayList<>();
     private static List<LedProgram> programTextList = new ArrayList<>();
@@ -50,6 +52,7 @@ public class LedC2MManager extends LedManager {
     public void init(Application application) {
         ledC2M = new LedC2M();
         ledC2M.init(application);
+        this.application = application;
         File file = new File(Constants.Companion.getC2M_LED_FONT_PATH());
         if (file.exists()) {
             Constants.Companion.setLedFontExist(true);
@@ -219,13 +222,14 @@ public class LedC2MManager extends LedManager {
                 return;
             }
 
+            int infoType = SettingConfig.getLedInfoType(application);
             if (programTextList.size() == 0) {
                 //默认节目
                 for (LedItem ledItem : ledList) {
                     if (ledItem != null) {
                         //停止语音
                         stopVoice = true;
-                        long h = createDefaultProgram(ledItem.getType(), SettingConfiguration.getInstance().ledFontSize, SettingConfiguration.getInstance().ledInfoType, 3);
+                        long h = createDefaultProgram(ledItem.getType(), Constants.Companion.getLedFontSize(), infoType, 3);
                         if (h != 0) {
                             int result = ledC2M.NetWorkSend(ledItem.getIp(), h);
                             //语音节目
@@ -258,7 +262,7 @@ public class LedC2MManager extends LedManager {
 
                 for (LedItem ledItem : ledList) {
                     if (ledItem != null) {
-                        long h = createCallingProgram(ledItem.getType(), SettingConfiguration.getInstance().ledFontSize);
+                        long h = createCallingProgram(ledItem.getType(), Constants.Companion.getLedFontSize());
                         if (h != 0) {
                             int result = ledC2M.NetWorkSend(ledItem.getIp(), h);
                             //语音节目
@@ -300,8 +304,7 @@ public class LedC2MManager extends LedManager {
             }
         } else if (type == 1) {
             //显示时间和自定义内容
-            String text = "todo";
-
+            String text = SettingConfig.getLedCustomInfo(application);
             if (LedItem.TYPE_64_16.equals(ledType)) {
                 //64x16
                 hProgram = ledC2M.CreateProgram(64, 16, 1,1,savaType);
@@ -428,9 +431,10 @@ public class LedC2MManager extends LedManager {
                         return;
                     }
 
+                    int infoType = SettingConfig.getLedInfoType(application);
                     for (LedItem ledItem : ledList) {
                         if (ledItem != null) {
-                            long h = createDefaultProgram(ledItem.getType(), SettingConfiguration.getInstance().ledFontSize, SettingConfiguration.getInstance().ledInfoType, 0);
+                            long h = createDefaultProgram(ledItem.getType(), Constants.Companion.getLedFontSize(), infoType, 0);
                             if (h != 0) {
                                 int result = ledC2M.NetWorkSend(ledItem.getIp(), h);
                                 //语音节目

+ 3 - 3
nursehome/src/main/java/com/wdkl/ncs/android/component/nursehome/led/LedItem.java

@@ -3,11 +3,11 @@ package com.wdkl.ncs.android.component.nursehome.led;
 public class LedItem {
     /*
     * Led点阵屏相关参数:
-    * type:点阵屏类型,12832代表128x32点阵,6416代表64x16点阵,默认为12832
+    * type:点阵屏类型: 128x32点阵,64x16点阵,默认为128x32
      */
 
-    public static final String TYPE_128_32 = "12832";
-    public static final String TYPE_64_16 = "6416";
+    public static final String TYPE_128_32 = "128x32";
+    public static final String TYPE_64_16 = "64x16";
 
     private String type;
 

+ 98 - 0
nursehome/src/main/java/com/wdkl/ncs/android/component/nursehome/settingconfig/SettingConfig.java

@@ -115,6 +115,13 @@ public class SettingConfig {
     private static final String KEY_SP_DOOR_PHONE_VOLUME = "KEY_SP_DOOR_PHONE_VOLUME";
     private static final int door_phone_volume = 70;
 
+    //点阵屏相关参数
+    private static final String KEY_SP_LED_PROGRAM_TIME = "KEY_SP_LED_PROGRAM_TIME";
+    private static final String KEY_SP_LED_VOICE_VOLUME = "KEY_SP_LED_VOICE_VOLUME";
+    private static final String KEY_SP_LED_VOICE_TIMES = "KEY_SP_LED_VOICE_TIMES";
+    private static final String KEY_SP_LED_INFO_TYPE = "KEY_SP_LED_INFO_TYPE";
+    private static final String KEY_SP_LED_CUSTOM_INFO = "KEY_SP_LED_CUSTOM_INFO";
+
     //语音播报模式
     public static int getTtsMode(Context context) {
         return getSP(context).getInt(KEY_SP_TTS_MODE, TTS_ON);
@@ -615,6 +622,97 @@ public class SettingConfig {
         return getSP(context).getString(KEY_SP_END_OF_DAY_LOCATION, end_of_day_location);
     }
 
+    /**
+     * 获取点阵屏节目显示时间
+     *
+     * @return
+     */
+    public static int getLedProgramTime(Context context) {
+        return getSP(context).getInt(KEY_SP_LED_PROGRAM_TIME, 6);
+    }
+
+    /**
+     * 设置点阵屏节目显示时间
+     *
+     * @param value
+     */
+    public static void setLedProgramTime(Context context, int value) {
+        getEditor(context).putInt(KEY_SP_LED_PROGRAM_TIME, value).apply();
+    }
+
+    /**
+     * 获取点阵屏语音播报音量
+     *
+     * @return
+     */
+    public static int getLedVoiceVolume(Context context) {
+        return getSP(context).getInt(KEY_SP_LED_VOICE_VOLUME, 5);
+    }
+
+    /**
+     * 设置点阵屏语音播报音量
+     *
+     * @param value
+     */
+    public static void setLedVoiceVolume(Context context, int value) {
+        getEditor(context).putInt(KEY_SP_LED_VOICE_VOLUME, value).apply();
+    }
+
+    /**
+     * 获取点阵屏语音播报次数
+     *
+     * @return
+     */
+    public static int getLedVoiceTimes(Context context) {
+        return getSP(context).getInt(KEY_SP_LED_VOICE_TIMES, 3);
+    }
+
+    /**
+     * 设置点阵屏语音播报次数
+     *
+     * @param value
+     */
+    public static void setLedVoiceTimes(Context context, int value) {
+        getEditor(context).putInt(KEY_SP_LED_VOICE_TIMES, value).apply();
+    }
+
+    /**
+     * 获取点阵屏默认显示类型
+     *
+     * @return
+     */
+    public static int getLedInfoType(Context context) {
+        return getSP(context).getInt(KEY_SP_LED_INFO_TYPE, 0);
+    }
+
+    /**
+     * 设置点阵屏默认显示类型
+     *
+     * @param value
+     */
+    public static void setLedInfoType(Context context, int value) {
+        getEditor(context).putInt(KEY_SP_LED_INFO_TYPE, value).apply();
+    }
+
+    /**
+     * 获取点阵屏默认显示内容
+     *
+     * @return
+     */
+    public static String getLedCustomInfo(Context context) {
+        return getSP(context).getString(KEY_SP_LED_CUSTOM_INFO, "");
+    }
+
+    /**
+     * 设置点阵屏默认显示内容
+     *
+     * @param value
+     */
+    public static void setLedCustomInfo(Context context, String value) {
+        getEditor(context).putString(KEY_SP_LED_CUSTOM_INFO, value).apply();
+    }
+
+
 
     private static SharedPreferences getSP(Context context) {
         return context.getSharedPreferences(SP_NAME, Context.MODE_PRIVATE);

+ 14 - 1
nursehome/src/main/res/layout/activity_nurse_home.xml

@@ -272,10 +272,23 @@
                             android:textColor="#FFFFFF"
                             android:text="托管"
                             android:textSize="16sp"
-                            android:visibility="invisible"
+                            android:visibility="gone"
                              />
 
                         <com.wdkl.ncs.android.lib.widget.CustomRadioButton
+                            android:id="@+id/led_settings_radio_bt"
+                            android:layout_width="0dp"
+                            android:layout_height="match_parent"
+                            android:layout_weight="1"
+                            android:button="@null"
+                            android:drawableLeft="@drawable/selt_set_icon"
+                            android:drawablePadding="10px"
+                            android:gravity="center"
+                            android:textColor="@drawable/selector_bottom_btn_text_color"
+                            android:text="点阵屏"
+                            android:textSize="16sp" />
+
+                        <com.wdkl.ncs.android.lib.widget.CustomRadioButton
                             android:id="@+id/system_settings_radio_bt"
                             android:layout_width="0dp"
                             android:layout_height="match_parent"

+ 17 - 0
nursehome/src/main/res/layout/adapter_led_item.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:layout_marginTop="10dp"
+    android:background="#ffffff">
+
+    <TextView
+        android:id="@+id/tv_led_name"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:padding="8dp"
+        android:text="LED点阵屏"
+        android:textSize="24sp"/>
+
+</LinearLayout>

+ 251 - 0
nursehome/src/main/res/layout/fragment_led_settings.xml

@@ -0,0 +1,251 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layout>
+<ScrollView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="#EAF2F9">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        android:padding="8dp">
+
+        <TextView
+            android:id="@+id/tv_led_empty_titile"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:gravity="center_horizontal"
+            android:text="没有点阵屏设备"
+            android:textColor="@color/red_color"
+            android:textSize="32sp"
+            android:visibility="gone"/>
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="240dp">
+            <!--左侧点阵屏列表-->
+            <android.support.v7.widget.RecyclerView
+                android:id="@+id/recycler_led_list"
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_weight="2" />
+
+            <View
+                android:layout_width="1dp"
+                android:layout_height="match_parent"
+                android:layout_marginStart="10dp"
+                android:background="@color/main_color" />
+
+            <!--右侧点阵屏具体设置-->
+            <LinearLayout
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_marginStart="10dp"
+                android:layout_weight="4"
+                android:orientation="vertical">
+
+                <TextView
+                    android:id="@+id/tv_led_type"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="10dp"
+                    android:text="点阵屏规格:"
+                    android:textSize="24sp" />
+
+                <TextView
+                    android:id="@+id/tv_led_voice_on"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="10dp"
+                    android:text="语音播报:"
+                    android:textSize="24sp" />
+
+                <TextView
+                    android:id="@+id/tv_led_font_size"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="10dp"
+                    android:text="字体大小:"
+                    android:textSize="24sp" />
+            </LinearLayout>
+        </LinearLayout>
+
+        <!--点阵屏全局设置-->
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="80dp"
+            android:layout_marginTop="20dp"
+            android:padding="10dp">
+
+            <Button
+                android:id="@+id/btn_sync_time"
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_margin="4dp"
+                android:layout_weight="1"
+                android:text="校正点阵屏时间"
+                android:textSize="16sp" />
+
+            <Button
+                android:id="@+id/btn_reset_led"
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_margin="4dp"
+                android:layout_weight="1"
+                android:text="重置点阵屏"
+                android:textSize="16sp" />
+
+            <Button
+                android:id="@+id/btn_power_on_off"
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_margin="4dp"
+                android:layout_weight="1"
+                android:text="开/关点阵屏"
+                android:textSize="16sp" />
+
+            <Button
+                android:id="@+id/btn_check_font"
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_margin="4dp"
+                android:layout_weight="1"
+                android:text="检查字库文件"
+                android:textSize="16sp" />
+
+            <Button
+                android:id="@+id/btn_update_font"
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_margin="4dp"
+                android:layout_weight="1"
+                android:text="更新字库文件"
+                android:textSize="16sp" />
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="10dp"
+            android:padding="14dp"
+            android:orientation="vertical">
+            <TextView
+                android:id="@+id/tv_led_program_time"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:text="点阵屏呼叫信息显示时长:"
+                android:textSize="22sp" />
+
+            <SeekBar
+                android:id="@+id/skb_led_program_time"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_vertical"
+                android:layout_marginTop="8dp"
+                android:max="30"
+                android:maxHeight="2dp"
+                android:progressDrawable="@drawable/po_seekbar"
+                android:thumb="@drawable/seekbar_thumb"/>
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="10dp"
+            android:padding="14dp"
+            android:orientation="vertical">
+            <TextView
+                android:id="@+id/tv_led_volume"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:text="点阵屏语音呼叫音量:"
+                android:textSize="22sp" />
+
+            <SeekBar
+                android:id="@+id/skb_led_volume"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_vertical"
+                android:layout_marginTop="8dp"
+                android:max="10"
+                android:maxHeight="2dp"
+                android:progressDrawable="@drawable/po_seekbar"
+                android:thumb="@drawable/seekbar_thumb"/>
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="10dp"
+            android:padding="14dp"
+            android:orientation="vertical">
+            <TextView
+                android:id="@+id/tv_led_voice_times"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:text="点阵屏语音呼叫次数:"
+                android:textSize="22sp" />
+
+            <SeekBar
+                android:id="@+id/skb_led_voice_times"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_vertical"
+                android:layout_marginTop="8dp"
+                android:max="5"
+                android:maxHeight="2dp"
+                android:progressDrawable="@drawable/po_seekbar"
+                android:thumb="@drawable/seekbar_thumb"/>
+        </LinearLayout>
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="10dp"
+            android:padding="14dp">
+
+            <TextView
+                android:id="@+id/led_info_type_title"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="点阵屏默认显示内容:"
+                android:textSize="22sp" />
+
+            <RadioGroup
+                android:id="@+id/group_led_info_type"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="40dp"
+                android:layout_toRightOf="@id/led_info_type_title"
+                android:orientation="horizontal">
+
+                <RadioButton
+                    android:id="@+id/rb_date_time"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="仅日期时间"
+                    android:textSize="22sp" />
+
+                <RadioButton
+                    android:id="@+id/rb_custom_info"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="40dp"
+                    android:text="添加自定义"
+                    android:textSize="22sp" />
+            </RadioGroup>
+
+            <EditText
+                android:id="@+id/led_custom_content"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_below="@id/led_info_type_title"
+                android:layout_marginTop="10dp"
+                android:textSize="22sp"
+                android:visibility="invisible" />
+        </RelativeLayout>
+    </LinearLayout>
+</ScrollView>
+</layout>