Sfoglia il codice sorgente

更改ipu-pathmenu的func功能。删除common和func包里多余文件。

linh 8 anni fa
parent
commit
283832a95f

+ 6 - 0
display-client/AndroidManifest.xml

@ -41,6 +41,7 @@
41 41
    <uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" />
42 42
    <uses-permission android:name="android.permission.WAKE_LOCK" />
43 43
    
44
     <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /><!-- 悬浮菜单 -->
44 45
    <!-- NFC -->
45 46
    <uses-permission android:name="android.permission.NFC" />
46 47
    <uses-feature android:name="android.hardware.nfc" android:required="true" />
@ -275,6 +276,11 @@
275 276
            </intent-filter>
276 277
        </service>
277 278
        <!-- End -->
279
        
280
        <!-- PathMenu Start-->
281
          <service android:name="com.ai.ipu.ipu_pathmenu.PathMenuService" >
282
        </service>
283
        <!-- PathMenu End -->
278 284
    </application>
279 285

280 286
</manifest>

+ 2 - 2
display-client/assets/mobile-action.xml

@ -172,6 +172,6 @@
172 172
    <action name="openActivityFromPlugin" class="com.ai.ipu.func.MobileOpenApp" method="openActivityFromPlugin"></action>
173 173

174 174
    	<!-- PathMenu -->
175
	<action name="openPathMenu" class="com.wade.mobile.func.MobilePathMenu" method="openPathMenu"></action>
176
	<action name="closePathMenu" class="com.wade.mobile.func.MobilePathMenu" method="closePathMenu"></action>
175
	<action name="openPathMenu" class="com.ai.ipu.ipu_pathmenu.func.MobilePathMenu" method="openPathMenu"></action>
176
	<action name="closePathMenu" class="com.ai.ipu.ipu_pathmenu.func.MobilePathMenu" method="closePathMenu"></action>
177 177
</actions>

+ 6 - 6
display-server/web/biz/js/plugin/pathmenu.js

@ -1,12 +1,12 @@
1 1
    require(["domReady!","wadeMobile","mobile","util"], function(doc,WadeMobile,Mobile){
2 2
 		var param = Wade.DataMap();
3 3
		$("#openPathMenu").tap(function(){
4
			param.put("composer_close",0x7f020005);
5
			param.put("composer_music",0x7f020007);
6
			param.put("composer_place",0x7f020008);
7
			param.put("composer_sleep",0x7f020009);
8
			param.put("composer_thought",0x7f02000a);
9
			param.put("composer_with",0x7f02000b);
4
			param.put("composer_close",0x7f020004);
5
			param.put("composer_music",0x7f020006);
6
			param.put("composer_place",0x7f020007);
7
			param.put("composer_sleep",0x7f020008);
8
			param.put("composer_thought",0x7f020009);
9
			param.put("composer_with",0x7f02000a);
10 10
		 	WadeMobile.openPathMenu(param);
11 11
    	});
12 12


BIN
ipu-pathmenu/libs/wade-mobile.jar


+ 1 - 1
ipu-pathmenu/src/com/ai/ipu/ipu_pathmenu/PathMenu.java

@ -87,7 +87,7 @@ public class PathMenu extends FrameLayout implements OnTouchListener {
87 87
		mScreenHeight = dm.heightPixels - getStatusBarHeight();
88 88
		this.mWmParams = new WindowManager.LayoutParams();// 获取窗口参数
89 89
90
		if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
90
		if (Build.VERSION.SDK_INT <= 19) {
91 91
			mWmParams.type = WindowManager.LayoutParams.TYPE_TOAST;// 等于API19或API19以下需要指定窗口参数type值为TYPE_TOAST才可以作为悬浮控件显示出来
92 92
		} else {
93 93
			mWmParams.type = WindowManager.LayoutParams.TYPE_PHONE;// API19以上侧只需指定为TYPE_PHONE即可

+ 6 - 6
ipu-pathmenu/src/com/ai/ipu/ipu_pathmenu/PathMenuService.java

@ -58,29 +58,29 @@ public class PathMenuService extends Service {
58 58
						break;
59 59
 
60 60
					case 1:
61
						Toast.makeText(PathMenuService.this, "第1个被点击",
61
						Toast.makeText(PathMenuService.this, "第2个被点击",
62 62
								Toast.LENGTH_SHORT).show();
63 63
						break;
64 64
						
65 65
					case 2:
66
						Toast.makeText(PathMenuService.this, "第2个被点击",
66
						Toast.makeText(PathMenuService.this, "第3个被点击",
67 67
								Toast.LENGTH_SHORT).show();
68 68
						break;
69 69
 
70 70
					case 3:
71
						Toast.makeText(PathMenuService.this, "第3个被点击",
71
						Toast.makeText(PathMenuService.this, "第4个被点击",
72 72
								Toast.LENGTH_SHORT).show();
73 73
						break;
74 74
					case 4:
75
						Toast.makeText(PathMenuService.this, "第4个被点击",
75
						Toast.makeText(PathMenuService.this, "第5个被点击",
76 76
								Toast.LENGTH_SHORT).show();
77 77
						break;
78 78
					case 5:
79
						Toast.makeText(PathMenuService.this, "第5个被点击",
79
						Toast.makeText(PathMenuService.this, "第6个被点击",
80 80
								Toast.LENGTH_SHORT).show();
81 81
						break;
82 82
					case 6:
83
						Toast.makeText(PathMenuService.this, "第6个被点击",
83
						Toast.makeText(PathMenuService.this, "第7个被点击",
84 84
								Toast.LENGTH_SHORT).show();
85 85
						break;
86 86
						

+ 1 - 3
wade-mobile-func/src/com/wade/mobile/func/MobilePathMenu.java

@ -1,11 +1,10 @@
1
package com.wade.mobile.func;
1
package com.ai.ipu.ipu_pathmenu.func;
2 2

3 3
import org.json.JSONArray;
4 4
import org.json.JSONObject;
5 5

6 6
import android.content.Intent;
7 7

8
import com.ai.ipu.ipu_pathmenu.PathMenu;
9 8
import com.ai.ipu.ipu_pathmenu.PathMenuService;
10 9
import com.wade.mobile.frame.IWadeMobile;
11 10
import com.wade.mobile.frame.plugin.Plugin;
@ -22,7 +21,6 @@ public class MobilePathMenu extends Plugin {
22 21
	 * @throws Exception
23 22
	 */
24 23
	public void openPathMenu(JSONArray param) throws Exception {
25

26 24
		JSONObject jsonObject = param.getJSONObject(0);
27 25
		JSONObject map = jsonObject.getJSONObject("map");
28 26
		int[] menuIcons = new int[map.length()];

+ 1 - 1
wade-mobile-common/project.properties

@ -11,5 +11,5 @@
11 11
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12 12
13 13
# Project target.
14
target=android-15
14
target=android-21
15 15
android.library=true

BIN
wade-mobile-common/res/drawable/composer_button.png


BIN
wade-mobile-common/res/drawable/composer_camera.png


BIN
wade-mobile-common/res/drawable/composer_close.png


BIN
wade-mobile-common/res/drawable/composer_icn_plus.png


BIN
wade-mobile-common/res/drawable/composer_music.png


BIN
wade-mobile-common/res/drawable/composer_place.png


BIN
wade-mobile-common/res/drawable/composer_sleep.png


BIN
wade-mobile-common/res/drawable/composer_thought.png


BIN
wade-mobile-common/res/drawable/composer_with.png


+ 0 - 28
wade-mobile-common/res/layout/activity_float.xml

@ -1,28 +0,0 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
3
    xmlns:arc="http://schemas.android.com/apk/res-auto"
4
    android:layout_width="fill_parent"
5
    android:layout_height="fill_parent" >
6

7
    <LinearLayout
8
        android:layout_width="fill_parent"
9
        android:layout_height="wrap_content"
10
        android:orientation="vertical" >
11

12
        <Button
13
            android:id="@+id/btnOpenFloat"
14
            android:layout_width="wrap_content"
15
            android:layout_height="wrap_content"
16
            android:layout_weight="1"
17
            android:text="open float menu" />
18

19
        <Button
20
            android:id="@+id/btnCloseFloat"
21
            android:layout_width="wrap_content"
22
            android:layout_height="wrap_content"
23
            android:layout_weight="1"
24
            android:text="close float menu" />
25

26
    </LinearLayout>
27

28
</ScrollView>

+ 0 - 29
wade-mobile-common/res/layout/float_menu.xml

@ -1,29 +0,0 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<merge xmlns:android="http://schemas.android.com/apk/res/android" >
3

4
    <com.ai.ipu.ipu_pathmenu.PathMenuLayout
5
        xmlns:custom="http://schemas.android.com/apk/res-auto"
6
        android:id="@+id/item_layout"
7
        android:layout_width="wrap_content"
8
        android:layout_height="wrap_content"
9
        android:layout_centerInParent="true"
10
        custom:fromDegrees="270.0"
11
        custom:toDegrees="360.0" />
12

13
    <FrameLayout
14
        android:id="@+id/control_layout"
15
        android:layout_width="wrap_content"
16
        android:layout_height="wrap_content"
17
        android:layout_centerInParent="true"
18
        android:background="@drawable/composer_button" >
19

20
        <ImageView
21
            android:id="@+id/control_hint"
22
            android:layout_width="wrap_content"
23
            android:layout_height="wrap_content"
24
            android:layout_gravity="center"
25
            android:duplicateParentState="true"
26
            android:src="@drawable/composer_icn_plus" />
27
    </FrameLayout>
28

29
</merge>

+ 1 - 1
wade-mobile-lib/project.properties

@ -11,5 +11,5 @@
11 11
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12 12
13 13
# Project target.
14
target=android-15
14
target=android-21
15 15
android.library=true