Bladeren bron

增加启动护理宝入口

weizhengliang 2 jaren geleden
bovenliggende
commit
921ad66aec

+ 9 - 0
home/src/main/code/com/wdkl/ncs/android/component/home/activity/WatchHome2Activity.kt

@@ -1,6 +1,7 @@
 package com.wdkl.ncs.android.component.home.activity
 
 import android.Manifest
+import android.content.ComponentName
 import android.content.Context
 import android.content.Intent
 import android.content.IntentFilter
@@ -667,6 +668,8 @@ class WatchHome2Activity : BaseActivity<WatchHomeActivityPresenter, WatchActivit
         state_linlyout.setOnClickListener(this)
         other_linyout.setOnClickListener(this)
         channel_im_layout.setOnClickListener(this)
+        ll_custom_view.setOnClickListener(this)
+
         tv_register_ok.setOnClickListener {
             Log.d(TAG, "注册完成")
             initTcp()
@@ -845,6 +848,12 @@ class WatchHome2Activity : BaseActivity<WatchHomeActivityPresenter, WatchActivit
                 }
                 clickTime = System.currentTimeMillis()
             }
+            R.id.ll_custom_view -> {
+                val intent = Intent(Intent.ACTION_MAIN)
+                intent.addCategory(Intent.CATEGORY_LAUNCHER)
+                intent.component = ComponentName("com.huibao.hulibao", "com.huibao.hulibao.activity.SplashActivity")
+                startActivity(intent)
+            }
         }
     }
 

BIN
home/src/main/res/drawable/hulibao.png


+ 24 - 1
home/src/main/res/layout/watch_activity_home2.xml

@@ -249,7 +249,8 @@
                             android:layout_weight="1"
                             android:background="#48CFB0"
                             android:gravity="center"
-                            android:orientation="vertical">
+                            android:orientation="vertical"
+                            android:visibility="gone">
 
                             <ImageView
                                 android:id="@+id/electric_quantity_imagev"
@@ -275,6 +276,28 @@
                                 android:visibility="gone" />
                         </LinearLayout>
 
+                        <LinearLayout
+                            android:id="@+id/ll_custom_view"
+                            android:layout_width="0dp"
+                            android:layout_height="match_parent"
+                            android:layout_weight="1"
+                            android:background="#48CFB0"
+                            android:gravity="center"
+                            android:orientation="vertical">
+
+                            <ImageView
+                                android:layout_width="20dp"
+                                android:layout_height="20dp"
+                                android:src="@drawable/hulibao" />
+
+                            <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:text="护理宝"
+                                android:textColor="#ffffff"
+                                android:textSize="12sp" />
+
+                        </LinearLayout>
 
                         <LinearLayout
                             android:id="@+id/other_linyout"