Permalink
Browse files

* [android] modify code review case

  • Loading branch information...
1 parent 12e14d1 commit bbb3e30feb2aec620495934f7c61f674443aef77 @zshshr zshshr committed Jan 4, 2017
View
@@ -35,21 +35,4 @@ android/playground/app/gradlew
android/playground/app/gradlew.bat
android/playground/app/gradle/wrapper/gradle-wrapper.jar
android/playground/app/gradle/wrapper/gradle-wrapper.properties
-android/sdk/.externalNativeBuild/ndkBuild/debug/armeabi/android_gradle_build.json
-android/sdk/.externalNativeBuild/ndkBuild/debug/armeabi/ndkBuild_build_command.txt
-android/sdk/.externalNativeBuild/ndkBuild/debug/armeabi/ndkBuild_build_output.txt
-android/sdk/.externalNativeBuild/ndkBuild/debug/armeabi-v7a/android_gradle_build.json
-android/sdk/.externalNativeBuild/ndkBuild/debug/armeabi-v7a/ndkBuild_build_command.txt
-android/sdk/.externalNativeBuild/ndkBuild/debug/armeabi-v7a/ndkBuild_build_output.txt
-android/sdk/.externalNativeBuild/ndkBuild/debug/x86/android_gradle_build.json
-android/sdk/.externalNativeBuild/ndkBuild/debug/x86/ndkBuild_build_command.txt
-android/sdk/.externalNativeBuild/ndkBuild/debug/x86/ndkBuild_build_output.txt
-android/sdk/.externalNativeBuild/ndkBuild/release/armeabi/android_gradle_build.json
-android/sdk/.externalNativeBuild/ndkBuild/release/armeabi/ndkBuild_build_command.txt
-android/sdk/.externalNativeBuild/ndkBuild/release/armeabi/ndkBuild_build_output.txt
-android/sdk/.externalNativeBuild/ndkBuild/release/armeabi-v7a/android_gradle_build.json
-android/sdk/.externalNativeBuild/ndkBuild/release/armeabi-v7a/ndkBuild_build_command.txt
-android/sdk/.externalNativeBuild/ndkBuild/release/armeabi-v7a/ndkBuild_build_output.txt
-android/sdk/.externalNativeBuild/ndkBuild/release/x86/android_gradle_build.json
-android/sdk/.externalNativeBuild/ndkBuild/release/x86/ndkBuild_build_command.txt
-android/sdk/.externalNativeBuild/ndkBuild/release/x86/ndkBuild_build_output.txt
+android/sdk/.externalNativeBuild/ndkBuild/
@@ -5,17 +5,10 @@
import com.taobao.weex.annotation.JSMethod;
import com.taobao.weex.common.WXModule;
-import java.util.HashMap;
-import java.util.Map;
-
public class MyModule extends WXModule {
@JSMethod(uiThread = true)
- public Object printLog(String msg) {
+ public void printLog(String msg) {
Toast.makeText(mWXSDKInstance.getContext(),msg,Toast.LENGTH_SHORT).show();
- Map map = new HashMap();
- map.put("11","weex");
- map.put("22","RN");
- return map;
}
}
@@ -249,7 +249,7 @@
*/
public static boolean sDebugMode = false;
public static String sDebugWsUrl = "";
- public static boolean sDebugServerConnectable = false;
+ public static boolean sDebugServerConnectable = true;
public static boolean sRemoteDebugMode = false;
public static String sRemoteDebugProxyUrl = "";
public static long sJSLibInitTime = 0;
@@ -232,7 +232,6 @@ public Object invoke(final Object target,final Invoker invoker,JSONArray args) t
public void run() {
try {
invoker.invoke(target, params);
-
} catch (Exception e) {
throw new RuntimeException(e);
}
@@ -285,8 +285,6 @@ public static boolean initSo(String libName, int version, IWXUserTrackAdapter ut
boolean InitSuc = false;
-// if (checkSoIsValid(libName, ARMEABI_Size) || checkSoIsValid(libName, X86_Size)) {
-
/**
* Load library with {@link System#loadLibrary(String)}
*/
@@ -333,7 +331,6 @@ public static boolean initSo(String libName, int version, IWXUserTrackAdapter ut
InitSuc = false;
e.printStackTrace();
}
-// }
return InitSuc;
}
@@ -1,68 +0,0 @@
-<template>
- <div>
- <synccomponent class="group" id="synctest" onclick="onclickSyncTest">
- <text class="title">synccomponent</text>
- <text class="result">{{number}}</text>
- </synccomponent>
- <div class="group">
- <text class="title">getString():</text>
- <text class="result">{{string}}</text>
- </div>
- <div class="group">
- <text class="title">getArray():</text>
- <text class="result" repeat="str in array">{{$index}}. {{str}}</text>
- </div>
- <div class="group">
- <text class="title">getObject():</text>
- <text class="result">{{object}}</text>
- </div>
- </div>
-</template>
-
-<script>
- var syncTest = require('@weex-module/syncTest')
- // console.log('syncTest:', syncTest)
-
-
- module.exports = {
- data: {
- string: '',
- number: 0,
- array: ['none'],
- object: { empty: true }
- },
- created: function () {
- this.string = syncTest.getString()
- this.number = syncTest.getNumber()
- this.array = syncTest.getArray()
- this.object = JSON.stringify(syncTest.getObject())
- },
- methods: {
- onclickSyncTest: function(){
- this.$el("synctest").testSyncCall();
- this.$el("synctest").testAsyncCall();
- }
-
- }
- }
-</script>
-
-<style>
- .group {
- padding-top: 20px;
- padding-bottom: 20px;
- padding-left: 40px;
- padding-right: 40px;
- border-bottom-width: 2px;
- border-bottom-style: solid;
- border-bottom-color: #DDD;
- }
- .title {
- color: #666666;
- font-size: 50px;
- }
- .result {
- padding-left: 20px;
- font-size: 40px;
- }
-</style>

0 comments on commit bbb3e30

Please sign in to comment.