Browse Source

1.添加获取单个医生信息接口

王鹏鹏 2 years ago
parent
commit
de40d0cb5b

+ 15 - 2
healthconsultation/src/main/java/com/yingyang/healthconsultation/activity/HealthConsultationActivity.kt

@@ -75,6 +75,8 @@ class HealthConsultationActivity :
         binding {
             layoutHome.setOnTouchListener(this@HealthConsultationActivity)
             searchLayout.setOnTouchListener(this@HealthConsultationActivity)
+            btnHome.setOnTouchListener(this@HealthConsultationActivity)
+            btnConsultationRecord.setOnTouchListener(this@HealthConsultationActivity)
         }
     }
 
@@ -86,7 +88,7 @@ class HealthConsultationActivity :
     override fun onTouch(v: View, event: MotionEvent): Boolean {
         when (event.action) {
             MotionEvent.ACTION_DOWN -> {
-                if (v.id == R.id.layoutHome || v.id == R.id.searchLayout) {
+                if (v.id == R.id.layoutHome || v.id == R.id.searchLayout || v.id == R.id.btnHome || v.id == R.id.btnConsultationRecord) {
                     v.startAnimation(getScaleAnimation())
                 }
             }
@@ -100,10 +102,21 @@ class HealthConsultationActivity :
                     R.id.searchLayout -> {
 
                     }
+
+                    R.id.btnHome -> {
+                        //返回首页
+                        finish()
+                    }
+                    R.id.btnConsultationRecord -> {
+                        JumpUtil.jumpActivity(
+                            RouterUrlCommon.consultationRecord,
+                            mContext
+                        )
+                    }
                 }
             }
             MotionEvent.ACTION_CANCEL -> {
-                if (v.id == R.id.layoutHome || v.id == R.id.searchLayout) {
+                if (v.id == R.id.layoutHome || v.id == R.id.searchLayout || v.id == R.id.btnHome || v.id == R.id.btnConsultationRecord) {
                     v.startAnimation(getEndAnimation())
                 }
             }

+ 31 - 1
healthconsultation/src/main/res/layout/activity_health_consultation.xml

@@ -124,7 +124,8 @@
                 <LinearLayout
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:orientation="vertical">
+                    android:orientation="vertical"
+                    android:paddingBottom="@dimen/divider_22px">
 
                     <androidx.appcompat.widget.AppCompatTextView
                         android:id="@+id/tvProgress"
@@ -162,6 +163,35 @@
                         android:layout_height="wrap_content"
                         app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
 
+                    <androidx.constraintlayout.widget.ConstraintLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="@dimen/divider_22px">
+
+                        <androidx.appcompat.widget.AppCompatButton
+                            android:id="@+id/btnHome"
+                            android:layout_width="@dimen/divider_321px"
+                            android:layout_height="@dimen/divider_78px"
+                            android:layout_marginStart="@dimen/divider_235px"
+                            android:background="@drawable/bg_btn_doctor_details"
+                            android:text="@string/home_pager"
+                            android:textColor="@android:color/white"
+                            android:textSize="@dimen/divider_28px"
+                            app:layout_constraintStart_toStartOf="parent"
+                            app:layout_constraintTop_toTopOf="parent" />
+
+                        <androidx.appcompat.widget.AppCompatButton
+                            android:id="@+id/btnConsultationRecord"
+                            android:layout_width="@dimen/divider_321px"
+                            android:layout_height="@dimen/divider_78px"
+                            android:layout_marginStart="@dimen/divider_48px"
+                            android:background="@drawable/bg_btn_doctor_details"
+                            android:text="@string/consultation_record"
+                            android:textColor="@android:color/white"
+                            android:textSize="@dimen/divider_28px"
+                            app:layout_constraintStart_toEndOf="@+id/btnHome"
+                            app:layout_constraintTop_toTopOf="parent" />
+                    </androidx.constraintlayout.widget.ConstraintLayout>
                 </LinearLayout>
             </com.google.android.material.card.MaterialCardView>
         </LinearLayout>