Commit f53f15711d7186273c54830f077e6028fccb2263
1 parent
c888d88aa9
Exists in
master
v3.3.11
增加fb web登录 修改若干可能的bug
Showing 4 changed files with 16 additions and 11 deletions Side-by-side Diff
android/GameSDKRelease/libs/GameSDK_v3.3.10_proguard.jar
No preview for this file type
android/GameSDKRelease/libs/GameSDK_v3.3.11_proguard.jar
No preview for this file type
android/GameSDKRelease/res/layout/fragment_web.xml
| 1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 2 | +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | 3 | android:layout_width="match_parent" |
| 4 | 4 | android:layout_height="match_parent" |
| 5 | 5 | android:background="@android:color/white" |
| 6 | + android:minHeight="300dp" | |
| 6 | 7 | android:minWidth="293dp" |
| 7 | 8 | android:orientation="vertical" > |
| 8 | 9 | |
| 9 | - <ProgressBar | |
| 10 | - android:id="@+id/loading_prog" | |
| 11 | - style="@android:style/Widget.ProgressBar.Horizontal" | |
| 12 | - android:layout_width="match_parent" | |
| 13 | - android:layout_height="2dp" /> | |
| 14 | - | |
| 15 | 10 | <WebView |
| 16 | 11 | android:id="@+id/mycard_web" |
| 17 | 12 | android:layout_width="fill_parent" |
| 18 | 13 | android:layout_height="fill_parent" /> |
| 19 | 14 | |
| 20 | -</LinearLayout> | |
| 21 | 15 | \ No newline at end of file |
| 16 | + <ProgressBar | |
| 17 | + android:id="@+id/loading_prog" | |
| 18 | + android:layout_gravity="center" | |
| 19 | + style="?android:attr/progressBarStyleLarge" | |
| 20 | + android:background="#59000000" | |
| 21 | + android:layout_width="wrap_content" | |
| 22 | + android:layout_height="wrap_content" /> | |
| 23 | + | |
| 24 | +</FrameLayout> | |
| 22 | 25 | \ No newline at end of file |
android/GameSDKSample/src/com/gumptech/loginsdk/sample/MainActivity.java
| ... | ... | @@ -28,8 +28,8 @@ public class MainActivity extends Activity implements PurchaseCallback{ |
| 28 | 28 | |
| 29 | 29 | private Button btnLoginOrLogout; |
| 30 | 30 | |
| 31 | - private String appId = "10031"; | |
| 32 | - private String appKey = "d2cb583f4b5bdc51b965ae555ee6bca5"; | |
| 31 | + private String appId = "10022"; | |
| 32 | + private String appKey = "93a27b0bd99bac3e68a440b48aa421ab"; | |
| 33 | 33 | private String sessionKey; |
| 34 | 34 | |
| 35 | 35 | @Override |
| ... | ... | @@ -70,7 +70,7 @@ public class MainActivity extends Activity implements PurchaseCallback{ |
| 70 | 70 | /** |
| 71 | 71 | * 设置是否启用facebook登录 |
| 72 | 72 | */ |
| 73 | - GumpSDK.setFBEnable(false); | |
| 73 | + GumpSDK.setFBEnable(true); | |
| 74 | 74 | /** |
| 75 | 75 | * 设置是否启用Vk登录 |
| 76 | 76 | */ |
| ... | ... | @@ -82,6 +82,8 @@ public class MainActivity extends Activity implements PurchaseCallback{ |
| 82 | 82 | /** |
| 83 | 83 | * 设置用户登录状态监听器 |
| 84 | 84 | */ |
| 85 | + | |
| 86 | +// GumpSDK.forceFBWithWeb(); | |
| 85 | 87 | GumpSDK.setUserStateListener(new LoginStateListener() { |
| 86 | 88 | @Override |
| 87 | 89 | public void onLoginSuccess(GumpUser user) { |