Browse Source

浮点sdk增加启动图

yhz 5 years ago
parent
commit
25478c43a4

+ 17 - 1
package_web_record.py

@@ -82,6 +82,16 @@ def package(config, sdk):
     if 'deleteList' in config:
         jsonConfig['deleteList'] = config['deleteList']
 
+    userIcon = configData['userIcon']
+    suffix = userIcon[userIcon.index('.'):]
+    item = {'formFile':userIcon, 'toFile':'res/drawable/float_sdk_user_icon' + suffix}
+
+    if 'copyList' in config:
+        copyList = config['copyList']
+        copyList.add(item)
+    else:
+        config['copyList'] = [item]
+
     # 获取sdk相关配置
     getSdkConfig(sdk, jsonConfig, config)
 
@@ -106,6 +116,9 @@ def setRecordConfig(config, recordConfig):
         configData['skinId'] = recordConfig['skinId']
         configData['host'] = recordConfig['host']
         configData['appDownUrl'] = recordConfig['appDownUrl']
+        configData['userId'] = recordConfig['userId']
+        configData['userName'] = recordConfig['userName']
+        configData['userDesc'] = recordConfig['userDesc']
     else:
         config['configData'] = {
             'bgMusic':'bg_music.mp3',
@@ -115,7 +128,10 @@ def setRecordConfig(config, recordConfig):
             'gameUrl':recordConfig['gameUrl'],
             'skinId':recordConfig['skinId'],
             'host':recordConfig['host'],
-            'appDownUrl':recordConfig['appDownUrl']
+            'appDownUrl':recordConfig['appDownUrl'],
+            'userId':recordConfig['userId'],
+            'userName':recordConfig['userName'],
+            'userDesc':recordConfig['userDesc']
         }
 
 def toBoolean(booleanStr):

BIN
sdk/float/libs/FloatSDK-1.0.11.jar


BIN
sdk/float/libs/FloatSDK-1.0.12.jar


BIN
sdk/float/res/drawable-xxhdpi/sdk_bottom_bg.png


+ 8 - 2
sdk/float/res/layout/sdk_activity_web.xml

@@ -1,10 +1,16 @@
 <?xml version="1.0" encoding="utf-8"?>
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:orientation="vertical"
     android:layout_width="match_parent"
     android:layout_height="match_parent">
+
+    <View
+        android:id="@+id/status_bar"
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        android:background="@color/sdk_statusbar"/>
     <WebView
         android:id="@+id/web_view"
         android:layout_width="match_parent"
         android:layout_height="match_parent"/>
-</FrameLayout>
+</LinearLayout>

+ 25 - 0
sdk/float/res/layout/sdk_protocol_web.xml

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+    <LinearLayout
+        android:layout_gravity="center"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="vertical"
+        android:background="#363a44">
+        <View
+            android:id="@+id/status_bar"
+            android:layout_width="match_parent"
+            android:layout_height="0dp"
+            android:background="@color/sdk_statusbar"/>
+            <WebView
+                android:id="@+id/web_view"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"/>
+    </LinearLayout>
+
+
+
+</FrameLayout>

+ 114 - 0
sdk/float/res/layout/sdk_splash_view.xml

@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:background="@color/sdk_white"
+        android:orientation="vertical"
+        >
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="102dp"
+            android:layout_marginTop="89dp"
+            android:background="@color/sdk_creator_bg"
+            android:orientation="horizontal"
+            android:gravity="center">
+
+                    <ImageView
+                        android:id="@+id/sdk_creator_icon"
+                        android:layout_width="70dp"
+                        android:layout_height="70dp"
+                        tools:src="@drawable/sdk_launcher"/>
+
+                    <LinearLayout
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:orientation="vertical"
+                        android:layout_marginLeft="20dp">
+
+                    <TextView
+                        android:id="@+id/sdk_creator_name"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        tools:text="极米玩家家家"
+                        android:textColor="@color/sdk_text_grey"
+                        android:textSize="18sp"
+                        android:textStyle="bold"
+                        />
+                    <TextView
+                        android:id="@+id/sdk_creator_id"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        tools:text="ID:16661666"
+                        android:textColor="@color/sdk_text_grey"
+                        android:textSize="14sp"
+                        />
+                    <TextView
+                        android:id="@+id/sdk_creator_sign"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        tools:text="填写个性签名更容易获得关注哦"
+                        android:textColor="@color/sdk_text_grey"
+                        android:textSize="14sp"
+                        />
+                </LinearLayout>
+        </LinearLayout>
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center"
+        android:background="@color/sdk_white"
+        android:orientation="vertical">
+
+        <ImageView
+            android:id="@+id/sdk_app_icon"
+            android:layout_width="64dp"
+            android:layout_height="64dp"
+            android:layout_gravity="center"
+        />
+        <TextView
+            android:id="@+id/sdk_app_name"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center"
+            android:textSize="16sp"
+            android:layout_marginTop="13dp"
+            android:textColor="@color/sdk_black"
+            tools:text="企鹅蹦蹦蹦蹦蹦"/>
+
+        <ProgressBar
+            android:layout_width="200dp"
+            android:layout_marginTop="44dp"
+            style="?android:attr/progressBarStyleHorizontal"
+            android:id="@+id/sdk_progressbar"
+            android:max="100"
+            android:layout_height="20dp"
+            android:indeterminateTint="#6197fd"
+            tools:progress="50"/>
+
+        <TextView
+            android:id="@+id/tv_sdk_progress"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center"
+            android:textSize="14sp"
+            android:layout_marginTop="13dp"
+            android:textColor="@color/sdk_progress_text"
+            android:text="0%"/>
+    </LinearLayout>
+
+    <ImageView
+        android:layout_width="match_parent"
+        android:layout_height="80dp"
+        android:src="@drawable/sdk_bottom_bg"
+        android:layout_gravity="bottom"/>
+</FrameLayout>

+ 7 - 0
sdk/float/res/values/sdk_colors.xml

@@ -3,4 +3,11 @@
     <color name="sdk_button_bg">#66000000</color>
     <color name="sdk_dialog_bg"> #697491</color>
     <color name="sdk_line">#80FFFFFF</color>
+    <color name="sdk_statusbar">#161a24</color>
+    <color name="sdk_white">#FFFFFF</color>
+    <color name="sdk_black">#000000</color>
+    <color name="sdk_text_grey">#363636</color>
+    <color name="sdk_creator_bg">#f0f1f4</color>
+    <color name="sdk_progress_bar">#6197fd</color>
+    <color name="sdk_progress_text">#bac1cc</color>
 </resources>