|
@@ -12,6 +12,7 @@ import android.graphics.Bitmap;
|
|
import android.graphics.BitmapFactory;
|
|
import android.graphics.BitmapFactory;
|
|
import android.graphics.Color;
|
|
import android.graphics.Color;
|
|
import android.graphics.drawable.Drawable;
|
|
import android.graphics.drawable.Drawable;
|
|
|
|
+import android.graphics.drawable.GradientDrawable;
|
|
import android.net.ConnectivityManager;
|
|
import android.net.ConnectivityManager;
|
|
import android.net.NetworkInfo;
|
|
import android.net.NetworkInfo;
|
|
import android.net.wifi.WifiManager;
|
|
import android.net.wifi.WifiManager;
|
|
@@ -268,22 +269,32 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
|
|
|
|
/*主界面id*/
|
|
/*主界面id*/
|
|
//左侧护理项
|
|
//左侧护理项
|
|
|
|
+ @Bind(R.id.view_main_layout_left_one)
|
|
|
|
+ LinearLayout llViewLeftOne;
|
|
@Bind(R.id.view_main_layout_left_one_title)
|
|
@Bind(R.id.view_main_layout_left_one_title)
|
|
TextView tvLeftOneTitle;
|
|
TextView tvLeftOneTitle;
|
|
@Bind(R.id.view_main_layout_left_one_content)
|
|
@Bind(R.id.view_main_layout_left_one_content)
|
|
TextView tvLeftOneContent;
|
|
TextView tvLeftOneContent;
|
|
|
|
+ @Bind(R.id.view_main_layout_left_two)
|
|
|
|
+ LinearLayout llViewLeftTwo;
|
|
@Bind(R.id.view_main_layout_left_two_title)
|
|
@Bind(R.id.view_main_layout_left_two_title)
|
|
TextView tvLeftTwoTitle;
|
|
TextView tvLeftTwoTitle;
|
|
@Bind(R.id.view_main_layout_left_two_content)
|
|
@Bind(R.id.view_main_layout_left_two_content)
|
|
TextView tvLeftTwoContent;
|
|
TextView tvLeftTwoContent;
|
|
|
|
+ @Bind(R.id.view_main_layout_left_three)
|
|
|
|
+ LinearLayout llViewLeftThree;
|
|
@Bind(R.id.view_main_layout_left_three_title)
|
|
@Bind(R.id.view_main_layout_left_three_title)
|
|
TextView tvLeftThreeTitle;
|
|
TextView tvLeftThreeTitle;
|
|
@Bind(R.id.view_main_layout_left_three_content)
|
|
@Bind(R.id.view_main_layout_left_three_content)
|
|
TextView tvLeftThreeContent;
|
|
TextView tvLeftThreeContent;
|
|
|
|
+ @Bind(R.id.view_main_layout_left_four)
|
|
|
|
+ LinearLayout llViewLeftFour;
|
|
@Bind(R.id.view_main_layout_left_four_title)
|
|
@Bind(R.id.view_main_layout_left_four_title)
|
|
TextView tvLeftFourTitle;
|
|
TextView tvLeftFourTitle;
|
|
@Bind(R.id.view_main_layout_left_four_content)
|
|
@Bind(R.id.view_main_layout_left_four_content)
|
|
TextView tvLeftFourContent;
|
|
TextView tvLeftFourContent;
|
|
|
|
+ @Bind(R.id.view_main_layout_left_five)
|
|
|
|
+ LinearLayout llViewLeftFive;
|
|
@Bind(R.id.view_main_layout_left_five_title)
|
|
@Bind(R.id.view_main_layout_left_five_title)
|
|
TextView tvLeftFiveTitle;
|
|
TextView tvLeftFiveTitle;
|
|
@Bind(R.id.view_main_layout_left_five_content)
|
|
@Bind(R.id.view_main_layout_left_five_content)
|
|
@@ -1893,8 +1904,9 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
if (StringUtils.isInt(Constants.SYSVOICE)) {
|
|
if (StringUtils.isInt(Constants.SYSVOICE)) {
|
|
setSYSVoice(CallingBedActivity.this, StringUtils.parseInt(Constants.SYSVOICE));
|
|
setSYSVoice(CallingBedActivity.this, StringUtils.parseInt(Constants.SYSVOICE));
|
|
}
|
|
}
|
|
- if (StringUtils.isInt(Constants.NURSINGLIGHT) && null != mainDataEntity) {
|
|
|
|
- new Thread(new Runnable() {
|
|
|
|
|
|
+ if (/*StringUtils.isInt(Constants.NURSINGLIGHT) && */null != mainDataEntity) {
|
|
|
|
+ //7寸分机不带护理灯
|
|
|
|
+ /*new Thread(new Runnable() {
|
|
@Override
|
|
@Override
|
|
public void run() {
|
|
public void run() {
|
|
try {
|
|
try {
|
|
@@ -1906,13 +1918,42 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }).start();
|
|
|
|
|
|
+ }).start();*/
|
|
|
|
+ updateNursingBackground();
|
|
}
|
|
}
|
|
VoiceManagerUtil.setCallVoice(CallingBedActivity.this, Integer.parseInt(Constants.BEDCALLVOICE));
|
|
VoiceManagerUtil.setCallVoice(CallingBedActivity.this, Integer.parseInt(Constants.BEDCALLVOICE));
|
|
//刷新呼叫超时时间
|
|
//刷新呼叫超时时间
|
|
callTimeOut = (StringUtils.parseInt(Constants.CALLINGTIMEOUT) == 0 ? 180000 : StringUtils.parseInt(Constants.CALLINGTIMEOUT) * 1000);
|
|
callTimeOut = (StringUtils.parseInt(Constants.CALLINGTIMEOUT) == 0 ? 180000 : StringUtils.parseInt(Constants.CALLINGTIMEOUT) * 1000);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private void updateNursingBackground() {
|
|
|
|
+ //LogUtil.d("NURSELIGHT", "设置护理灯" + Constants.NURSINGLIGHT + "---" + mainDataEntity.getLeftOneColor() + "---" + mainDataEntity.getLeftTwoColor() + "---" + mainDataEntity.getLeftThreeColor() + "---" + mainDataEntity.getLeftFourColor() + "---" + mainDataEntity.getLeftFiveColor());
|
|
|
|
+ try {
|
|
|
|
+ int color = Color.parseColor("#" + mainDataEntity.getLeftOneColor());
|
|
|
|
+ GradientDrawable drawable1 = (GradientDrawable) llViewLeftOne.getBackground();
|
|
|
|
+ drawable1.setColor(color);
|
|
|
|
+
|
|
|
|
+ color = Color.parseColor("#" + mainDataEntity.getLeftTwoColor());
|
|
|
|
+ GradientDrawable drawable2 = (GradientDrawable) llViewLeftTwo.getBackground();
|
|
|
|
+ drawable2.setColor(color);
|
|
|
|
+
|
|
|
|
+ color = Color.parseColor("#" + mainDataEntity.getLeftThreeColor());
|
|
|
|
+ GradientDrawable drawable3 = (GradientDrawable) llViewLeftThree.getBackground();
|
|
|
|
+ drawable3.setColor(color);
|
|
|
|
+
|
|
|
|
+ color = Color.parseColor("#" + mainDataEntity.getLeftFourColor());
|
|
|
|
+ GradientDrawable drawable4 = (GradientDrawable) llViewLeftFour.getBackground();
|
|
|
|
+ drawable4.setColor(color);
|
|
|
|
+
|
|
|
|
+ color = Color.parseColor("#" + mainDataEntity.getLeftFiveColor());
|
|
|
|
+ GradientDrawable drawable5 = (GradientDrawable) llViewLeftFive.getBackground();
|
|
|
|
+ drawable5.setColor(color);
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
//---------------------------------------------设置硬件参数部分(下)-----------------------------------------------------------------
|
|
//---------------------------------------------设置硬件参数部分(下)-----------------------------------------------------------------
|
|
//---------------------------------------------串口点击事件部分(上)---------------------------------------------------------------------
|
|
//---------------------------------------------串口点击事件部分(上)---------------------------------------------------------------------
|
|
//主页面
|
|
//主页面
|
|
@@ -2217,7 +2258,8 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
* 灭掉护理灯
|
|
* 灭掉护理灯
|
|
*/
|
|
*/
|
|
public void dismissNurseBrightness() {
|
|
public void dismissNurseBrightness() {
|
|
- new Thread(new Runnable() {
|
|
|
|
|
|
+ //7寸分机不带护理灯
|
|
|
|
+ /*new Thread(new Runnable() {
|
|
@Override
|
|
@Override
|
|
public void run() {
|
|
public void run() {
|
|
try {
|
|
try {
|
|
@@ -2226,7 +2268,7 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }).start();
|
|
|
|
|
|
+ }).start();*/
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|