浏览代码

<7寸分机基本功能及界面修改上传>

weizhengliang 5 年之前
父节点
当前提交
adceb2cf22
共有 31 个文件被更改,包括 501 次插入758 次删除
  1. 1 1
      app/build.gradle
  2. 9 5
      app/src/main/java/com/wdkl/callingbed2/adapter/CostAdapter.java
  3. 292 266
      app/src/main/java/com/wdkl/callingbed2/ui/CallingBedActivity.java
  4. 1 0
      app/src/main/java/com/wdkl/callingbed2/ui/InitActivity.java
  5. 5 1
      app/src/main/java/com/wdkl/callingbed2/util/StringUtils.java
  6. 0 5
      app/src/main/res/drawable/selector_cost.xml
  7. 5 0
      app/src/main/res/drawable/selector_main.xml
  8. 0 5
      app/src/main/res/drawable/selector_support.xml
  9. 86 37
      app/src/main/res/layout/activity_calling_bed_layout.xml
  10. 21 20
      app/src/main/res/layout/item_cost_layout.xml
  11. 5 5
      app/src/main/res/layout/view_cost_layout.xml
  12. 5 5
      app/src/main/res/layout/view_doctor_layout.xml
  13. 1 1
      app/src/main/res/layout/view_main_layout.xml
  14. 56 401
      app/src/main/res/layout/view_main_layout2.xml
  15. 4 4
      app/src/main/res/layout/view_title_layout.xml
  16. 二进制
      app/src/main/res/mipmap-mdpi/icon_care_normal.png
  17. 二进制
      app/src/main/res/mipmap-mdpi/icon_care_press.png
  18. 二进制
      app/src/main/res/mipmap-mdpi/icon_cost_normal.png
  19. 二进制
      app/src/main/res/mipmap-mdpi/icon_cost_press.png
  20. 二进制
      app/src/main/res/mipmap-mdpi/icon_main_normal.png
  21. 二进制
      app/src/main/res/mipmap-mdpi/icon_main_press.png
  22. 二进制
      app/src/main/res/mipmap-mdpi/icon_medical_advice_normal.png
  23. 二进制
      app/src/main/res/mipmap-mdpi/icon_medical_advice_press.png
  24. 二进制
      app/src/main/res/mipmap-mdpi/icon_settings_normal.png
  25. 二进制
      app/src/main/res/mipmap-mdpi/icon_settings_press.png
  26. 二进制
      app/src/main/res/mipmap-mdpi/icon_support_normal.png
  27. 二进制
      app/src/main/res/mipmap-mdpi/icon_support_press.png
  28. 二进制
      app/src/main/res/mipmap-mdpi/message.png
  29. 4 0
      app/src/main/res/values/colors.xml
  30. 1 0
      app/src/main/res/values/dimens.xml
  31. 5 2
      bedlib/src/main/java/serialporttest/utils/SerialPortUtil.java

+ 1 - 1
app/build.gradle

@@ -25,7 +25,7 @@ android {
         minSdkVersion 15
         targetSdkVersion 26
         versionCode 1
-        versionName "1.24"
+        versionName "1.0"
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
 
         buildConfigField "String", "BUILD_TIME", getDate()

+ 9 - 5
app/src/main/java/com/wdkl/callingbed2/adapter/CostAdapter.java

@@ -1,9 +1,11 @@
 package com.wdkl.callingbed2.adapter;
 
 import android.support.v7.widget.RecyclerView;
+import android.view.Gravity;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
+import android.widget.LinearLayout;
 import android.widget.RelativeLayout;
 import android.widget.TextView;
 
@@ -46,12 +48,12 @@ public class CostAdapter extends RecyclerView.Adapter<CostAdapter.ViewHolder> {
                 viewHolder.tvCostContent.setText("费用名称");
                 viewHolder.tvCostCost.setText("金额");
 
-                viewHolder.rlTitle.setBackgroundResource(R.color.cost_list_title);
+                viewHolder.llTitle.setBackgroundResource(R.color.cost_list_title);
             }else{
                 if((position-1)%2==0){
-                    viewHolder.rlTitle.setBackgroundResource(R.color.cost_item);
+                    viewHolder.llTitle.setBackgroundResource(R.color.cost_item);
                 }else{
-                    viewHolder.rlTitle.setBackgroundResource(R.color.cost_item);
+                    viewHolder.llTitle.setBackgroundResource(R.color.cost_item);
                 }
                 viewHolder.tvCostDate.setText(list.get(position-1).getDate());
                 viewHolder.tvCostContent.setText(list.get(position-1).getCostName());
@@ -71,14 +73,16 @@ public class CostAdapter extends RecyclerView.Adapter<CostAdapter.ViewHolder> {
         public TextView tvCostDate;
         public TextView tvCostContent;
         public TextView tvCostCost;
-        public RelativeLayout rlTitle;
+        //public RelativeLayout rlTitle;
+        public LinearLayout llTitle;
 
         public ViewHolder(View view) {
             super(view);
             tvCostDate = view.findViewById(R.id.item_cost_layout_tv_date);
             tvCostContent = view.findViewById(R.id.item_cost_layout_tv_content);
             tvCostCost = view.findViewById(R.id.item_cost_layout_tv_cost);
-            rlTitle = view.findViewById(R.id.item_cost_layout_rl_title);
+            //rlTitle = view.findViewById(R.id.item_cost_layout_rl_title);
+            llTitle = view.findViewById(R.id.item_cost_layout_ll_title);
         }
     }
 }

+ 292 - 266
app/src/main/java/com/wdkl/callingbed2/ui/CallingBedActivity.java

@@ -25,6 +25,7 @@ import android.support.design.widget.Snackbar;
 import android.support.v4.content.ContextCompat;
 import android.support.v7.widget.RecyclerView;
 import android.view.Gravity;
+import android.view.MotionEvent;
 import android.view.View;
 import android.view.animation.Animation;
 import android.view.animation.AnimationUtils;
@@ -127,7 +128,7 @@ import static com.wdkl.callingbed2.util.sendcommand.CallingBedSendCommand.setWSH
  */
 
 public class CallingBedActivity extends BaseActivity implements ISerialPortBedOnclickEvent, IMediaPlayerVolume, IVvsipServiceListener
-        , SipCallBackI, MediaPlayerManger.PlayMusicCompleteListener {
+        , SipCallBackI, MediaPlayerManger.PlayMusicCompleteListener, View.OnClickListener {
 
     //初始化数据实体
     private InitDataEntity initDataEntity;
@@ -184,9 +185,17 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
 
     @Bind(R.id.activity_calling_bed_layout_rl_main)
     RelativeLayout rlMain;
-    @Bind(R.id.activity_calling_bed_layout_rl_right)
+    //右侧侧滑栏layout
+    @Bind(R.id.bed_layout_ll_right_view)
     LinearLayout llRight;
 
+    @Bind(R.id.activity_calling_bed_layout_ll_right)
+    LinearLayout llRightMain;
+    @Bind(R.id.rl_view_doctor_layout)
+    RelativeLayout rlViewDoctor;
+    @Bind(R.id.rl_view_cost_layout)
+    RelativeLayout rlViewCost;
+
     //状态栏
     @Bind(R.id.activity_calling_bed_layout_title)
     View vTitle;
@@ -210,13 +219,13 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
     @Bind(R.id.activity_calling_bed_layout_main)
     View vMain;
     @Bind(R.id.activity_calling_bed_layout_doctor)
-    RelativeLayout vDoctor;
+    RelativeLayout vDoctor;  //医嘱
     @Bind(R.id.activity_calling_bed_layout_cost)
-    View vCost;
-    @Bind(R.id.activity_calling_bed_layout_qr_code)
-    View vQrCode;
+    View vCost;  //费用
+    //@Bind(R.id.activity_calling_bed_layout_qr_code)
+    //View vQrCode;  //二维码
     @Bind(R.id.activity_calling_bed_layout_support)
-    View vSupport;
+    View vSupport;  //请求增援
     @Bind(R.id.activity_calling_bed_layout_call)
     View vCall;
     @Bind(R.id.activity_calling_bed_layout_nurse)
@@ -228,27 +237,37 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
 
     @Bind(R.id.view_qr_code_layout_qr_code)
     ImageView qrBarcodeImg;
-    //侧滑栏的text
-    @Bind(R.id.activity_calling_bed_layout_tv_doctor_text)
-    TextView tvDoctor;
-
-    @Bind(R.id.activity_calling_bed_layout_tv_version)
-    TextView tvVersion;
 
-    @Bind(R.id.activity_calling_bed_layout_tv_cost_text)
+    //侧滑栏view
+    @Bind(R.id.right_ll_main_item)
+    LinearLayout llMainItem;
+    @Bind(R.id.right_tv_main_text)
+    TextView tvMain;
+    @Bind(R.id.right_ll_advice_item)
+    LinearLayout llAdviceItem;
+    @Bind(R.id.right_tv_medical_advice_text)
+    TextView tvAdvice;
+    @Bind(R.id.right_ll_cost_item)
+    LinearLayout llCostItem;
+    @Bind(R.id.right_tv_cost_text)
     TextView tvCost;
-    @Bind(R.id.activity_calling_bed_layout_tv_qr_code_text)
-    TextView tvQrCode;
-    @Bind(R.id.activity_calling_bed_layout_tv_support_text)
+    @Bind(R.id.right_ll_call_care_item)
+    LinearLayout llCallCareItem;
+    @Bind(R.id.right_tv_call_care_text)
+    TextView tvCallCare;
+    @Bind(R.id.right_ll_support_item)
+    LinearLayout llSupportItem;
+    @Bind(R.id.right_tv_support_text)
     TextView tvSupport;
-    @Bind(R.id.activity_calling_bed_layout_tv_call_text)
-    TextView tvCall;
-    @Bind(R.id.view_main_layout_tv_broadcasting)
-    MarqueeText tvBroadcasting;
+    @Bind(R.id.right_ll_settings_item)
+    LinearLayout llSettingsItem;
+    @Bind(R.id.right_tv_settings_text)
+    TextView tvSettings;
+
 
 
     /*主界面id*/
-    //侧滑栏
+    //左侧护理项
     @Bind(R.id.view_main_layout_left_one_title)
     TextView tvLeftOneTitle;
     @Bind(R.id.view_main_layout_left_one_content)
@@ -270,31 +289,24 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
     @Bind(R.id.view_main_layout_left_five_content)
     TextView tvLeftFiveContent;
 
-    @Bind(R.id.view_main_layout_tv_bed_num)
+    //中间床位信息
+    @Bind(R.id.view_main_layout_tv_bed_number)
     TextView tvBedNum;
-    @Bind(R.id.view_main_layout_tv_name)
-    TextView tvName;
-    @Bind(R.id.view_main_layout_tv_detail)
-    TextView tvDetail;
-    @Bind(R.id.view_main_layout_tv_illness)
-    TextView tvIllness;
-    @Bind(R.id.view_main_layout_tv_admission)
-    TextView tvAdmission;
-    @Bind(R.id.view_main_layout_tv_doctor_name)
+    @Bind(R.id.view_main_layout_iv_bed_qr_code)
+    ImageView ivTwoDimensionalCode;
+    @Bind(R.id.view_main_layout_tv_duty_doctor)
     TextView tvDoctorName;
-    @Bind(R.id.view_main_layout_tv_nurse_name)
+    @Bind(R.id.view_main_layout_tv_duty_nurse)
     TextView tvNurseName;
-    @Bind(R.id.view_main_layout_tv_hosp_number)
-    TextView tvHospNumber;
-    @Bind(R.id.view_main_layout_tv_hosp_data)
-    TextView tvHospData;
-    @Bind(R.id.view_main_layout_iv_doctor)
-    ImageView ivDoctor;
-    @Bind(R.id.view_main_layout_iv_nurse)
-    ImageView ivNurse;
-
-    @Bind(R.id.view_main_layout_img_two_dimensional_code)
-    ImageView ivTwoDimensionalCode;
+
+    //右侧患者信息
+    @Bind(R.id.view_main_layout_tv_patient_name)
+    TextView tvName;
+    @Bind(R.id.view_main_layout_tv_age_gender)
+    TextView tvAgeGender;
+    @Bind(R.id.activity_calling_bed_layout_tv_illness)
+    TextView tvIllness;
+
 
     //医嘱界面
     @Bind(R.id.view_doctor_tv_name)
@@ -338,39 +350,8 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
     @Bind(R.id.view_nurse_layout_tv_call_timeout)
     TextView tvNurseTimeOut;
 
-    //侧滑栏(增长页面)
-    @Bind(R.id.view_main_layout_left_one_title_big)
-    TextView tvLeftOneTitle_big;
-    @Bind(R.id.view_main_layout_left_one_content_big)
-    MarqueeText tvLeftOneContent_big;
-    @Bind(R.id.view_main_layout_left_two_title_big)
-    TextView tvLeftTwoTitle_big;
-    @Bind(R.id.view_main_layout_left_two_content_big)
-    MarqueeText tvLeftTwoContent_big;
-    @Bind(R.id.view_main_layout_left_three_title_big)
-    TextView tvLeftThreeTitle_big;
-    @Bind(R.id.view_main_layout_left_three_content_big)
-    MarqueeText tvLeftThreeContent_big;
-    @Bind(R.id.view_main_layout_left_four_title_big)
-    TextView tvLeftFourTitle_big;
-    @Bind(R.id.view_main_layout_left_four_content_big)
-    MarqueeText tvLeftFourContent_big;
-    @Bind(R.id.view_main_layout_left_five_title_big)
-    TextView tvLeftFiveTitle_big;
-    @Bind(R.id.view_main_layout_left_five_content_big)
-    MarqueeText tvLeftFiveContent_big;
-    @Bind(R.id.view_main_layout_tv_illness_big)
-    TextView tvIllness_big;
-    @Bind(R.id.view_main_layout_tv_detail_big)
-    TextView tvDetail_big;
-    @Bind(R.id.view_main_layout_tv_bed_num_big)
-    MarqueeText tvBedNum_big;
-    @Bind(R.id.view_main_layout_tv_name_big)
-    MarqueeText tvName_big;
-
-    private RelativeLayout rlBottomMessage;
     private ImageView ivWelcome;
-    private MyTextView tvNoticeContent;
+    private MyTextView tvMessage;
     // 语音播报
     private TextToSpeech textToSpeech;
     //开启的线程
@@ -400,6 +381,12 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
      */
     private long callTimeOut = (StringUtils.parseInt(Constants.CALLINGTIMEOUT) == 0 ? 180000 : StringUtils.parseInt(Constants.CALLINGTIMEOUT) * 1000);//默认30秒
 
+    //触摸移动坐标
+    float downX;
+    float downY;
+    float moveX;
+    float moveY;
+    long currentMS;
 
     /**
      * 时间线程
@@ -546,14 +533,30 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
     protected void onCreate(@Nullable Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         //初始化view
-        allViews = new ArrayList<>(Arrays.asList(vMain, vDoctor, vCost, vQrCode, vSupport, vCall, vNurse));
+        allViews = new ArrayList<>(Arrays.asList(vMain, vDoctor, vCost, vSupport, vCall, vNurse));
         initReceive();
+        setListeners();
 
         //20190415 waderson  测试
         ScreenManagerUtil.setScreenBrightness(context, 210);
 
     }
 
+    private void setListeners() {
+        llMainItem.setOnClickListener(this);
+
+        llMainItem.setOnClickListener(this);
+        llAdviceItem.setOnClickListener(this);
+        llCostItem.setOnClickListener(this);
+        llCallCareItem.setOnClickListener(this);
+        llSupportItem.setOnClickListener(this);
+        llSettingsItem.setOnClickListener(this);
+
+        llRightMain.setOnClickListener(this);
+        rlViewDoctor.setOnClickListener(this);
+        rlViewCost.setOnClickListener(this);
+    }
+
     @Override
     public int getLayoutId() {
         //SIP准备工作
@@ -565,9 +568,8 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
     protected void initView() {
         //更新include 的ui  bind 不到
         /*******************************************************/
-        rlBottomMessage = vMain.findViewById(R.id.view_main_layout_rl_message);
         ivWelcome = vWelcome.findViewById(R.id.view_welcome_iv_main);
-        tvNoticeContent = vMain.findViewById(R.id.view_main_layout_tv_msg);
+        tvMessage = vMain.findViewById(R.id.activity_calling_bed_layout_tv_message);
         /*******************************************************/
 
         timeThread = new TimeThread();
@@ -613,10 +615,80 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
         costArrayList = new ArrayList<>();
         costAdapter = new CostAdapter(costArrayList);
         rvCost.setLayoutManager(new FullyLinearLayoutManager(this));
+        rvCost.setOnTouchListener(new View.OnTouchListener() {
+            @Override
+            public boolean onTouch(View v, MotionEvent event) {
+                //重置回到主界面倒计时
+                timeOfBackMainPage = 0;
+                timeOut = callTimeOutBack;
+                switch (event.getAction()) {
+                    case MotionEvent.ACTION_DOWN:
+                        //float DownX
+                        downX = event.getX();
+                        //float DownY
+                        downY = event.getY();
+                        moveX = 0;
+                        moveY = 0;
+                        //long currentMS     获取系统时间
+                        currentMS = System.currentTimeMillis();
+                        break;
+                    case MotionEvent.ACTION_MOVE:
+                        moveX += Math.abs(event.getX() - downX);//X轴距离
+                        moveY += Math.abs(event.getY() - downY);//y轴距离
+                        downX = event.getX();
+                        downY = event.getY();
+                        break;
+                    case MotionEvent.ACTION_UP:
+                        long moveTime = System.currentTimeMillis() - currentMS;//移动时间
+                        //判断点击还是滑动
+                        if (moveTime < 100 || (moveX < 30 && moveY < 30)) {
+                            rlViewCost.performClick();
+                            return true; //不再执行后面的事件
+                        }
+                        break;
+                }
+                return false;
+            }
+        });
 
         doctorChargeArrayList = new ArrayList<>();
         doctorAdapter = new DoctorAdapter(doctorChargeArrayList);
         rvDoctor.setLayoutManager(new FullyLinearLayoutManager(this));
+        rvDoctor.setOnTouchListener(new View.OnTouchListener() {
+            @Override
+            public boolean onTouch(View v, MotionEvent event) {
+                //重置回到主界面倒计时
+                timeOfBackMainPage = 0;
+                timeOut = callTimeOutBack;
+                switch (event.getAction()) {
+                    case MotionEvent.ACTION_DOWN:
+                        //float DownX
+                        downX = event.getX();
+                        //float DownY
+                        downY = event.getY();
+                        moveX = 0;
+                        moveY = 0;
+                        //long currentMS     获取系统时间
+                        currentMS = System.currentTimeMillis();
+                        break;
+                    case MotionEvent.ACTION_MOVE:
+                        moveX += Math.abs(event.getX() - downX);//X轴距离
+                        moveY += Math.abs(event.getY() - downY);//y轴距离
+                        downX = event.getX();
+                        downY = event.getY();
+                        break;
+                    case MotionEvent.ACTION_UP:
+                        long moveTime = System.currentTimeMillis() - currentMS;//移动时间
+                        //判断点击还是滑动
+                        if (moveTime < 100 || (moveX < 30 && moveY < 30)) {
+                            rlViewDoctor.performClick();
+                            return true; //不再执行后面的事件
+                        }
+                        break;
+                }
+                return false;
+            }
+        });
 
         noticeArrayList = new ArrayList<>();
 
@@ -1046,11 +1118,6 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
             //显示未托管图标
             ivTrust.setImageResource(R.mipmap.ic_calling_sickbed_bed_wrong_trusteeship);
         }
-        try {
-            tvVersion.setText("V" + this.getPackageManager().getPackageInfo(this.getPackageName(), 0).versionName);
-        } catch (PackageManager.NameNotFoundException e) {
-            e.printStackTrace();
-        }
     }
 
     /**
@@ -1072,9 +1139,7 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
             vWelcome.setVisibility(View.GONE);
             vMain.setVisibility(View.VISIBLE);
 
-            // Bitmap logoBitmap = BitmapFactory.decodeResource(getResources(), R.mipmap.erlogo);
-            //ivTwoDimensionalCode.setImageBitmap(TwoDimensionCodeUtil.CreatePicture(Constants.TWO_DIMENSION_CODE_PATH + SerialPortUtil.KEY_ID, 200, 200, logoBitmap, true));
-
+            //左侧护理项
             tvLeftOneTitle.setText(mainDataEntity.getLeftOneTitle());
             tvLeftOneContent.setText(mainDataEntity.getLeftOneContent());
 
@@ -1089,92 +1154,40 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
 
             tvLeftFiveTitle.setText(mainDataEntity.getLeftFiveTitle());
             tvLeftFiveContent.setText(mainDataEntity.getLeftFiveContent());
-            //增长页面  祁阳人民医院提的(201901017 Waderson)
-            tvLeftOneTitle_big.setText(mainDataEntity.getLeftOneTitle());
-            tvLeftOneContent_big.setText(mainDataEntity.getLeftOneContent());
-
-            tvLeftTwoTitle_big.setText(mainDataEntity.getLeftTwoTitle());
-            tvLeftTwoContent_big.setText(mainDataEntity.getLeftTwoContent());
 
-            tvLeftThreeTitle_big.setText(mainDataEntity.getLeftThreeTitle());
-            tvLeftThreeContent_big.setText(mainDataEntity.getLeftThreeContent());
+            //床位号
+            if (null != initDataEntity) {
+                tvBedNum.setText(initDataEntity.getDeviceBedNum());
+            }
 
-            tvLeftFourTitle_big.setText(mainDataEntity.getLeftFourTitle());
-            tvLeftFourContent_big.setText(mainDataEntity.getLeftFourContent());
+            //二维码
+            Bitmap logoBitmap = BitmapFactory.decodeResource(getResources(), R.mipmap.erlogo);
+            ivTwoDimensionalCode.setImageBitmap(TwoDimensionCodeUtil.CreatePicture(Constants.TWO_DIMENSION_CODE_PATH + SerialPortUtil.KEY_ID, 200, 200, logoBitmap, true));
 
-            tvLeftFiveTitle_big.setText(mainDataEntity.getLeftFiveTitle());
-            tvLeftFiveContent_big.setText(mainDataEntity.getLeftFiveContent());
+            //值班医生和护士
+            tvDoctorName.setText("值班医生: " + mainDataEntity.getResponsDoctor());
+            tvNurseName.setText("值班护士: " + mainDataEntity.getResponsNurse());
 
+            //患者姓名
             String name = mainDataEntity.getName();
             if (StringUtils.notEmpty(name)) {
                 if (name.length() >= 4) {
                     tvName.setTextSize(69);
                     tvName.setText(name);
-                    tvName_big.setTextSize(60);//50
-                    tvName_big.setText(name);
                 } else {
                     tvName.setTextSize(95);
                     tvName.setText(name);
-                    tvName_big.setTextSize(65);//55
-                    tvName_big.setText(name);
                 }
             } else {
-                tvName.setText("");
-                tvName_big.setText("");
+                tvName.setText("---");
             }
 
-            tvDetail.setText("[ " + mainDataEntity.getSex() + " ]");//"【"+mainDataEntity.getSex()+"】"
-            tvDetail_big.setText("[ " + mainDataEntity.getSex() + " ]");//"【"+mainDataEntity.getSex()+"】"
-
-            tvIllness.setText(mainDataEntity.getAgeNum() + "" + mainDataEntity.getAgeUnit());
-            tvIllness_big.setText(mainDataEntity.getAgeNum() + "" + mainDataEntity.getAgeUnit());
-
-            tvHospNumber.setText("入院:" + mainDataEntity.getInpatientNum());
+            //患者性别和年龄
+            String ageGender = "【" + mainDataEntity.getSex() + "  " + mainDataEntity.getAgeNum() + mainDataEntity.getAgeUnit() + "】";
+            tvAgeGender.setText(ageGender);
 
-            tvHospData.setText(mainDataEntity.getAdmissionTime());
-
-            tvDoctorName.setText(mainDataEntity.getResponsDoctor());
-
-            tvNurseName.setText(mainDataEntity.getResponsNurse());
-
-            if (null != initDataEntity) {
-                tvBedNum.setText(initDataEntity.getDeviceBedNum());
-                tvBedNum_big.setText(initDataEntity.getDeviceBedNum());
-            }
-
-            Picasso.with(context).load(Constants.URL + Constants.URL_END + "/" + mainDataEntity.getResponsDoctorPic()).transform(new Transformation() {
-                @Override
-                public Bitmap transform(Bitmap source) {
-                    Bitmap bitmap = BitmapUtils.zoom(source, DensityUtils.dp2px(context, 62), DensityUtils.dp2px(context, 62));
-                    //圆形处理
-                    bitmap = BitmapUtils.circleBitmap(bitmap);
-                    //回收bitmap资源
-                    source.recycle();
-                    return bitmap;
-                }
-
-                @Override
-                public String key() {
-                    return "";//需要保证返回值不能为null。否则报错
-                }
-            }).fit().memoryPolicy(MemoryPolicy.NO_CACHE).networkPolicy(NetworkPolicy.NO_CACHE).into(ivDoctor);
-
-            Picasso.with(context).load(Constants.URL + Constants.URL_END + "/" + mainDataEntity.getResponsNursePic()).transform(new Transformation() {
-                @Override
-                public Bitmap transform(Bitmap source) {
-                    Bitmap bitmap = BitmapUtils.zoom(source, DensityUtils.dp2px(context, 62), DensityUtils.dp2px(context, 62));
-                    //圆形处理
-                    bitmap = BitmapUtils.circleBitmap(bitmap);
-                    //回收bitmap资源
-                    source.recycle();
-                    return bitmap;
-                }
-
-                @Override
-                public String key() {
-                    return "";//需要保证返回值不能为null。否则报错
-                }
-            }).fit().memoryPolicy(MemoryPolicy.NO_CACHE).networkPolicy(NetworkPolicy.NO_CACHE).into(ivNurse);
+            //病情
+            tvIllness.setText(mainDataEntity.getIllness());
 
             setTitle();
         }
@@ -1189,7 +1202,7 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
             for (int i = 0; i < noticeArrayList.size(); i++) {
                 strNotice += "      【" + (i + 1) + "】 " + noticeArrayList.get(i).getNoticeContent() + "  " + noticeArrayList.get(i).getNoticeEndTime();
             }
-            tvNoticeContent.setText(strNotice);
+            tvMessage.setText(strNotice);
         }
     }
 
@@ -1280,8 +1293,8 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
             public void run() {
                 //=====================停止廣播==================//
                 MediaPlayerManger.getInstance().stopMediaPlayer();
-                tvBroadcasting.setText("");
-                tvBroadcasting.setVisibility(View.INVISIBLE);
+                //tvBroadcasting.setText("");
+                //tvBroadcasting.setVisibility(View.INVISIBLE);
                 isCloseBroadcast = true;
             }
         });
@@ -1339,7 +1352,10 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
                 }
             }
         }
-        if (null != vWelcome) {
+
+
+        //7寸分机注释掉下面代码
+        /*if (null != vWelcome) {
             //只有在欢迎界面没有显示的时候串口才能用
             if (vWelcome.getVisibility() == View.GONE) {
                 //医嘱键短按松开
@@ -1489,9 +1505,9 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
                                 //呼叫超时倒计时开启
                                 callTypeCallNurse = "2";
                                 localMillsCallNurse = System.currentTimeMillis();
-                            } /*else {
+                            } *//*else {
                                 handsMICStatus = setHandsMIC(serialPortUtil, false);
-                            }*/
+                            }*//*
                         }
                     });
                 }
@@ -1512,7 +1528,7 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
 
 
             }
-        }
+        }*/
     }
 
     //---------------------------------------------串口点击事件监听----------------------------------------------------------
@@ -1713,8 +1729,8 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
                                         MediaPlayerManger.getInstance().setVolume(0);
                                     }
                                 }
-                                tvBroadcasting.setVisibility(View.VISIBLE);
-                                tvBroadcasting.setText("======广播中======");
+                                //tvBroadcasting.setVisibility(View.VISIBLE);
+                                //tvBroadcasting.setText("======广播中======");
                             } catch (Exception e) {
                                 e.printStackTrace();
                             }
@@ -1723,8 +1739,8 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
                     case "broadcast_2":
                         try {
                             MediaPlayerManger.getInstance().stopMediaPlayer();
-                            tvBroadcasting.setText("");
-                            tvBroadcasting.setVisibility(View.INVISIBLE);
+                            //tvBroadcasting.setText("");
+                            //tvBroadcasting.setVisibility(View.INVISIBLE);
                         } catch (Exception e) {
                             e.printStackTrace();
                         }
@@ -1893,64 +1909,56 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
 
     //---------------------------------------------设置硬件参数部分(下)-----------------------------------------------------------------
     //---------------------------------------------串口点击事件部分(上)---------------------------------------------------------------------
+    //主页面
+    public void clickVMain() {
+        vMain_big.setVisibility(View.GONE);//显示增长页面20191017
+        timeOfBackMainPage = 0;
+        timeOut = callTimeOutBack;
+        if (isVisible(vMain)) {
+            goneLlRightView(true);
+        } else {
+            showThisView(vMain);
+            //changeTextColor(tvMain);
+            goneLlRightView(true);
+            if (null != initDataEntity) {
+                getMainData(1);
+            }
+        }
+    }
+
+    //医嘱页面
     public void clickVDoctor() {
         vMain_big.setVisibility(View.GONE);//显示增长页面20191017
         timeOfBackMainPage = 0;
         timeOut = callTimeOutBack;
         if (isVisible(vDoctor)) {
-            showThisView(vMain);
             goneLlRightView(true);
         } else {
-            if (isVisible(vMain)) {
-                if (isVisible(llRight)) {
-                    showThisView(vDoctor);
-                    changeTextColor(tvDoctor);
-                    goneLlRightView(true);
-                    getDoctorData();
-                } else {
-                    showLlRightView();
-                }
-            } else {
-                if (!isVisible(vSupport) && !isVisible(vCall) && !isVisible(vNurse)) {//排除呼叫状态
-                    showThisView(vDoctor);
-                    getDoctorData();
-                } else {
-                    showToast("请先取消呼叫!");
-                }
-            }
+            showThisView(vDoctor);
+            //changeTextColor(tvAdvice);
+            goneLlRightView(true);
+            getDoctorData();
         }
     }
 
+    //费用页面
     public void clickVCost() {
         vMain_big.setVisibility(View.GONE);//显示增长页面20191017
         timeOfBackMainPage = 0;
         timeOut = callTimeOutBack;
         if (isVisible(vCost)) {
-            showThisView(vMain);
             goneLlRightView(true);
         } else {
-            if (isVisible(vMain)) {
-                if (isVisible(llRight)) {
-                    showThisView(vCost);
-                    changeTextColor(tvCost);
-                    goneLlRightView(true);
-                    getCostData();
-                } else {
-                    showLlRightView();
-                }
-            } else {
-                if (!isVisible(vSupport) && !isVisible(vCall) && !isVisible(vNurse)) {//排除呼叫状态
-                    showThisView(vCost);
-                    getCostData();
-                } else {
-                    showToast("请先取消呼叫!");
-                }
-            }
+            showThisView(vCost);
+            //changeTextColor(tvCost);
+            goneLlRightView(true);
+            getCostData();
         }
     }
 
+    //二维码页面
     public void clickVQrCode() {
-        vMain_big.setVisibility(View.GONE);//显示增长页面20191017
+        /*vMain_big.setVisibility(View.GONE);//显示增长页面20191017
         timeOfBackMainPage = 0;
         timeOut = callTimeOutBack;
         if (isVisible(vQrCode)) {
@@ -1974,81 +1982,63 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
                     showToast("请先取消呼叫!");
                 }
             }
-        }
+        }*/
     }
 
+    //请求增援页面
     public void clickVSupport() {
         vMain_big.setVisibility(View.GONE);//显示增长页面20191017
         timeOfBackMainPage = 0;
         timeOut = callTimeOutBack;
-        if (isVisible(vSupport)) {
-            CALL_STATUS = STANDBY;
-            showThisView(vMain);
+        if (isVisible(vMain) && isVisible(llRight)) {
+            showThisView(vSupport);
+            //changeTextColor(tvSupport);
             goneLlRightView(true);
+            setDoorLight(serialPortUtil, "200");//门灯红色闪烁  add by waderson 20191119 后来加的门灯控制
+            UdpSendUtil.sendCall4(initDataEntity, mainDataEntity);
+            CALL_STATUS = Constants.SUPPORT_IN_CALL;
+            if (null != initDataEntity) {
+                jbVSupport = setJumpingBeans(tvSupportText, initDataEntity.getDeviceBedNum() + "床正在请求增援...");
+            }
         } else {
-            if (isVisible(vMain)) {
-                if (isVisible(llRight)) {
-                    showThisView(vSupport);
-                    changeTextColor(tvSupport);
-                    goneLlRightView(true);
-                    setDoorLight(serialPortUtil, "200");//门灯红色闪烁  add by waderson 20191119 后来加的门灯控制
-                    UdpSendUtil.sendCall4(initDataEntity, mainDataEntity);
-                    CALL_STATUS = Constants.SUPPORT_IN_CALL;
-                    if (null != initDataEntity) {
-                        jbVSupport = setJumpingBeans(tvSupportText, initDataEntity.getDeviceBedNum() + "床正在请求增援...");
-                    }
-                } else {
-                    showLlRightView();
+            if (!isVisible(vCall) && !isVisible(vNurse)) {//排除呼叫状态
+                showThisView(vSupport);
+                setDoorLight(serialPortUtil, "200");//门灯红色闪烁  add by waderson 20191119 后来加的门灯控制
+                UdpSendUtil.sendCall4(initDataEntity, mainDataEntity);
+                CALL_STATUS = Constants.SUPPORT_IN_CALL;
+                if (null != initDataEntity) {
+                    jbVSupport = setJumpingBeans(tvSupportText, initDataEntity.getDeviceBedNum() + "床正在请求增援...");
                 }
             } else {
-                if (!isVisible(vCall) && !isVisible(vNurse)) {//排除呼叫状态
-                    showThisView(vSupport);
-                    setDoorLight(serialPortUtil, "200");//门灯红色闪烁  add by waderson 20191119 后来加的门灯控制
-                    UdpSendUtil.sendCall4(initDataEntity, mainDataEntity);
-                    CALL_STATUS = Constants.SUPPORT_IN_CALL;
-                    if (null != initDataEntity) {
-                        jbVSupport = setJumpingBeans(tvSupportText, initDataEntity.getDeviceBedNum() + "床正在请求增援...");
-                    }
-                } else {
-                    showToast("请先取消呼叫!");
-                }
+                showToast("请先取消呼叫!");
             }
         }
     }
 
+    //呼叫护工页面
     public void clickVCall() {
         vMain_big.setVisibility(View.GONE);//显示增长页面20191017
         timeOfBackMainPage = 0;
         timeOut = callTimeOutBack;
-        if (isVisible(vCall)) {
-            CALL_STATUS = STANDBY;
-            showThisView(vMain);
+        if (isVisible(vMain) && isVisible(llRight)) {
+            showThisView(vCall);
+            //changeTextColor(tvCallCare);
             goneLlRightView(true);
+            //sendProtectHelp();//呼叫护工还没有做;这个先预留
+            CALL_STATUS = Constants.WORK_IN_CALL;
+            if (null != initDataEntity) {
+                jbVCall = setJumpingBeans(tvCallText, initDataEntity.getDeviceBedNum() + "床正在呼叫护工...");
+            }
         } else {
-            if (isVisible(vMain)) {
-                if (isVisible(llRight)) {
-                    showThisView(vCall);
-                    changeTextColor(tvCall);
-                    goneLlRightView(true);
-                    //sendProtectHelp();//呼叫护工还没有做;这个先预留
-                    CALL_STATUS = Constants.WORK_IN_CALL;
-                    if (null != initDataEntity) {
-                        jbVCall = setJumpingBeans(tvCallText, initDataEntity.getDeviceBedNum() + "床正在呼叫护工...");
-                    }
-                } else {
-                    showLlRightView();
+            if (!isVisible(vSupport) && !isVisible(vNurse)) {//排除呼叫状态
+                showThisView(vCall);
+                //sendProtectHelp();//呼叫护工还没有做;这个先预留
+                CALL_STATUS = Constants.WORK_IN_CALL;
+                if (null != initDataEntity) {
+                    jbVCall = setJumpingBeans(tvCallText, initDataEntity.getDeviceBedNum() + "床正在呼叫护工...");
                 }
             } else {
-                if (!isVisible(vSupport) && !isVisible(vNurse)) {//排除呼叫状态
-                    showThisView(vCall);
-                    //sendProtectHelp();//呼叫护工还没有做;这个先预留
-                    CALL_STATUS = Constants.WORK_IN_CALL;
-                    if (null != initDataEntity) {
-                        jbVCall = setJumpingBeans(tvCallText, initDataEntity.getDeviceBedNum() + "床正在呼叫护工...");
-                    }
-                } else {
-                    showToast("请先取消呼叫!");
-                }
+                showToast("请先取消呼叫!");
             }
         }
     }
@@ -2056,6 +2046,7 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
 
     public boolean callNurse = false;//超时自动取消呼叫了,20191118 之前是长按取消呼叫,后来又改成了根据UI的改变来取消,说让客户一目了然
 
+    //呼叫护士页面
     public void clickVNurse() {
         vMain_big.setVisibility(View.GONE);//显示增长页面20191017
         timeOfBackMainPage = 0;
@@ -2101,7 +2092,7 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
      * 显示侧边栏
      */
     protected void showLlRightView() {
-        changeTextColor(null);
+        //changeTextColor(null);
         Animation animation = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.in_righttoleft);
         llRight.setAnimation(animation);
         llRight.setVisibility(View.VISIBLE);
@@ -2125,7 +2116,7 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
         //修复主动打床头机ui不变化
         if (v.getVisibility() == View.VISIBLE) return;
         if (!StringUtils.listNotEmpty(allViews)) {
-            allViews = new ArrayList<>(Arrays.asList(vMain, vDoctor, vCost, vQrCode, vSupport, vCall, vNurse));
+            allViews = new ArrayList<>(Arrays.asList(vMain, vDoctor, vCost, vSupport, vCall, vNurse));
         }
         Animation animation = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.in_righttoleft);
         Animation closeAnimation = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.out_righttoleft);
@@ -2164,15 +2155,52 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
      * tvDoctor.setTextColor(ContextCompat.getColor(context, R.color.white));
      */
     private void changeTextColor(TextView textView) {
-        tvDoctor.setTextColor(Color.WHITE);
+        tvMain.setTextColor(Color.WHITE);
+        tvAdvice.setTextColor(Color.WHITE);
         tvCost.setTextColor(Color.WHITE);
-        tvQrCode.setTextColor(Color.WHITE);
+        tvCallCare.setTextColor(Color.WHITE);
         tvSupport.setTextColor(Color.WHITE);
-        tvCall.setTextColor(Color.WHITE);
+        tvSettings.setTextColor(Color.WHITE);
         if (null != textView)
             textView.setTextColor(Color.YELLOW);
     }
 
+    private void showHideRightView() {
+        if (isVisible(llRight)) {
+            goneLlRightView(true);
+        } else {
+            showLlRightView();
+        }
+    }
+
+        @Override
+    public void onClick(View v) {
+        switch (v.getId()) {
+            case R.id.right_ll_main_item:
+                clickVMain();
+                break;
+            case R.id.right_ll_advice_item:
+                clickVDoctor();
+                break;
+            case R.id.right_ll_cost_item:
+                clickVCost();
+                break;
+            case R.id.right_ll_call_care_item:
+                clickVCall();
+                break;
+            case R.id.right_ll_support_item:
+                clickVSupport();
+                break;
+            case R.id.right_ll_settings_item:
+                break;
+            case R.id.activity_calling_bed_layout_ll_right:
+            case R.id.rl_view_doctor_layout:
+            case R.id.rl_view_cost_layout:
+                showHideRightView();
+                break;
+        }
+    }
+
     //---------------------------------------------UI更改操作部分(下)---------------------------------------------------------------------
 
     /**
@@ -2340,12 +2368,10 @@ public class CallingBedActivity extends BaseActivity implements ISerialPortBedOn
 
     @Override
     public void playMusicComplete(int position) {
-        tvBroadcasting.setText("");
-        tvBroadcasting.setVisibility(View.INVISIBLE);
+        //tvBroadcasting.setText("");
+        //tvBroadcasting.setVisibility(View.INVISIBLE);
         //播放广播恢复默认状态
         Constants.INTIME_BROADCAST = "";
-
-
     }
 
     private float mVolume = 1.0f;

+ 1 - 0
app/src/main/java/com/wdkl/callingbed2/ui/InitActivity.java

@@ -144,6 +144,7 @@ public class InitActivity extends BaseActivity implements SerialPortUtil.ISerial
             SharedPreferences sharedPreferences = getSharedPreferences(Constants.MSG_SP, Context.MODE_PRIVATE); //私有数据
             macAddress = sharedPreferences.getString("macAddress", null);
         }
+        macAddress = "4C:00:00:01:00:01"; //for test
         LogUtil.d("getMacAddress", "macAddress==" + macAddress);
         Constants.MAC_ADDRESS = macAddress;
     }

+ 5 - 1
app/src/main/java/com/wdkl/callingbed2/util/StringUtils.java

@@ -8,6 +8,8 @@ import android.content.pm.PackageManager.NameNotFoundException;
 import android.os.Bundle;
 
 import com.wdkl.callingbed2.BuildConfig;
+import com.wdkl.callingbed2.MyApplication;
+import com.wdkl.callingbed2.R;
 
 import java.io.BufferedReader;
 import java.io.IOException;
@@ -70,7 +72,9 @@ public class StringUtils {
     }
 
     public static String getAllVersionName() {
-        String str = "\r\nAPP版本号:V" + BuildConfig.VERSION_NAME + "     中央服务器系列\r\n发布日期:" + BuildConfig.BUILD_TIME;
+        String str = "\r\nApp名称: " + MyApplication.getAppContext().getString(R.string.app_name)
+                + "\r\nAPP版本号:V" + BuildConfig.VERSION_NAME
+                + "     中央服务器系列\r\n发布日期:" + BuildConfig.BUILD_TIME;
         if (android.os.Build.VERSION.SDK_INT >= 26) { //android8.0 = 26
             str = str + "    android8.1 , rk3368";// rk3368 android8.1
         } else if (android.os.Build.VERSION.SDK_INT >= 24) { //android7.0 = 24

+ 0 - 5
app/src/main/res/drawable/selector_cost.xml

@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:drawable="@mipmap/ic_cost_p" android:state_pressed="true"/>
-    <item android:drawable="@mipmap/ic_cost_n"/>
-</selector>

+ 5 - 0
app/src/main/res/drawable/selector_main.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:drawable="@color/right_item_select" android:state_pressed="true"/>
+    <item android:drawable="@color/right_item_bg"/>
+</selector>

+ 0 - 5
app/src/main/res/drawable/selector_support.xml

@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:drawable="@mipmap/ic_support_p" android:state_pressed="true"/>
-    <item android:drawable="@mipmap/ic_support_n"/>
-</selector>

+ 86 - 37
app/src/main/res/layout/activity_calling_bed_layout.xml

@@ -8,7 +8,7 @@
 
     <include
         android:id="@+id/activity_calling_bed_layout_title"
-        layout="@layout/view_title_layout"></include>
+        layout="@layout/view_title_layout"/>
 
     <RelativeLayout
         android:id="@+id/activity_calling_bed_layout_rl_main"
@@ -21,26 +21,31 @@
             layout="@layout/view_welcome_layout"
             android:visibility="gone" />
 
+        <!-- 主界面 -->
         <include
             android:id="@+id/activity_calling_bed_layout_main"
-            layout="@layout/view_main_layout"
+            layout="@layout/view_main_layout2"
             android:visibility="gone" />
 
+        <!-- 医嘱界面 -->
         <include
             android:id="@+id/activity_calling_bed_layout_doctor"
             layout="@layout/view_doctor_layout"
             android:visibility="gone" />
 
+        <!-- 费用界面 -->
         <include
             android:id="@+id/activity_calling_bed_layout_cost"
             layout="@layout/view_cost_layout"
             android:visibility="gone" />
 
+        <!-- 二维码界面 -->
         <include
             android:id="@+id/activity_calling_bed_layout_qr_code"
             layout="@layout/view_qr_code_layout"
             android:visibility="gone" />
 
+        <!-- 请求增援界面 -->
         <include
             android:id="@+id/activity_calling_bed_layout_support"
             layout="@layout/view_support_layout"
@@ -64,136 +69,180 @@
     </RelativeLayout>
 
     <LinearLayout
-        android:id="@+id/activity_calling_bed_layout_rl_right"
-        android:layout_width="110dp"
+        android:id="@+id/bed_layout_ll_right_view"
+        android:layout_width="160dp"
         android:layout_height="match_parent"
+        android:layout_below="@+id/activity_calling_bed_layout_title"
         android:layout_alignParentRight="true"
-        android:background="@mipmap/bg_right"
+        android:background="@color/right_item_bg"
         android:orientation="vertical"
-        android:padding="20dp"
         android:visibility="gone">
 
+        <!--首页-->
         <LinearLayout
+            android:id="@+id/right_ll_main_item"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
             android:layout_weight="1"
-            android:orientation="vertical">
+            android:gravity="center"
+            android:orientation="vertical"
+            android:background="@drawable/selector_main">
 
             <TextView
-                android:id="@+id/activity_calling_bed_layout_tv_doctor"
                 android:layout_width="60dp"
                 android:layout_height="60dp"
                 android:layout_gravity="center"
-                android:background="@drawable/selector_doctor" />
+                android:background="@mipmap/icon_main_normal" />
 
             <TextView
-                android:id="@+id/activity_calling_bed_layout_tv_doctor_text"
+                android:id="@+id/right_tv_main_text"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_gravity="center"
+                android:layout_marginTop="6dp"
+                android:text="首页"
+                android:textColor="@color/white"
+                android:textSize="20sp"
+                android:textStyle="bold" />
+        </LinearLayout>
+
+        <!--医嘱-->
+        <LinearLayout
+            android:id="@+id/right_ll_advice_item"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_weight="1"
+            android:gravity="center"
+            android:orientation="vertical"
+            android:background="@drawable/selector_main">
+
+            <TextView
+                android:layout_width="60dp"
+                android:layout_height="60dp"
+                android:layout_gravity="center"
+                android:background="@mipmap/icon_medical_advice_normal" />
+
+            <TextView
+                android:id="@+id/right_tv_medical_advice_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:layout_marginTop="6dp"
                 android:text="医嘱"
                 android:textColor="@color/white"
-                android:textSize="16sp"
+                android:textSize="20sp"
                 android:textStyle="bold" />
         </LinearLayout>
 
+        <!--费用查询-->
         <LinearLayout
+            android:id="@+id/right_ll_cost_item"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
             android:layout_weight="1"
-            android:orientation="vertical">
+            android:gravity="center"
+            android:orientation="vertical"
+            android:background="@drawable/selector_main">
 
             <TextView
-                android:id="@+id/activity_calling_bed_layout_tv_cost"
                 android:layout_width="60dp"
                 android:layout_height="60dp"
-                android:layout_below="@+id/activity_calling_bed_layout_tv_doctor"
                 android:layout_gravity="center"
-                android:background="@drawable/selector_cost" />
+                android:background="@mipmap/icon_cost_normal" />
 
             <TextView
-                android:id="@+id/activity_calling_bed_layout_tv_cost_text"
+                android:id="@+id/right_tv_cost_text"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_gravity="center"
+                android:layout_marginTop="6dp"
                 android:text="费用查询"
                 android:textColor="@color/white"
-                android:textSize="16sp"
+                android:textSize="20sp"
                 android:textStyle="bold" />
         </LinearLayout>
 
+        <!--呼叫陪护-->
         <LinearLayout
+            android:id="@+id/right_ll_call_care_item"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
             android:layout_weight="1"
-            android:orientation="vertical">
+            android:gravity="center"
+            android:orientation="vertical"
+            android:background="@drawable/selector_main">
 
             <TextView
-                android:id="@+id/activity_calling_bed_layout_tv_qr_code"
                 android:layout_width="60dp"
                 android:layout_height="60dp"
-                android:layout_below="@+id/activity_calling_bed_layout_tv_cost"
                 android:layout_gravity="center"
-                android:background="@drawable/selector_qr_code" />
+                android:background="@mipmap/icon_care_normal" />
 
             <TextView
-                android:id="@+id/activity_calling_bed_layout_tv_qr_code_text"
+                android:id="@+id/right_tv_call_care_text"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_gravity="center"
-                android:text="二维码"
+                android:layout_marginTop="6dp"
+                android:text="呼叫陪护"
                 android:textColor="@color/white"
-                android:textSize="16sp"
+                android:textSize="20sp"
                 android:textStyle="bold" />
         </LinearLayout>
 
+        <!--请求增援-->
         <LinearLayout
+            android:id="@+id/right_ll_support_item"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
             android:layout_weight="1"
-            android:orientation="vertical">
+            android:gravity="center"
+            android:orientation="vertical"
+            android:background="@drawable/selector_main">
 
             <TextView
-                android:id="@+id/activity_calling_bed_layout_tv_support"
                 android:layout_width="60dp"
                 android:layout_height="60dp"
-                android:layout_below="@+id/activity_calling_bed_layout_tv_qr_code"
                 android:layout_gravity="center"
-                android:background="@drawable/selector_support" />
+                android:background="@mipmap/icon_support_normal" />
 
             <TextView
-                android:id="@+id/activity_calling_bed_layout_tv_support_text"
+                android:id="@+id/right_tv_support_text"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_gravity="center"
+                android:layout_marginTop="6dp"
                 android:text="请求增援"
                 android:textColor="@color/white"
-                android:textSize="16sp"
+                android:textSize="20sp"
                 android:textStyle="bold" />
         </LinearLayout>
 
+        <!--系统设置-->
         <LinearLayout
+            android:id="@+id/right_ll_settings_item"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
             android:layout_weight="1"
-            android:orientation="vertical">
+            android:gravity="center"
+            android:orientation="vertical"
+            android:background="@drawable/selector_main">
 
             <TextView
-                android:id="@+id/activity_calling_bed_layout_tv_call"
                 android:layout_width="60dp"
                 android:layout_height="60dp"
-                android:layout_below="@+id/activity_calling_bed_layout_tv_support"
                 android:layout_gravity="center"
-                android:background="@drawable/selector_call" />
+                android:background="@mipmap/icon_settings_normal" />
 
             <TextView
-                android:id="@+id/activity_calling_bed_layout_tv_call_text"
+                android:id="@+id/right_tv_settings_text"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_gravity="center"
-                android:text="呼叫护工"
+                android:layout_marginTop="6dp"
+                android:text="系统设置"
                 android:textColor="@color/white"
-                android:textSize="16sp"
+                android:textSize="20sp"
                 android:textStyle="bold" />
         </LinearLayout>
     </LinearLayout>

+ 21 - 20
app/src/main/res/layout/item_cost_layout.xml

@@ -1,50 +1,51 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/item_cost_layout_ll_title"
     android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:orientation="vertical">
+    android:layout_height="80dp"
+    android:orientation="horizontal">
 
-    <RelativeLayout
+    <!--<RelativeLayout
         android:id="@+id/item_cost_layout_rl_title"
         android:layout_width="match_parent"
         android:layout_height="50dp"
-        android:gravity="center_vertical"
-     >
+        android:gravity="center_vertical"/>-->
 
         <TextView
             android:id="@+id/item_cost_layout_tv_date"
-            android:layout_width="100dp"
-            android:layout_height="wrap_content"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_weight="2"
             android:layout_marginLeft="@dimen/margin_to_side_20"
+            android:gravity="center_vertical"
             android:lines="1"
             android:text="--"
             android:textColor="@color/black"
-            android:textSize="@dimen/font_size_23" />
+            android:textSize="@dimen/font_size_28" />
 
         <TextView
             android:id="@+id/item_cost_layout_tv_content"
-            android:layout_width="200dp"
-            android:layout_height="wrap_content"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_weight="7"
             android:layout_marginLeft="@dimen/margin_to_side_50"
-            android:layout_toLeftOf="@+id/item_cost_layout_tv_cost"
-            android:layout_toRightOf="@+id/item_cost_layout_tv_date"
+            android:gravity="center_vertical"
             android:lines="1"
             android:text="--"
             android:textColor="@color/black"
-            android:textSize="@dimen/font_size_23" />
+            android:textSize="@dimen/font_size_28" />
 
 
         <TextView
             android:id="@+id/item_cost_layout_tv_cost"
-            android:layout_width="100dp"
-            android:layout_height="wrap_content"
-            android:layout_alignParentRight="true"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_weight="2"
+            android:gravity="center_vertical"
             android:layout_marginLeft="@dimen/margin_to_side_50"
-            android:layout_marginRight="@dimen/font_size_20"
+            android:layout_marginRight="10dp"
             android:lines="1"
             android:text="--"
             android:textColor="@color/black"
-            android:textSize="@dimen/font_size_23" />
-    </RelativeLayout>
-
+            android:textSize="@dimen/font_size_28" />
 </LinearLayout>

+ 5 - 5
app/src/main/res/layout/view_cost_layout.xml

@@ -6,6 +6,7 @@
     android:orientation="vertical">
 
     <RelativeLayout
+        android:id="@+id/rl_view_cost_layout"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:layout_marginBottom="@dimen/font_size_20"
@@ -53,7 +54,7 @@
             android:layout_below="@+id/view_cost_layout_rl_title"
             android:paddingLeft="@dimen/font_size_20"
             android:paddingRight="@dimen/font_size_20"
-            android:paddingTop="@dimen/font_size_20"></android.support.v7.widget.RecyclerView>
+            android:paddingTop="@dimen/font_size_20"/>
 
         <TextView
             android:id="@+id/view_cost_layout_tv_text"
@@ -65,10 +66,9 @@
             android:layout_marginBottom="@dimen/margin_to_side_5"
             android:layout_marginTop="@dimen/margin_to_side_5"
             android:background="@drawable/shape_main_bg_admission"
-            android:padding="@dimen/margin_to_side_5"
-            android:paddingLeft="@dimen/margin_to_side_10"
-            android:paddingRight="@dimen/margin_to_side_10"
-            android:text="               更多信息请按右侧按键扫描二维码               "
+            android:paddingLeft="80dp"
+            android:paddingRight="80dp"
+            android:text="更多信息请扫描首页二维码"
             android:textColor="#3A92D1"
             android:textSize="@dimen/font_size_20" />
     </RelativeLayout>

+ 5 - 5
app/src/main/res/layout/view_doctor_layout.xml

@@ -6,6 +6,7 @@
     android:orientation="vertical">
 
     <RelativeLayout
+        android:id="@+id/rl_view_doctor_layout"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:layout_marginBottom="@dimen/font_size_20"
@@ -51,7 +52,7 @@
             android:layout_width="match_parent"
             android:layout_height="match_parent"
             android:layout_above="@+id/view_doctor_layout_tv_text"
-            android:layout_below="@+id/view_doctor_layout_rl_title"></android.support.v7.widget.RecyclerView>
+            android:layout_below="@+id/view_doctor_layout_rl_title"/>
 
         <TextView
             android:id="@+id/view_doctor_layout_tv_text"
@@ -63,10 +64,9 @@
             android:layout_marginBottom="@dimen/margin_to_side_5"
             android:layout_marginTop="@dimen/margin_to_side_5"
             android:background="@drawable/shape_main_bg_admission"
-            android:padding="@dimen/margin_to_side_5"
-            android:paddingLeft="@dimen/margin_to_side_10"
-            android:paddingRight="@dimen/margin_to_side_10"
-            android:text="               更多信息请按右侧按键扫描二维码               "
+            android:paddingLeft="80dp"
+            android:paddingRight="80dp"
+            android:text="更多信息请扫描首页二维码"
             android:textColor="#3A92D1"
             android:textSize="@dimen/font_size_20" />
     </RelativeLayout>

+ 1 - 1
app/src/main/res/layout/view_main_layout.xml

@@ -515,7 +515,7 @@
 
         <include
             android:id="@+id/view_main_layout_bottom"
-            layout="@layout/view_message_layout"></include>
+            layout="@layout/view_message_layout"/>
     </RelativeLayout>
 
     <TextView

+ 56 - 401
app/src/main/res/layout/view_main_layout2.xml

@@ -8,7 +8,7 @@
     <!--左侧护理数据-->
     <LinearLayout
         android:id="@+id/activity_calling_bed_layout_ll_left"
-        android:layout_width="150dp"
+        android:layout_width="290dp"
         android:layout_height="match_parent"
         android:orientation="vertical">
 
@@ -24,10 +24,10 @@
                 android:id="@+id/view_main_layout_left_one_title"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:layout_marginLeft="@dimen/margin_to_side_5"
+                android:layout_marginLeft="@dimen/margin_to_side_20"
                 android:text="--"
                 android:textColor="@color/white"
-                android:textSize="@dimen/font_size_30" />
+                android:textSize="@dimen/font_size_nurse_level" />
 
             <TextView
                 android:id="@+id/view_main_layout_left_one_content"
@@ -36,7 +36,7 @@
                 android:layout_marginLeft="@dimen/margin_to_side_10"
                 android:text="--"
                 android:textColor="@color/white"
-                android:textSize="@dimen/font_size_30" />
+                android:textSize="@dimen/font_size_nurse_level" />
 
         </LinearLayout>
 
@@ -53,10 +53,10 @@
                 android:id="@+id/view_main_layout_left_two_title"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:layout_marginLeft="@dimen/margin_to_side_5"
+                android:layout_marginLeft="@dimen/margin_to_side_20"
                 android:text="--"
                 android:textColor="@color/white"
-                android:textSize="@dimen/font_size_30" />
+                android:textSize="@dimen/font_size_nurse_level" />
 
             <TextView
                 android:id="@+id/view_main_layout_left_two_content"
@@ -65,7 +65,7 @@
                 android:layout_marginLeft="@dimen/margin_to_side_10"
                 android:text="--"
                 android:textColor="@color/white"
-                android:textSize="@dimen/font_size_30" />
+                android:textSize="@dimen/font_size_nurse_level" />
         </LinearLayout>
 
         <LinearLayout
@@ -81,10 +81,10 @@
                 android:id="@+id/view_main_layout_left_three_title"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:layout_marginLeft="@dimen/margin_to_side_5"
+                android:layout_marginLeft="@dimen/margin_to_side_20"
                 android:text="--"
                 android:textColor="@color/white"
-                android:textSize="@dimen/font_size_30" />
+                android:textSize="@dimen/font_size_nurse_level" />
 
             <TextView
                 android:id="@+id/view_main_layout_left_three_content"
@@ -93,7 +93,7 @@
                 android:layout_marginLeft="@dimen/margin_to_side_10"
                 android:text="--"
                 android:textColor="@color/white"
-                android:textSize="@dimen/font_size_30" />
+                android:textSize="@dimen/font_size_nurse_level" />
         </LinearLayout>
 
         <LinearLayout
@@ -109,10 +109,10 @@
                 android:id="@+id/view_main_layout_left_four_title"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:layout_marginLeft="@dimen/margin_to_side_5"
+                android:layout_marginLeft="@dimen/margin_to_side_20"
                 android:text="--"
                 android:textColor="@color/white"
-                android:textSize="@dimen/font_size_30" />
+                android:textSize="@dimen/font_size_nurse_level" />
 
             <TextView
                 android:id="@+id/view_main_layout_left_four_content"
@@ -121,7 +121,7 @@
                 android:layout_marginLeft="@dimen/margin_to_side_10"
                 android:text="--"
                 android:textColor="@color/white"
-                android:textSize="@dimen/font_size_30" />
+                android:textSize="@dimen/font_size_nurse_level" />
         </LinearLayout>
 
         <LinearLayout
@@ -137,10 +137,10 @@
                 android:id="@+id/view_main_layout_left_five_title"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:layout_marginLeft="@dimen/margin_to_side_5"
+                android:layout_marginLeft="@dimen/margin_to_side_20"
                 android:text="--"
                 android:textColor="@color/white"
-                android:textSize="@dimen/font_size_30" />
+                android:textSize="@dimen/font_size_nurse_level" />
 
             <TextView
                 android:id="@+id/view_main_layout_left_five_content"
@@ -149,15 +149,15 @@
                 android:layout_marginLeft="@dimen/margin_to_side_10"
                 android:text="--"
                 android:textColor="@color/white"
-                android:textSize="@dimen/font_size_30" />
+                android:textSize="@dimen/font_size_nurse_level" />
         </LinearLayout>
     </LinearLayout>
 
     <!--中间床位信息-->
     <LinearLayout
         android:id="@+id/activity_calling_bed_layout_ll_middle"
-        android:layout_width="300dp"
-        android:layout_height="480dp"
+        android:layout_width="360dp"
+        android:layout_height="570dp"
         android:layout_marginLeft="16dp"
         android:layout_toRightOf="@id/activity_calling_bed_layout_ll_left"
         android:orientation="vertical"
@@ -169,7 +169,7 @@
             android:layout_marginTop="20dp"
             android:text="床位"
             android:textColor="@color/white"
-            android:textSize="@dimen/font_size_60"
+            android:textSize="80sp"
             android:textStyle="bold" />
 
         <TextView
@@ -178,13 +178,14 @@
             android:layout_height="wrap_content"
             android:text="--"
             android:textColor="@color/white"
-            android:textSize="@dimen/font_size_55"
+            android:textSize="80sp"
             android:textStyle="bold" />
 
         <ImageView
             android:id="@+id/view_main_layout_iv_bed_qr_code"
             android:layout_width="200dp"
             android:layout_height="200dp"
+            android:layout_marginTop="8dp"
             android:scaleType="fitXY"
             android:src="@mipmap/ic_qr_code_default" />
 
@@ -192,8 +193,8 @@
             android:id="@+id/view_main_layout_tv_duty_doctor"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:paddingLeft="32dp"
-            android:layout_marginTop="10dp"
+            android:layout_marginTop="20dp"
+            android:paddingLeft="48dp"
             android:text="值班医生:"
             android:textColor="@color/white"
             android:textSize="@dimen/font_size_30" />
@@ -202,7 +203,8 @@
             android:id="@+id/view_main_layout_tv_duty_nurse"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:paddingLeft="32dp"
+            android:layout_marginTop="10dp"
+            android:paddingLeft="48dp"
             android:text="值班护士:"
             android:textColor="@color/white"
             android:textSize="@dimen/font_size_30" />
@@ -212,7 +214,7 @@
     <LinearLayout
         android:id="@+id/activity_calling_bed_layout_ll_right"
         android:layout_width="match_parent"
-        android:layout_height="480dp"
+        android:layout_height="570dp"
         android:layout_toRightOf="@id/activity_calling_bed_layout_ll_middle"
         android:gravity="center_horizontal"
         android:orientation="vertical"
@@ -221,10 +223,10 @@
             android:id="@+id/view_main_layout_tv_patient_name"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_marginTop="20dp"
+            android:layout_marginTop="40dp"
             android:text="张小米"
             android:textColor="#3CA2E0"
-            android:textSize="80sp"
+            android:textSize="120sp"
             android:textStyle="bold" />
 
         <TextView
@@ -234,27 +236,28 @@
             android:layout_marginTop="20dp"
             android:text="【女  23岁】"
             android:textColor="#3CA2E0"
-            android:textSize="@dimen/font_size_55" />
+            android:textSize="80sp" />
 
         <View
             android:layout_width="match_parent"
             android:layout_height="1dp"
-            android:layout_marginTop="20dp"
+            android:layout_marginTop="40dp"
             android:background="@color/gray"/>
 
         <TextView
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginTop="20dp"
+            android:paddingLeft="10dp"
             android:text="病情诊断:"
             android:textColor="#3CA2E0"
-            android:textSize="@dimen/font_size_30" />
+            android:textSize="32sp" />
 
         <TextView
             android:id="@+id/activity_calling_bed_layout_tv_illness"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_marginTop="10dp"
+            android:padding="10dp"
             android:text="------"
             android:textColor="@color/black"
             android:textSize="@dimen/font_size_28" />
@@ -267,381 +270,33 @@
         android:layout_height="match_parent"
         android:layout_marginLeft="16dp"
         android:layout_marginTop="12dp"
+        android:gravity="center_vertical"
         android:layout_below="@id/activity_calling_bed_layout_ll_right"
         android:layout_toRightOf="@id/activity_calling_bed_layout_ll_left"
-        android:orientation="vertical"
         android:background="@drawable/shape_msg_bg">
-    </LinearLayout>
-
-
-
-
-
-    <RelativeLayout
-        android:visibility="gone"
-        android:id="@+id/activity_calling_bed_layout_rl_middle"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:layout_toRightOf="@+id/activity_calling_bed_layout_ll_left"
-        android:background="@mipmap/bg_main">
-
-        <LinearLayout
-            android:id="@+id/view_main_layout_ll_content"
-            android:layout_width="500dp"
-            android:layout_height="match_parent"
-            android:layout_above="@+id/view_main_layout_bottom"
-            android:orientation="vertical"
-            android:paddingLeft="@dimen/margin_to_side_15"
-            android:paddingTop="@dimen/margin_to_side_15"
-            android:paddingRight="@dimen/margin_to_side_15">
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:layout_weight="1"
-                android:orientation="horizontal">
-
-                <LinearLayout
-                    android:layout_width="match_parent"
-                    android:layout_height="match_parent"
-                    android:layout_weight="2"
-                    android:background="@drawable/shape_main_bg_top_left"
-                    android:orientation="vertical"
-                    android:padding="@dimen/margin_to_side_5"
-                    android:visibility="gone">
-
-                    <RelativeLayout
-                        android:layout_width="match_parent"
-                        android:layout_height="match_parent"
-                        android:gravity="center"
-                        android:orientation="vertical">
-
-                        <TextView
-                            android:id="@+id/view_main_layout_tv_bed"
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:layout_centerHorizontal="true"
-                            android:text="床位"
-                            android:textColor="@color/white"
-                            android:textSize="@dimen/font_size_60"
-                            android:textStyle="bold" />
-
-                        <TextView
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:layout_below="@+id/view_main_layout_tv_bed"
-                            android:layout_centerHorizontal="true"
-                            android:text="--"
-                            android:textColor="@color/white"
-                            android:textSize="@dimen/font_size_55"
-                            android:textStyle="bold" />
-                    </RelativeLayout>
-                </LinearLayout>
-
-
-                <LinearLayout
-                    android:layout_width="match_parent"
-                    android:layout_height="match_parent"
-                    android:layout_weight="1"
-                    android:background="#FFFFFF">
-
-                    <LinearLayout
-                        android:layout_width="match_parent"
-                        android:layout_height="match_parent"
-                        android:layout_weight="2"
-                        android:orientation="vertical"
-                        android:padding="@dimen/margin_to_side_5">
-
-                        <RelativeLayout
-                            android:layout_width="match_parent"
-                            android:layout_height="match_parent"
-                            android:gravity="center"
-                            android:orientation="vertical">
-
-                            <TextView
-                                android:layout_width="wrap_content"
-                                android:layout_height="wrap_content"
-                                android:layout_centerHorizontal="true"
-                                android:text="--"
-                                android:textColor="#1C5C9E"
-                                android:textSize="@dimen/font_size_50"
-                                android:textStyle="bold"
-                                android:visibility="gone" />
-
-                            <TextView
-                                android:layout_width="wrap_content"
-                                android:layout_height="wrap_content"
-                                android:layout_centerHorizontal="true"
-                                android:text="--"
-                                android:textColor="#1C5C9E"
-                                android:textSize="@dimen/font_size_45"
-                                android:textStyle="bold"
-                                android:visibility="gone" />
-
-                            <TextView
-                                android:id="@+id/view_main_layout_tv_bed_num"
-                                android:layout_width="wrap_content"
-                                android:layout_height="wrap_content"
-                                android:layout_centerHorizontal="true"
-                                android:layout_centerVertical="true"
-                                android:layout_marginTop="-66dp"
-                                android:text="222"
-                                android:textColor="@color/black"
-                                android:textSize="219sp"
-                                android:textStyle="bold" />
-
-                        </RelativeLayout>
-                    </LinearLayout>
-
-                </LinearLayout>
-            </LinearLayout>
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:layout_weight="1">
-
-                <LinearLayout
-                    android:layout_width="match_parent"
-                    android:layout_height="match_parent"
-                    android:layout_weight="2"
-                    android:background="@drawable/shape_main_bg_bottom_left"
-                    android:gravity="center"
-                    android:visibility="gone">
-
-                    <LinearLayout
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:background="@color/white">
-
-                        <ImageView
-                            android:id="@+id/view_main_layout_img_two_dimensional_code"
-                            android:layout_width="154dp"
-                            android:layout_height="154dp"
-                            android:padding="8dp"
-                            android:scaleType="fitXY"
-                            android:src="@mipmap/ic_qr_code_default" />
-                    </LinearLayout>
-                </LinearLayout>
-
-
-                <LinearLayout
-                    android:layout_width="match_parent"
-                    android:layout_height="match_parent"
-                    android:layout_weight="1"
-                    android:background="#D5EFFC"
-                    android:orientation="vertical">
-
-                    <RelativeLayout
-                        android:layout_width="match_parent"
-                        android:layout_height="match_parent"
-                        android:layout_weight="6"
-                        android:orientation="vertical">
-
-                        <TextView
-                            android:id="@+id/view_mai_layout_tv_illness_text"
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:layout_marginLeft="@dimen/margin_to_side_10"
-                            android:layout_marginTop="@dimen/margin_to_side_10"
-                            android:text="病情诊断:"
-                            android:textColor="#666666"
-                            android:textSize="@dimen/font_size_20"
-                            android:textStyle="bold"
-                            android:visibility="gone" />
-
-                        <TextView
-                            android:id="@+id/view_main_layout_tv_illness"
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:layout_above="@+id/view_main_layout_tv_detail"
-                            android:layout_below="@+id/view_mai_layout_tv_illness_text"
-                            android:layout_alignParentEnd="true"
-                            android:layout_alignParentRight="true"
-                            android:layout_marginRight="10dp"
-                            android:layout_marginBottom="10dp"
-                            android:text="--岁"
-                            android:textColor="@color/black"
-                            android:textSize="50sp"
-                            android:textStyle="bold" />
-
-                        <TextView
-                            android:id="@+id/view_main_layout_tv_name"
-                            android:layout_width="300dp"
-                            android:layout_height="wrap_content"
-                            android:layout_alignParentStart="true"
-                            android:layout_alignParentLeft="true"
-                            android:layout_centerVertical="true"
-                            android:layout_marginLeft="5dp"
-                            android:lines="1"
-                            android:ellipsize="end"
-                            android:text="张三三"
-                            android:textColor="@color/black"
-                            android:textSize="95sp"
-                            android:textStyle="bold" />
-
-                        <TextView
-                            android:id="@+id/view_main_layout_tv_detail"
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:layout_alignParentBottom="true"
-                            android:layout_marginBottom="40dp"
-                            android:layout_alignParentRight="true"
-                            android:layout_marginRight="10dp"
-                            android:text="[ 男 ]"
-                            android:textColor="@color/black"
-                            android:textSize="50sp"
-                            android:textStyle="bold" />
-
-                    </RelativeLayout>
-
-                    <TextView
-                        android:id="@+id/view_main_layout_tv_admission"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_gravity="center"
-                        android:layout_marginBottom="@dimen/margin_to_side_5"
-                        android:background="@drawable/shape_main_bg_admission"
-                        android:padding="@dimen/margin_to_side_5"
-                        android:paddingLeft="@dimen/margin_to_side_10"
-                        android:paddingRight="@dimen/margin_to_side_10"
-                        android:text="     入院时间     "
-                        android:textColor="#3A92D1"
-                        android:textSize="@dimen/font_size_18"
-                        android:visibility="gone" />
-                </LinearLayout>
-            </LinearLayout>
-        </LinearLayout>
-
-
-        <LinearLayout
-            android:id="@+id/view_main_layout_ll_content_ll_right"
+        <ImageView
+            android:layout_width="64dp"
+            android:layout_height="64dp"
+            android:layout_marginLeft="10dp"
+            android:src="@mipmap/message"
+            android:scaleType="fitXY"/>
+
+        <com.wdkl.callingbed2.widget.view.MyTextView
+            android:id="@+id/activity_calling_bed_layout_tv_message"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:layout_above="@+id/view_main_layout_bottom"
-            android:layout_toRightOf="@+id/view_main_layout_ll_content"
-            android:orientation="vertical"
-            android:paddingTop="@dimen/margin_to_side_15"
-            android:paddingRight="@dimen/margin_to_side_15">
-
-            <TextView
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_weight="1"
-                android:background="@drawable/shape_mai_bg_doctor_title"
-                android:gravity="center"
-                android:text="值班医生"
-                android:textColor="#A3DDF9"
-                android:textSize="@dimen/font_size_20" />
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_weight="6"
-                android:background="#37A1D5"
-                android:gravity="center"
-                android:orientation="vertical">
-
-                <ImageView
-                    android:id="@+id/view_main_layout_iv_doctor"
-                    android:layout_width="85dp"
-                    android:layout_height="85dp"
-                    android:scaleType="fitXY"
-                    android:src="@mipmap/ic_response_doctor" />
-
-                <TextView
-                    android:id="@+id/view_main_layout_tv_doctor_name"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginTop="@dimen/margin_to_side_5"
-                    android:text="--"
-                    android:textColor="@color/white"
-                    android:textSize="@dimen/font_size_20" />
-
-
-            </LinearLayout>
-
-            <TextView
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_weight="1"
-                android:background="#2B87B9"
-                android:gravity="center"
-                android:text="值班护士"
-                android:textColor="#A3DDF9"
-                android:textSize="@dimen/font_size_20" />
-
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_weight="6"
-                android:background="#37A1D5"
-                android:gravity="center"
-                android:orientation="vertical">
-
-                <ImageView
-                    android:id="@+id/view_main_layout_iv_nurse"
-                    android:layout_width="85dp"
-                    android:layout_height="85dp"
-                    android:scaleType="fitXY"
-                    android:src="@mipmap/ic_response_nurse" />
-
-                <TextView
-                    android:id="@+id/view_main_layout_tv_nurse_name"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginTop="@dimen/margin_to_side_5"
-                    android:text="--"
-                    android:textColor="@color/white"
-                    android:textSize="@dimen/font_size_20" />
-            </LinearLayout>
-
-            <RelativeLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_weight="2"
-                android:background="@drawable/shape_main_bg_doctor_bottom">
-
-                <com.wdkl.callingbed2.util.MarqueeText
-                    android:id="@+id/view_main_layout_tv_broadcasting"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerInParent="true"
-                    android:layout_marginLeft="10dp"
-                    android:layout_marginTop="1dp"
-                    android:layout_marginRight="10dp"
-                    android:layout_marginBottom="1dp"
-                    android:background="@drawable/shape_main_bg_bottom_broadcasting"
-                    android:ellipsize="marquee"
-                    android:focusable="true"
-                    android:focusableInTouchMode="true"
-                    android:gravity="center"
-                    android:marqueeRepeatLimit="marquee_forever"
-                    android:paddingLeft="10dp"
-                    android:paddingRight="10dp"
-                    android:singleLine="true"
-                    android:text=""
-                    android:textColor="#FCFF16"
-                    android:textSize="16sp"
-                    android:visibility="invisible" />
-
-            </RelativeLayout>
-        </LinearLayout>
-
-        <include
-            android:id="@+id/view_main_layout_bottom"
-            layout="@layout/view_message_layout"></include>
-    </RelativeLayout>
+            android:paddingTop="12dp"
+            android:paddingLeft="20dp"
+            android:paddingRight="10dp"
+            android:ellipsize="marquee"
+            android:focusable="true"
+            android:focusableInTouchMode="true"
+            android:marqueeRepeatLimit="marquee_forever"
+            android:scrollHorizontally="true"
+            android:text="当前无公告"
+            android:singleLine="true"
+            android:textColor="@color/black"
+            android:textSize="28sp" />
+    </LinearLayout>
 
-    <TextView
-        android:id="@+id/activity_calling_bed_layout_tv_version"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_alignParentRight="true"
-        android:layout_alignParentBottom="true"
-        android:layout_marginRight="10dp"
-        android:layout_marginBottom="20dp"
-        android:text=""
-        android:textColor="@color/white"
-        android:textSize="@dimen/font_size_16" />
 </RelativeLayout>

+ 4 - 4
app/src/main/res/layout/view_title_layout.xml

@@ -7,8 +7,8 @@
 
     <TextView
         android:id="@+id/view_title_layout_tv_point"
-        android:layout_width="5dp"
-        android:layout_height="5dp"
+        android:layout_width="12dp"
+        android:layout_height="12dp"
         android:layout_centerVertical="true"
         android:layout_marginLeft="20dp" />
 
@@ -21,7 +21,7 @@
         android:layout_toRightOf="@+id/view_title_layout_tv_point"
         android:text=""
         android:textColor="@color/white"
-        android:textSize="@dimen/font_size_18" />
+        android:textSize="@dimen/font_size_20" />
 
     <TextView
         android:id="@+id/view_title_layout_tv_no"
@@ -32,7 +32,7 @@
         android:layout_toLeftOf="@+id/view_title_layout_ll_right"
         android:text=""
         android:textColor="@color/white"
-        android:textSize="@dimen/font_size_18" />
+        android:textSize="@dimen/font_size_20" />
 
     <TextView
         android:id="@+id/view_title_layout_tv_time"

二进制
app/src/main/res/mipmap-mdpi/icon_care_normal.png


二进制
app/src/main/res/mipmap-mdpi/icon_care_press.png


二进制
app/src/main/res/mipmap-mdpi/icon_cost_normal.png


二进制
app/src/main/res/mipmap-mdpi/icon_cost_press.png


二进制
app/src/main/res/mipmap-mdpi/icon_main_normal.png


二进制
app/src/main/res/mipmap-mdpi/icon_main_press.png


二进制
app/src/main/res/mipmap-mdpi/icon_medical_advice_normal.png


二进制
app/src/main/res/mipmap-mdpi/icon_medical_advice_press.png


二进制
app/src/main/res/mipmap-mdpi/icon_settings_normal.png


二进制
app/src/main/res/mipmap-mdpi/icon_settings_press.png


二进制
app/src/main/res/mipmap-mdpi/icon_support_normal.png


二进制
app/src/main/res/mipmap-mdpi/icon_support_press.png


二进制
app/src/main/res/mipmap-mdpi/message.png


+ 4 - 0
app/src/main/res/values/colors.xml

@@ -83,4 +83,8 @@
     <!--cost list 列表中的颜色-->
     <color name="cost_list_title">#C4C4C4</color>
     <color name="cost_item">#F8F8F8</color>
+
+    <!--右侧菜单栏颜色-->
+    <color name="right_item_bg">#3CA2E0</color>
+    <color name="right_item_select">#B1DAF3</color>
 </resources>

+ 1 - 0
app/src/main/res/values/dimens.xml

@@ -78,5 +78,6 @@
     <dimen name="font_size_65">65sp</dimen>
     <dimen name="font_size_70">70sp</dimen>
 
+    <dimen name="font_size_nurse_level">40sp</dimen>
 
 </resources>

+ 5 - 2
bedlib/src/main/java/serialporttest/utils/SerialPortUtil.java

@@ -1,5 +1,6 @@
 package serialporttest.utils;
 
+import android.text.TextUtils;
 import android.util.Log;
 
 import java.io.File;
@@ -191,8 +192,10 @@ public class SerialPortUtil {
                     }
 
                     String str = data.substring(data.indexOf("$") + 1, data.indexOf("#"));
-                    DataIndex = Integer.parseInt(str.substring(3, 4));
-                    DataValue = Integer.parseInt(str.substring(5, 6));
+                    if (TextUtils.isDigitsOnly(str.substring(3, 4)) && TextUtils.isDigitsOnly(str.substring(5, 6))) {
+                        DataIndex = Integer.parseInt(str.substring(3, 4));
+                        DataValue = Integer.parseInt(str.substring(5, 6));
+                    }
                     if (DataIndex < 8) {
                         KeyValue[DataIndex] = (byte) DataValue;
                     }