瀏覽代碼

增加设备自动化测试,增加屏幕老化测试等

weizhengliang 1 年之前
父節點
當前提交
2fb8cd2e05

+ 163 - 103
android_door/src/main/h10_3128/java/com/wdkl/app/ncs/callingdoor/activity/AppTextActivity.kt

@@ -3,6 +3,8 @@ package com.wdkl.app.ncs.callingbed.activity
 import android.graphics.Color
 import android.hardware.Camera
 import android.os.Bundle
+import android.os.Handler
+import android.os.Looper
 import android.text.TextUtils
 import android.text.method.ScrollingMovementMethod
 import android.view.SurfaceHolder
@@ -15,6 +17,7 @@ import com.wdkl.app.ncs.callingdoor.helper.*
 import com.wdkl.app.ncs.callingdoor.launch.CallingdoorLaunch
 import com.wdkl.ncs.android.lib.base.BaseActivity
 import com.wdkl.ncs.android.lib.settings.SettingConfig
+import com.wdkl.ncs.android.lib.utils.showMessage
 import com.wdkl.ncs.android.lib.vo.filter
 import com.wdkl.ncs.android.middleware.common.Constant
 import com.wdkl.ncs.android.middleware.common.MessageEvent
@@ -36,15 +39,21 @@ class AppTextActivity :BaseActivity<QrCodeFragmentPresenter, TestLayBinding>(),
 
     var info = ""
     var buttonTest = false
-    var is_startTest = false
+    var testStart = false
     var testButton1 = false
     var testButton2 = false
     var testButton3 = false
+    var autoTest = false
+    var screenId = 0
 
     var sosState = 0
     var netOff = false
 
+    val handler by lazy { Handler(Looper.getMainLooper()) }
+    var testThread: Thread? = null
+
     private var mCamera: Camera? = null
+
     val colors = arrayOf(
             Color.BLACK,
             Color.WHITE,
@@ -56,7 +65,11 @@ class AppTextActivity :BaseActivity<QrCodeFragmentPresenter, TestLayBinding>(),
             Color.BLUE,
             Color.MAGENTA
     )
+
     var colorIndex = 0
+    private var red = 0
+    var is_cm = false
+
     override fun onCreate(savedInstanceState: Bundle?) {
         //切换语言
         val languageId: Int = SettingConfig.getLanguageId(this)
@@ -74,61 +87,88 @@ class AppTextActivity :BaseActivity<QrCodeFragmentPresenter, TestLayBinding>(),
 
     override fun init() {
         Constant.IS_TEXT = true
-        is_startTest=false
+        testStart = false
         RecordHelper.getInstance().init()
-        SoundPoolManager.getInstance().playSound(4, 1.0f, 1.0f, 0)
+        //SoundPoolManager.getInstance().playSound(4, 1.0f, 1.0f, 0)
         tv_test_info.movementMethod = ScrollingMovementMethod.getInstance()
         tv_ip.text = "IP:" + NetHelper.getInstance().localIP
 
         startCameraPreview()
     }
-    private var red = 0
-    var is_cm = false
+
     override fun bindEvent() {
         btn_reset.setOnClickListener {
             SerialPortHelper.resetDevice()
         }
+
+        text_main.setOnClickListener {
+            if (!testStart) {
+                testStart = true
+                startTest()
+            } else {
+                showMessage("测试已完成!")
+            }
+        }
+
         view_title_layout_img.setOnClickListener {
             Constant.IS_TEXT = false
             finish()
         }
+
         btn_fist.setOnClickListener {
             slayout.visibility = View.GONE
             btn_fist.visibility = View.GONE
             color_view.visibility = View.GONE
-
+            tv_screen_test.visibility = View.GONE
+            handler.removeCallbacksAndMessages(null)
         }
 
         btn_color.setOnClickListener {
-            SoundPoolManager.getInstance().playSound(6, 1.0f, 1.0f, 0)
-            color_view.bringToFront()
-            color_view.visibility = View.VISIBLE
-            btn_fist.visibility = View.VISIBLE
-
+            if (!autoTest) {
+                //SoundPoolManager.getInstance().playSound(6, 1.0f, 1.0f, 0)
+                color_view.bringToFront()
+                color_view.visibility = View.VISIBLE
+                btn_fist.visibility = View.VISIBLE
+            } else {
+                showMessage("正在自动化测试中!")
+            }
         }
+
         color_view.setOnClickListener {
-            btn_fist.visibility = View.VISIBLE
-            color_view.setBackgroundColor(colors[colorIndex])
-            colorIndex = (colorIndex + 1) % colors.size
+            if (!autoTest) {
+                btn_fist.visibility = View.VISIBLE
+                color_view.setBackgroundColor(colors[colorIndex])
+                colorIndex = (colorIndex + 1) % colors.size
+            }
         }
+
         btn_cm.setOnClickListener {
-            SoundPoolManager.getInstance().playSound(7, 1.0f, 1.0f, 0)
-            is_cm=true
-            slayout.bringToFront()
-            slayout.visibility = View.VISIBLE
-            btn_fist.visibility = View.VISIBLE
-//            slayout.removeAllViews()
-//            red = ContextCompat.getColor(this, R.color.colorAccent);//指定一种颜色
-//            for (i in 0 until 9) {
-//                for (j in 0 until 5) {
-//                    val textView = TextView(this)
-//                    textView.setOnTouchListener(this) // 每个TextView都监听触摸事件
-//                    val rowSpec = GridLayout.spec(i, 1.0f) // 行坐标和比重rowweight,用float表示的
-//                    val columnSpec = GridLayout.spec(j, 1.0f) // 列坐标和columnweight
-//                    val params = GridLayout.LayoutParams(rowSpec, columnSpec)
-//                    slayout.addView(textView, params)
-//                }
-//            }
+            if (!autoTest) {
+                SoundPoolManager.getInstance().playSound(7, 1.0f, 1.0f, 0)
+                slayout.bringToFront()
+                slayout.visibility = View.VISIBLE
+                slayout.clear()
+                btn_fist.visibility = View.VISIBLE
+            } else {
+                showMessage("正在自动化测试中!")
+            }
+        }
+
+        btn_screen_test.setOnClickListener {
+            if (!autoTest) {
+                btn_fist.visibility = View.VISIBLE
+                tv_screen_test.visibility = View.VISIBLE
+                handler.postDelayed({
+                    startScreenTest()
+                }, 30000)
+            } else {
+                showMessage("正在自动化测试中!")
+            }
+        }
+
+        tv_screen_test.setOnClickListener {
+            //拦截事件
+            return@setOnClickListener
         }
 
         btn_net_off.setOnClickListener {
@@ -194,44 +234,99 @@ class AppTextActivity :BaseActivity<QrCodeFragmentPresenter, TestLayBinding>(),
             }
         }
     }
-    private fun startTest() {
-        is_startTest=true
-        Thread {
-            info += "\r\n--> 麦克风测试:\r\n"
-            showInfo(info)
-            SoundPoolManager.getInstance().playSound(3, 1.0f, 1.0f, 0)
-            Thread.sleep(2000)
-            info += "开始录音...\r\n"
-            showInfo(info)
-            RecordHelper.getInstance().recordTestStart()
-            Thread.sleep(2500)
-            RecordHelper.getInstance().recordTestStop()
-            Thread.sleep(500)
-            info += "播放录音...\r\n"
-            showInfo(info)
-            MediaPlayHelper.getInstance().playUrlMusic(RecordHelper.getInstance().audiofilePath, 1.0f, false)
-
-            Thread.sleep(3000)
-            RecordHelper.getInstance().deleteAudioFile()
-
-            info += "--> 指示灯测试\r\n"
-            showInfo(info)
-            SerialPortHelper.setCallStatus("1")
-            Thread.sleep(2000)
-            SerialPortHelper.setCallStatus("0")
-
-            info += "===测试结束!===\r\n"
-            showInfo(info)
-            is_startTest=false
-        }.start()
+
+    private fun startScreenTest() {
+        when (screenId) {
+            0 -> {
+                screenId = 1
+                tv_screen_test.setTextColor(Color.RED)
+                tv_screen_test.setBackgroundColor(Color.BLUE)
+            }
+
+            1 -> {
+                screenId = 2
+                tv_screen_test.setTextColor(Color.YELLOW)
+                tv_screen_test.setBackgroundColor(Color.GRAY)
+            }
+
+            2 -> {
+                screenId = 0
+                tv_screen_test.setTextColor(Color.GREEN)
+                tv_screen_test.setBackgroundColor(Color.MAGENTA)
+            }
+        }
+
+        handler.postDelayed({
+            startScreenTest()
+        }, 30000)
     }
 
+    private fun startTest() {
+        testThread = Thread {
+            try {
+                autoTest = true
+                info += "--> 麦克风测试:\r\n"
+                showInfo(info)
+                SoundPoolManager.getInstance().playSound(3, 1.0f, 1.0f, 0)
+                Thread.sleep(2000)
+                info += "开始录音...\r\n"
+                showInfo(info)
+                RecordHelper.getInstance().recordTestStart()
+                Thread.sleep(2500)
+                RecordHelper.getInstance().recordTestStop()
+                Thread.sleep(500)
+                info += "播放录音...\r\n"
+                showInfo(info)
+                MediaPlayHelper.getInstance().playUrlMusic(RecordHelper.getInstance().audiofilePath, 1.0f, false)
+
+                Thread.sleep(3000)
+                RecordHelper.getInstance().deleteAudioFile()
+
+                info += "--> 指示灯测试\r\n"
+                showInfo(info)
+                SerialPortHelper.setCallStatus("1")
+                Thread.sleep(2000)
+                SerialPortHelper.setCallStatus("0")
+
+                info += "--> 屏幕坏点测试\r\n"
+                showInfo(info)
+                Thread.sleep(1000)
+                for (color in colors) {
+                    runOnUiThread {
+                        //btn_fist.visibility = View.VISIBLE
+                        color_view.visibility = View.VISIBLE
+                        color_view.setBackgroundColor(colors[colorIndex])
+                    }
+                    colorIndex = (colorIndex + 1) % colors.size
+
+                    Thread.sleep(800)
+                }
+
+                info += "--> 触摸测试\r\n"
+                showInfo(info)
+                SoundPoolManager.getInstance().playSound(7, 1.0f, 1.0f, 0)
+                runOnUiThread {
+                    color_view.visibility = View.GONE
+                    slayout.bringToFront()
+                    slayout.visibility = View.VISIBLE
+                    slayout.clear()
+                    btn_fist.visibility = View.VISIBLE
+                }
 
+                info += "--> 按键测试:\r\n"
+                showInfo(info)
+                buttonTest = true
+                autoTest = false
 
+                //info += "===测试结束!===\r\n"
+                //showInfo(info)
+            } catch (e: Exception) {
+                e.printStackTrace()
+            }
+        }
 
-//    override fun keepScreenOn(): Boolean {
-//        return true
-//    }
+        testThread?.start()
+    }
 
     private fun showInfo(text: String) {
         activity.runOnUiThread {
@@ -302,6 +397,9 @@ class AppTextActivity :BaseActivity<QrCodeFragmentPresenter, TestLayBinding>(),
     }
 
     override fun destory() {
+        testThread?.interrupt()
+        handler.removeCallbacksAndMessages(null)
+
         if (mCamera != null) {
             mCamera!!.stopPreview()
             mCamera!!.release()
@@ -335,27 +433,10 @@ class AppTextActivity :BaseActivity<QrCodeFragmentPresenter, TestLayBinding>(),
         //
     }
 
-//    override fun onTouchEvent(event: MotionEvent): Boolean {
-//        when (event.action) {
-//            MotionEvent.ACTION_DOWN -> {
-//                if (is_cm){
-//                    slayout.setBackgroundColor(Color.RED)
-//                }
-//                return true
-//            }
-//            MotionEvent.ACTION_MOVE -> {}
-//            MotionEvent.ACTION_UP -> {}
-//        }
-//        return false
-//    }
-
-
-
-
     @Subscribe(threadMode = ThreadMode.MAIN)
     fun onMoonEvent(messageEvent: MessageEvent) {
         if (Constant.EVENT_SERIAL_TEST == messageEvent.type) {
-            if (!buttonTest) {
+            if (buttonTest) {
                 val message = messageEvent.message as String
                 if (message == "call1" && !testButton1) {
                     info += " #面板呼叫键# "
@@ -371,28 +452,7 @@ class AppTextActivity :BaseActivity<QrCodeFragmentPresenter, TestLayBinding>(),
                 }
 
                 showInfo(info)
-                if (testButton1 && testButton2 && testButton3) {
-                    buttonTest = true
-                }else{
-                    if (!is_startTest){
-                        startTest()
-                    }
-                }
             }
         }
     }
-
-//    override fun onTouch(v: View?, event: MotionEvent?): Boolean {
-//        when (event?.action) {
-//            MotionEvent.ACTION_DOWN -> {
-//                if (is_cm){
-//                    v?.setBackgroundColor(Color.RED)
-//                }
-//                return true
-//            }
-//            MotionEvent.ACTION_MOVE -> {}
-//            MotionEvent.ACTION_UP -> {}
-//        }
-//        return false
-//    }
 }

+ 5 - 0
android_door/src/main/h10_3128/java/com/wdkl/app/ncs/callingdoor/helper/DrawingView.java

@@ -32,6 +32,11 @@ public class DrawingView extends View {
         path = new Path();
     }
 
+    public void clear() {
+        path.reset();
+        invalidate();
+    }
+
     @Override
     protected void onDraw(Canvas canvas) {
         super.onDraw(canvas);

+ 223 - 186
android_door/src/main/h10_3128/res/layout/test_lay.xml

@@ -1,220 +1,257 @@
 <?xml version="1.0" encoding="utf-8"?>
 <layout>
-<RelativeLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:orientation="vertical"
-    android:background="@color/white"
-    >
-
-    <RelativeLayout
-        android:id="@+id/text_top"
-        android:layout_width="match_parent"
-        android:layout_height="50dp"
-        android:background="@color/main_color"
-        >
-        <LinearLayout
-            android:id="@+id/view_title_layout_img"
-            android:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            android:gravity="center"
-            android:clickable="true"
-            >
-        <ImageView
-
-            android:layout_width="15dp"
-            android:layout_height="25dp"
-            android:layout_marginLeft="30dp"
-            android:clickable="true"
-            android:background="@mipmap/integ_arrow_icon"
-            android:layout_centerVertical="true"
-            />
-        </LinearLayout>
-
-
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:textSize="28sp"
-            android:text="测试界面"
-            android:layout_centerHorizontal="true"
-            android:layout_centerVertical="true"
-            android:textColor="@color/white"/>
-
-
-    </RelativeLayout>
-
-
 
-    <com.wdkl.app.ncs.callingdoor.helper.DrawingView
-        android:id="@+id/slayout"
+    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:background="@color/white"
-        android:visibility="gone"
-        />
+        android:orientation="vertical">
 
-    <View
-        android:id="@+id/color_view"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:background="@color/black"
-        android:clickable="true"
-        android:visibility="gone"
-        />
-    <!--<Button
-        android:id="@+id/btn_test"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:text="Start"
-        android:textSize="28sp"/>-->
-
-    <LinearLayout
-        android:id="@+id/text_mian"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:orientation="vertical"
-        android:layout_below="@+id/text_top"
-        >
         <RelativeLayout
+            android:id="@+id/text_top"
             android:layout_width="match_parent"
-            android:layout_height="wrap_content">
-            <SurfaceView
-                android:id="@+id/camera_preview_surface"
-                android:layout_width="160dp"
-                android:layout_height="160dp" />
-
-            <Button
-                android:id="@+id/btn_sos_test"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_margin="10dp"
-                android:layout_toRightOf="@id/camera_preview_surface"
-                android:text="门灯"
-                android:textSize="28sp"/>
+            android:layout_height="50dp"
+            android:background="@color/main_color">
 
-            <Button
-                android:id="@+id/btn_reset"
+            <LinearLayout
+                android:id="@+id/view_title_layout_img"
                 android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_margin="10dp"
-                android:layout_toRightOf="@id/btn_sos_test"
-                android:text="重置"
-                android:textSize="28sp"/>
+                android:layout_height="match_parent"
+                android:paddingLeft="10dp"
+                android:paddingRight="10dp"
+                android:gravity="center">
+
+                <ImageView
+                    android:layout_width="15dp"
+                    android:layout_height="25dp"
+                    android:layout_marginLeft="20dp"
+                    android:layout_marginRight="20dp"
+                    android:background="@mipmap/integ_arrow_icon" />
+            </LinearLayout>
 
-            <Button
-                android:id="@+id/btn_net_off"
+            <TextView
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:layout_margin="10dp"
-                android:layout_toRightOf="@id/btn_reset"
-                android:text="网络开关"
-                android:textSize="28sp"/>
+                android:layout_centerHorizontal="true"
+                android:layout_centerVertical="true"
+                android:text="测试界面"
+                android:textColor="@color/white"
+                android:textSize="28sp" />
 
-            <Button
-                android:id="@+id/btn_color"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_margin="10dp"
-                android:layout_toRightOf="@id/btn_net_off"
-                android:text="屏幕颜色"
-                android:textSize="28sp"/>
+        </RelativeLayout>
 
-            <Button
-                android:id="@+id/btn_cm"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_margin="10dp"
-                android:layout_toRightOf="@id/btn_color"
-                android:text="屏幕触摸"
-                android:textSize="28sp"/>
+        <com.wdkl.app.ncs.callingdoor.helper.DrawingView
+            android:id="@+id/slayout"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:background="@color/white"
+            android:visibility="gone" />
+
+        <!--<Button
+            android:id="@+id/btn_test"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="Start"
+            android:textSize="28sp"/>-->
+
+        <LinearLayout
+            android:id="@+id/text_main"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_below="@+id/text_top"
+            android:padding="10dp"
+            android:orientation="vertical">
+
+            <RelativeLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+
+                <SurfaceView
+                    android:id="@+id/camera_preview_surface"
+                    android:layout_width="160dp"
+                    android:layout_height="160dp" />
+
+                <Button
+                    android:id="@+id/btn_sos_test"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_margin="10dp"
+                    android:padding="10dp"
+                    android:layout_toRightOf="@id/camera_preview_surface"
+                    android:background="@drawable/shape_main_hos_txt_bg"
+                    android:textColor="@drawable/selector_bottom_btn_text_color"
+                    android:text="门灯"
+                    android:textSize="24sp" />
+
+                <Button
+                    android:id="@+id/btn_reset"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_margin="10dp"
+                    android:padding="10dp"
+                    android:layout_toRightOf="@id/btn_sos_test"
+                    android:background="@drawable/shape_main_hos_txt_bg"
+                    android:textColor="@drawable/selector_bottom_btn_text_color"
+                    android:text="重置"
+                    android:textSize="24sp" />
+
+                <Button
+                    android:id="@+id/btn_net_off"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_margin="10dp"
+                    android:padding="10dp"
+                    android:layout_toRightOf="@id/btn_reset"
+                    android:background="@drawable/shape_main_hos_txt_bg"
+                    android:textColor="@drawable/selector_bottom_btn_text_color"
+                    android:text="网络开关"
+                    android:textSize="24sp" />
+
+                <Button
+                    android:id="@+id/btn_color"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_margin="10dp"
+                    android:padding="10dp"
+                    android:layout_toRightOf="@id/btn_net_off"
+                    android:background="@drawable/shape_main_hos_txt_bg"
+                    android:textColor="@drawable/selector_bottom_btn_text_color"
+                    android:text="屏幕颜色"
+                    android:textSize="24sp" />
+
+                <Button
+                    android:id="@+id/btn_cm"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_margin="10dp"
+                    android:padding="10dp"
+                    android:layout_toRightOf="@id/btn_color"
+                    android:background="@drawable/shape_main_hos_txt_bg"
+                    android:textColor="@drawable/selector_bottom_btn_text_color"
+                    android:text="屏幕触摸"
+                    android:textSize="24sp" />
+
+                <Button
+                    android:id="@+id/btn_screen_test"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_margin="10dp"
+                    android:padding="10dp"
+                    android:layout_toRightOf="@id/btn_cm"
+                    android:background="@drawable/shape_main_hos_txt_bg"
+                    android:textColor="@drawable/selector_bottom_btn_text_color"
+                    android:text="屏幕老化测试"
+                    android:textSize="24sp"/>
+
+                <TextView
+                    android:id="@+id/tv_ip"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_below="@id/btn_reset"
+                    android:layout_marginLeft="10dp"
+                    android:layout_toRightOf="@id/camera_preview_surface"
+                    android:text="IP:"
+                    android:textSize="20sp" />
+
+                <EditText
+                    android:id="@+id/edit_flash_mac"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_below="@id/tv_ip"
+                    android:layout_marginLeft="10dp"
+                    android:layout_toRightOf="@id/camera_preview_surface"
+                    android:text="13"
+                    android:textColor="@color/black"
+                    android:textSize="24sp" />
+
+                <Button
+                    android:id="@+id/btn_flash_on"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_below="@id/tv_ip"
+                    android:layout_marginLeft="20dp"
+                    android:padding="10dp"
+                    android:layout_toRightOf="@id/edit_flash_mac"
+                    android:background="@drawable/shape_main_hos_txt_bg"
+                    android:textColor="@drawable/selector_bottom_btn_text_color"
+                    android:text="开启声光报警器"
+                    android:textSize="24sp" />
+
+                <Button
+                    android:id="@+id/btn_flash_off"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_below="@id/tv_ip"
+                    android:layout_marginLeft="20dp"
+                    android:padding="10dp"
+                    android:layout_toRightOf="@id/btn_flash_on"
+                    android:background="@drawable/shape_main_hos_txt_bg"
+                    android:textColor="@drawable/selector_bottom_btn_text_color"
+                    android:text="关闭声光报警器"
+                    android:textSize="24sp" />
+            </RelativeLayout>
 
             <TextView
-                android:id="@+id/tv_ip"
+                android:id="@+id/tv_camera"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:layout_marginLeft="10dp"
-                android:layout_toRightOf="@id/camera_preview_surface"
-                android:layout_below="@id/btn_reset"
+                android:layout_marginTop="10dp"
                 android:textSize="20sp"
-                android:text="IP:"/>
+                android:visibility="gone" />
 
-            <EditText
-                android:id="@+id/edit_flash_mac"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_below="@id/tv_ip"
-                android:layout_toRightOf="@id/camera_preview_surface"
-                android:layout_marginLeft="10dp"
-                android:textSize="24sp"
-                android:text="13"
-                android:textColor="@color/black"/>
-
-            <Button
-                android:id="@+id/btn_flash_on"
+            <TextView
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:layout_below="@id/tv_ip"
-                android:layout_toRightOf="@id/edit_flash_mac"
-                android:layout_marginLeft="20dp"
-                android:text="开启声光报警器"
-                android:textSize="28sp"/>
-
-            <Button
-                android:id="@+id/btn_flash_off"
+                android:layout_marginTop="10dp"
+                android:text="请按任意按键开始测试"
+                android:textColor="@color/red_color"
+                android:textSize="28sp" />
+
+            <TextView
+                android:id="@+id/tv_test_info"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:layout_below="@id/tv_ip"
-                android:layout_toRightOf="@id/btn_flash_on"
-                android:layout_marginLeft="20dp"
-                android:text="关闭声光报警器"
-                android:textSize="28sp"/>
-        </RelativeLayout>
+                android:layout_marginTop="10dp"
+                android:textSize="24sp" />
+        </LinearLayout>
 
-        <TextView
-            android:id="@+id/tv_camera"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="10dp"
-            android:textSize="20sp"
+        <View
+            android:id="@+id/color_view"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:background="@color/black"
+            android:visibility="gone" />
+
+        <com.wdkl.ncs.android.lib.widget.MarqueeTextView
+            android:id="@+id/tv_screen_test"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:background="@color/white"
+            android:gravity="center"
+            android:ellipsize="marquee"
+            android:focusable="true"
+            android:focusableInTouchMode="true"
+            android:marqueeRepeatLimit="-1"
+            android:singleLine="true"
+            android:text="屏幕老化测试中...屏幕老化测试中..."
+            android:textSize="160sp"
+            android:textStyle="bold"
+            android:textColor="@color/black"
             android:visibility="gone"/>
 
-        <TextView
+        <Button
+            android:id="@+id/btn_fist"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_marginTop="10dp"
+            android:layout_marginBottom="20dp"
+            android:layout_alignParentBottom="true"
+            android:layout_centerHorizontal="true"
+            android:background="@drawable/shape_main_hos_txt_bg"
+            android:padding="10dp"
+            android:text="退出测试"
+            android:textColor="@drawable/selector_bottom_btn_text_color"
             android:textSize="28sp"
-            android:text="请按任意按键开始测试"
-            android:textColor="@color/red_color"/>
-
-        <TextView
-            android:id="@+id/tv_test_info"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="10dp"
-            android:textSize="24sp"/>
-    </LinearLayout>
-
-    <Button
-        android:id="@+id/btn_fist"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:padding="10dp"
-        android:layout_alignParentBottom="true"
-        android:layout_centerHorizontal="true"
-        android:textColor="@color/white"
-        android:text="退出测试"
-        android:background="@drawable/shape_main_hos_txt_bg"
-        android:textSize="28sp"
-        android:visibility="gone"/>
+            android:visibility="gone" />
 
-
-
-
-
-
-
-
-</RelativeLayout>
+    </RelativeLayout>
 </layout>