Bläddra i källkod

友盟的一些库

xiongxiaohe 8 år sedan
förälder
incheckning
dd1c5937d3
42 ändrade filer med 560 tillägg och 120 borttagningar
  1. 6 0
      .idea/gradle.xml
  2. 25 10
      app/build.gradle
  3. BIN
      app/libs/SocialSDK_QQ_Full.jar
  4. BIN
      app/libs/SocialSDK_WeiXin_Full.jar
  5. BIN
      app/libs/open_sdk_r5923_lite.jar
  6. BIN
      app/libs/umeng_shareboard_widget.jar
  7. BIN
      app/libs/umeng_social_api.jar
  8. BIN
      app/libs/umeng_social_net.jar
  9. BIN
      app/libs/umeng_social_shareboard.jar
  10. BIN
      app/libs/umeng_social_tool.jar
  11. BIN
      app/libs/wechat-sdk-android-with-mta-1.1.6.jar
  12. 10 6
      app/src/main/AndroidManifest.xml
  13. 0 3
      app/src/main/java/com/sheep/gamegroup/presenter/PhonePresenter.java
  14. 11 0
      app/src/main/java/com/sheep/gamegroup/umeng/UMLogin.java
  15. 24 0
      app/src/main/java/com/sheep/gamegroup/util/StringUtils.java
  16. 132 0
      app/src/main/java/com/sheep/gamegroup/view/activity/AskGetMoneyAct.java
  17. 1 1
      app/src/main/java/com/sheep/gamegroup/view/activity/AskRewardAct.java
  18. 63 5
      app/src/main/java/com/sheep/gamegroup/view/activity/LoginAct.java
  19. 11 0
      app/src/main/java/com/sheep/jiuyan/samllsheep/BaseApplication.java
  20. 2 1
      app/src/main/java/com/sheep/jiuyan/samllsheep/base/BaseActivity.java
  21. 2 94
      app/src/main/java/com/sheep/jiuyan/samllsheep/wxapi/WXEntryActivity.java
  22. BIN
      app/src/main/res/drawable/umeng_socialize_back_icon.png
  23. 11 0
      app/src/main/res/drawable/umeng_socialize_btn_bg.xml
  24. BIN
      app/src/main/res/drawable/umeng_socialize_copy.png
  25. BIN
      app/src/main/res/drawable/umeng_socialize_copyurl.png
  26. BIN
      app/src/main/res/drawable/umeng_socialize_delete.png
  27. 11 0
      app/src/main/res/drawable/umeng_socialize_edit_bg.xml
  28. BIN
      app/src/main/res/drawable/umeng_socialize_fav.png
  29. BIN
      app/src/main/res/drawable/umeng_socialize_menu_default.png
  30. BIN
      app/src/main/res/drawable/umeng_socialize_more.png
  31. BIN
      app/src/main/res/drawable/umeng_socialize_qq.png
  32. BIN
      app/src/main/res/drawable/umeng_socialize_qzone.png
  33. BIN
      app/src/main/res/drawable/umeng_socialize_share_music.png
  34. BIN
      app/src/main/res/drawable/umeng_socialize_share_video.png
  35. BIN
      app/src/main/res/drawable/umeng_socialize_share_web.png
  36. BIN
      app/src/main/res/drawable/umeng_socialize_wechat.png
  37. BIN
      app/src/main/res/drawable/umeng_socialize_wxcircle.png
  38. 25 0
      app/src/main/res/layout/socialize_share_menu_item.xml
  39. 121 0
      app/src/main/res/layout/umeng_socialize_oauth_dialog.xml
  40. 5 0
      app/src/main/res/layout/xask_getmoney_act_layout.xml
  41. 18 0
      app/src/main/res/values/umeng_socialize_colors.xml
  42. 82 0
      app/src/main/res/values/umeng_socialize_style.xml

+ 6 - 0
.idea/gradle.xml

@@ -5,6 +5,12 @@
       <GradleProjectSettings>
         <option name="distributionType" value="DEFAULT_WRAPPED" />
         <option name="externalProjectPath" value="$PROJECT_DIR$" />
+        <option name="modules">
+          <set>
+            <option value="$PROJECT_DIR$" />
+            <option value="$PROJECT_DIR$/app" />
+          </set>
+        </option>
         <option name="resolveModulePerSourceSet" value="false" />
       </GradleProjectSettings>
     </option>

+ 25 - 10
app/build.gradle

@@ -20,6 +20,9 @@ android {
             enabled true
         }
         multiDexEnabled true
+
+
+
     }
     compileOptions{
         sourceCompatibility org.gradle.api.JavaVersion.VERSION_1_8
@@ -54,9 +57,13 @@ repositories {
 }
 
 dependencies {
+
     //    compile fileTree(include: ['*.jar'], dir: 'libs')
+
     //    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
+
     //        exclude group: 'com.android.support', module: 'support-annotations'
+
     //    })
     compile 'com.android.support:appcompat-v7:27.0.2'
     compile 'com.android.support:support-v4:27.0.2'
@@ -71,8 +78,10 @@ dependencies {
     compile 'org.greenrobot:eventbus:3.1.1'
     compile 'com.zhy:base-adapter:3.0.3'
     compile 'com.liulishuo.filedownloader:library:1.6.9'
-    compile 'com.tencent.bugly:crashreport_upgrade:latest.release'//其中latest.release指代最新版本号,也可以指定明确的版本号,例如1.2.0
-    compile 'com.tencent.bugly:nativecrashreport:latest.release' //其中latest.release指代最
+    compile 'com.tencent.bugly:crashreport_upgrade:latest.release'
+    //其中latest.release指代最新版本号,也可以指定明确的版本号,例如1.2.0
+    compile 'com.tencent.bugly:nativecrashreport:latest.release'
+    //其中latest.release指代最
     compile 'com.tencent.mm.opensdk:wechat-sdk-android-with-mta:+'
     debugCompile 'com.readystatesoftware.chuck:library:1.1.0'
     compile 'de.hdodenhof:circleimageview:2.2.0'
@@ -83,13 +92,14 @@ dependencies {
     compile 'com.github.huburt-Hu:NewbieGuide:v1.2.0'
     compile 'com.android.support:multidex:1.0.1'
     compile(name: 'com.kfzs.safe', ext: 'aar')
-
     //butterknife
     compile 'com.jakewharton:butterknife:+'
     annotationProcessor 'com.jakewharton:butterknife-compiler:+'
     //dagger2
-//    compile 'com.google.dagger:dagger:+'
-//    compile 'com.google.dagger:dagger-compiler:+'
+
+    //    compile 'com.google.dagger:dagger:+'
+
+    //    compile 'com.google.dagger:dagger-compiler:+'
     provided 'org.glassfish:javax.annotation:+'
     compile 'com.google.dagger:dagger:2.12'
     annotationProcessor 'com.google.dagger:dagger-compiler:2.12'
@@ -97,22 +107,27 @@ dependencies {
     compile 'com.squareup.retrofit2:retrofit:+'
     compile 'com.squareup.retrofit2:converter-gson:+'
     compile 'com.squareup.okhttp3:logging-interceptor:+'
-//    compile 'com.squareup.retrofit2:adapter-rxjava2:+'
+    //    compile 'com.squareup.retrofit2:adapter-rxjava2:+'
     compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
     //rxjava
     compile 'io.reactivex.rxjava2:rxandroid:+'
     compile 'io.reactivex.rxjava2:rxjava:+'
     //获取动态权限三方库
     compile 'pub.devrel:easypermissions:+'
-
     compile 'net.danlew:android.joda:2.9.3'
     compile 'com.orhanobut:logger:1.15'
-
     //友盟
     compile 'com.umeng.sdk:common:latest.integration'
     compile 'com.umeng.sdk:analytics:latest.integration'
-
     //fast json
     compile 'com.alibaba:fastjson:+'
-
+    compile files('libs/open_sdk_r5923_lite.jar')
+    compile files('libs/wechat-sdk-android-with-mta-1.1.6.jar')
+    compile files('libs/umeng_social_tool.jar')
+    compile files('libs/umeng_social_shareboard.jar')
+    compile files('libs/umeng_social_net.jar')
+    compile files('libs/umeng_social_api.jar')
+    compile files('libs/umeng_shareboard_widget.jar')
+    compile files('libs/SocialSDK_WeiXin_Full.jar')
+    compile files('libs/SocialSDK_QQ_Full.jar')
 }

BIN
app/libs/SocialSDK_QQ_Full.jar


BIN
app/libs/SocialSDK_WeiXin_Full.jar


BIN
app/libs/open_sdk_r5923_lite.jar


BIN
app/libs/umeng_shareboard_widget.jar


BIN
app/libs/umeng_social_api.jar


BIN
app/libs/umeng_social_net.jar


BIN
app/libs/umeng_social_shareboard.jar


BIN
app/libs/umeng_social_tool.jar


BIN
app/libs/wechat-sdk-android-with-mta-1.1.6.jar


+ 10 - 6
app/src/main/AndroidManifest.xml

@@ -178,11 +178,7 @@
             android:name=".page.SplashActivity"
             android:screenOrientation="portrait">
 
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN"/>
 
-                <category android:name="android.intent.category.LAUNCHER"/>
-            </intent-filter>
         </activity>
         <activity
             android:name="com.sheep.gamegroup.view.activity.AskRewardAct"
@@ -202,7 +198,13 @@
         </activity>
 
         <!--2.0-->
-        <activity android:name="com.sheep.gamegroup.view.activity.LoginAct"/>
+        <activity android:name="com.sheep.gamegroup.view.activity.LoginAct">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN"/>
+                <category android:name="android.intent.category.LAUNCHER"/>
+            </intent-filter>
+            </activity>
+
         <activity android:name="com.sheep.gamegroup.view.activity.PhoneAct"/>
         <activity android:name="com.sheep.gamegroup.view.activity.PersonalCenterAct"/>
         <activity android:name="com.sheep.gamegroup.view.activity.WithdrawalAct"/>
@@ -225,7 +227,9 @@
         </service>
 
         <!--友盟start-->
-        <meta-data android:value="xx" android:name="UMENG_APPKEY"/>
+        <meta-data
+            android:name="UMENG_APPKEY"
+            android:value="58edcfeb310c93091c000be2"></meta-data>
         <meta-data android:value="xxx" android:name="UMENG_CHANNEL"/>
         <!--友盟end-->
     </application>

+ 0 - 3
app/src/main/java/com/sheep/gamegroup/presenter/PhonePresenter.java

@@ -84,7 +84,6 @@ public class PhonePresenter implements PhoneContract.Presenter {
         com.alibaba.fastjson.JSONObject m = new com.alibaba.fastjson.JSONObject();
         m.put("account",telphone);
         m.put("sec_code",code);
-
         apiService.loginByCaptcha(m)
                 .subscribeOn(Schedulers.io())
                 .subscribe(new Observer<BaseMessage>() {
@@ -102,8 +101,6 @@ public class PhonePresenter implements PhoneContract.Presenter {
 
                     @Override
                     public void onNext(BaseMessage jsonObject) {
-//                        Log.e("onNext--------","onNext:"+jsonObject.toString());
-
                         view.returnLogindata(jsonObject);
 
                     }

+ 11 - 0
app/src/main/java/com/sheep/gamegroup/umeng/UMLogin.java

@@ -0,0 +1,11 @@
+package com.sheep.gamegroup.umeng;
+
+/**
+ * Created by Administrator on 2018/3/19.
+ */
+
+public class UMLogin {
+
+
+
+}

+ 24 - 0
app/src/main/java/com/sheep/gamegroup/util/StringUtils.java

@@ -0,0 +1,24 @@
+package com.sheep.gamegroup.util;
+
+import android.content.Context;
+import android.text.ClipboardManager;
+
+/**
+ * Created by Administrator on 2018/3/19.
+ */
+
+public class StringUtils {
+    /**
+     * 拷贝文字到粘贴板
+     * @param context
+     * @param text
+     */
+    public static void  CopyText(Context context,String  text){
+        ClipboardManager cm = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
+        cm.setText(text);
+    }
+
+
+
+
+}

+ 132 - 0
app/src/main/java/com/sheep/gamegroup/view/activity/AskGetMoneyAct.java

@@ -0,0 +1,132 @@
+package com.sheep.gamegroup.view.activity;
+
+import android.os.Bundle;
+import android.view.View;
+import android.widget.RelativeLayout;
+import android.widget.TextView;
+
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.base.BaseActivity;
+import com.umeng.socialize.ShareAction;
+import com.umeng.socialize.UMShareListener;
+import com.umeng.socialize.bean.SHARE_MEDIA;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.OnClick;
+
+/**
+ * Created by Administrator on 2018/3/19.
+ */
+
+public class AskGetMoneyAct extends BaseActivity  implements UMShareListener {
+
+
+    @BindView(R.id.tv_size)
+    TextView tvSize;
+    @BindView(R.id.tv_money)
+    TextView tvMoney;
+    @BindView(R.id.rl_wx)
+    RelativeLayout rlWx;
+    @BindView(R.id.rl_qq)
+    RelativeLayout rlQq;
+    @BindView(R.id.rl_qr)
+    RelativeLayout rlQr;
+    @BindView(R.id.rl_link)
+    RelativeLayout rlLink;
+
+    /**
+     * 分享的链接地址
+     */
+    private  String  mShareLink;
+    @Override
+    protected int getLayoutId() {
+        return R.layout.x_ask_getmoney_act_layout;
+    }
+
+    @Override
+    public void initView() {
+
+    }
+
+    @Override
+    public void initListener() {
+
+    }
+
+    @Override
+    public void initData() {
+
+    }
+
+
+    @OnClick({R.id.rl_wx, R.id.rl_qq, R.id.rl_qr, R.id.rl_link})
+    public void onViewClicked(View view) {
+        switch (view.getId()) {
+            case R.id.rl_wx:
+                shareToWX();
+                break;
+            case R.id.rl_qq:
+                shareToQQ();
+                break;
+            case R.id.rl_qr:
+                shareToQR();
+                break;
+            case R.id.rl_link:
+                shareToLink();
+                break;
+        }
+    }
+
+    private  void  shareToWX(){
+        new ShareAction(AskGetMoneyAct.this)
+                .setPlatform(SHARE_MEDIA.WEIXIN)//传入平台
+                .withText(mShareLink)//分享内容
+                .setCallback(this)//回调监听器
+                .share();
+
+    }
+
+
+    private  void  shareToQQ(){
+        new ShareAction(AskGetMoneyAct.this)
+                .setPlatform(SHARE_MEDIA.QQ)//传入平台
+                .withText(mShareLink)//分享内容
+                .setCallback(this)//回调监听器
+                .share();
+
+    }
+
+
+    private  void  shareToQR(){
+
+
+    }
+
+
+    private  void  shareToLink(){
+
+
+    }
+
+
+    @Override
+    public void onStart(SHARE_MEDIA share_media) {
+
+    }
+
+    @Override
+    public void onResult(SHARE_MEDIA share_media) {
+
+    }
+
+    @Override
+    public void onError(SHARE_MEDIA share_media, Throwable throwable) {
+
+    }
+
+    @Override
+    public void onCancel(SHARE_MEDIA share_media) {
+
+    }
+}

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/view/activity/AskRewardAct.java

@@ -12,7 +12,7 @@ public class AskRewardAct extends BaseActivity {
 
     @Override
     protected int getLayoutId() {
-        return R.layout.xask_getmoney_act_layout;
+        return R.layout.x_ask_getmoney_act_layout;
     }
 
     @Override

+ 63 - 5
app/src/main/java/com/sheep/gamegroup/view/activity/LoginAct.java

@@ -1,11 +1,15 @@
 package com.sheep.gamegroup.view.activity;
 
+import android.Manifest;
 import android.app.Activity;
 import android.content.Intent;
 import android.content.res.Resources;
+import android.os.Build;
 import android.os.Bundle;
+import android.support.v4.app.ActivityCompat;
 import android.view.View;
 import android.widget.TextView;
+import android.widget.Toast;
 
 import com.sheep.gamegroup.di.components.DaggerLoginComponent;
 import com.sheep.gamegroup.di.components.LoginComponent;
@@ -17,6 +21,13 @@ import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.base.BaseActivity;
 import com.sheep.jiuyan.samllsheep.page.MainActivity;
 import com.sheep.jiuyan.samllsheep.wxapi.WXEntryActivity;
+import com.umeng.socialize.UMAuthListener;
+import com.umeng.socialize.UMShareAPI;
+import com.umeng.socialize.bean.SHARE_MEDIA;
+import com.umeng.socialize.utils.SocializeUtils;
+import com.uuzuche.lib_zxing.decoding.Intents;
+
+import java.util.Map;
 
 import butterknife.BindView;
 import butterknife.ButterKnife;
@@ -47,10 +58,26 @@ public class LoginAct extends BaseActivity implements LoginContract.View{
                 .loginModule(new LoginModule(this))
                 .build()
         .inject(this);
-        ButterKnife.bind(this);
         setTvBg(R.id.weixin_login_tv);
     }
 
+
+    private  void  requestPremiss(){
+        if(Build.VERSION.SDK_INT>=23){
+            String[] mPermissionList = new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE,Manifest.permission.ACCESS_FINE_LOCATION,Manifest.permission.CALL_PHONE,Manifest.permission.READ_LOGS,Manifest.permission.READ_PHONE_STATE, Manifest.permission.READ_EXTERNAL_STORAGE,Manifest.permission.SET_DEBUG_APP,Manifest.permission.SYSTEM_ALERT_WINDOW,Manifest.permission.GET_ACCOUNTS,Manifest.permission.WRITE_APN_SETTINGS};
+            ActivityCompat.requestPermissions(this,mPermissionList,123);
+        }
+    }
+
+    @Override
+    public void onRequestPermissionsResult(int requestCode,
+                                           String permissions[], int[] grantResults) {
+
+
+    }
+
+
+
     @Override
     public void initListener() {
 
@@ -58,7 +85,7 @@ public class LoginAct extends BaseActivity implements LoginContract.View{
 
     @Override
     public void initData() {
-
+        requestPremiss();
     }
 
 
@@ -76,6 +103,9 @@ public class LoginAct extends BaseActivity implements LoginContract.View{
         }
     }
 
+
+
+
     private void goTelLogin() {
         Intent intent = new Intent(activity, PhoneAct.class);
         startActivity(intent);
@@ -83,9 +113,37 @@ public class LoginAct extends BaseActivity implements LoginContract.View{
     }
 
     private void goWeixin() {
-        Intent intent = new Intent(activity, WXEntryActivity.class);
-        startActivity(intent);
-//        finish();
+        UMShareAPI.get(this).doOauthVerify(this, SHARE_MEDIA.WEIXIN, new UMAuthListener() {
+            @Override
+            public void onStart(SHARE_MEDIA platform) {
+
+            }
+
+            @Override
+            public void onComplete(SHARE_MEDIA platform, int action, Map<String, String> data) {
+
+            }
+
+            @Override
+            public void onError(SHARE_MEDIA platform, int action, Throwable t) {
+
+            }
+
+            @Override
+            public void onCancel(SHARE_MEDIA platform, int action) {
+
+
+
+            }
+        });
+
+    }
+    @Override
+    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+        super.onActivityResult(requestCode, resultCode, data);
+
+
+
     }
 
     /**

+ 11 - 0
app/src/main/java/com/sheep/jiuyan/samllsheep/BaseApplication.java

@@ -3,6 +3,9 @@ package com.sheep.jiuyan.samllsheep;
 import android.app.Application;
 import android.support.multidex.MultiDexApplication;
 
+import com.umeng.commonsdk.UMConfigure;
+import com.umeng.socialize.PlatformConfig;
+import com.umeng.socialize.UMShareAPI;
 import com.uuzuche.lib_zxing.activity.ZXingLibrary;
 
 import org.xutils.BuildConfig;
@@ -20,5 +23,13 @@ public class BaseApplication extends MultiDexApplication {
         x.Ext.init(this);
         x.Ext.setDebug(BuildConfig.DEBUG); // 是否输出debug日志, 开启debug会影响性能.
         ZXingLibrary.initDisplayOpinion(this);
+        UMConfigure.setLogEnabled(true);
+        UMConfigure.init(this, UMConfigure.DEVICE_TYPE_PHONE, "5ab0a1da8f4a9d742900035f");
+
+        UMShareAPI.get(this);
+        PlatformConfig.setWeixin("wxdc1e388c3822c80b", "3baf1193c85774b3fd9d18447d76cab0");
+        PlatformConfig.setQQZone("100424468", "c7394704798a158208a74ab60104f0ba");
+
+
     }
 }

+ 2 - 1
app/src/main/java/com/sheep/jiuyan/samllsheep/base/BaseActivity.java

@@ -32,10 +32,11 @@ public abstract class BaseActivity extends AppActivity {
     protected void onCreate(@Nullable Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(getLayoutId());
+        ButterKnife.bind(this);
         initView();
         initListener();
         initData();
-//        ButterKnife.bind(this);
+
     }
 
     protected void  showProgress(){

+ 2 - 94
app/src/main/java/com/sheep/jiuyan/samllsheep/wxapi/WXEntryActivity.java

@@ -1,99 +1,7 @@
 package com.sheep.jiuyan.samllsheep.wxapi;
+import com.umeng.socialize.weixin.view.WXCallbackActivity;
 
-import com.sheep.jiuyan.samllsheep.SheepApp;
-import com.tencent.mm.opensdk.constants.ConstantsAPI;
-import com.tencent.mm.opensdk.modelbase.BaseReq;
-import com.tencent.mm.opensdk.modelbase.BaseResp;
-import com.tencent.mm.opensdk.modelmsg.SendAuth;
-import com.tencent.mm.opensdk.openapi.IWXAPIEventHandler;
+public class WXEntryActivity extends WXCallbackActivity {
 
-import android.app.Activity;
-import android.content.Context;
-import android.content.Intent;
-import android.os.Bundle;
-import android.util.Log;
-import android.widget.Toast;
 
-
-public class WXEntryActivity extends Activity implements IWXAPIEventHandler {
-
-    Context mContext;
-    private String TAG = "WXEntryActivity";
-    private static final int RETURN_MSG_TYPE_LOGIN = 1; //登录
-    private static final int RETURN_MSG_TYPE_SHARE = 2; //分享
-
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        mContext = this;
-        //注意:
-        //第三方开发者如果使用透明界面来实现WXEntryActivity,需要判断handleIntent的返回值,如果返回值为false,则说明入参不合法未被SDK处理,应finish当前透明界面,避免外部通过传递非法参数的Intent导致停留在透明界面,引起用户的疑惑
-        try {
-            boolean ok = SheepApp.mWxapi.handleIntent(getIntent(), this);
-            if (!ok) {
-                finish();
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-    @Override
-    protected void onNewIntent(Intent intent) {
-        super.onNewIntent(intent);
-
-        setIntent(intent);
-        SheepApp.mWxapi.handleIntent(intent, this);
-    }
-
-    // 微信发送请求到第三方应用时,会回调到该方法
-    @Override
-    public void onReq(BaseReq req) {
-        switch (req.getType()) {
-            case ConstantsAPI.COMMAND_GETMESSAGE_FROM_WX:
-                break;
-            case ConstantsAPI.COMMAND_SHOWMESSAGE_FROM_WX:
-                break;
-            default:
-                break;
-        }
-    }
-
-    // 第三方应用发送到微信的请求处理后的响应结果,会回调到该方法
-    @Override
-    public void onResp(BaseResp baseResp) {
-        Toast.makeText(this, "baseresp.getType = " + baseResp.getType(), Toast.LENGTH_SHORT).show();
-        Log.e(TAG, "error_code:---->" + baseResp.errCode);
-        int type = baseResp.getType(); //类型:分享还是登录
-        switch (baseResp.errCode) {
-            case BaseResp.ErrCode.ERR_AUTH_DENIED:
-                //用户拒绝授权
-                Toast.makeText(mContext, "拒绝授权微信登录", Toast.LENGTH_SHORT).show();
-            case BaseResp.ErrCode.ERR_USER_CANCEL:
-                //用户取消
-                String message = "";
-                if (type == RETURN_MSG_TYPE_LOGIN) {
-                    message = "取消了微信登录";
-                } else if (type == RETURN_MSG_TYPE_SHARE) {
-                    message = "取消了微信分享";
-                }
-                Toast.makeText(mContext, message, Toast.LENGTH_SHORT).show();
-                break;
-            case BaseResp.ErrCode.ERR_OK:
-                //用户同意
-                if (type == RETURN_MSG_TYPE_LOGIN) {
-                    //用户换取access_token的code,仅在ErrCode为0时有效
-                    String code = ((SendAuth.Resp) baseResp).code;
-                    Log.e(TAG, "code:------>" + code);
-                    System.out.print(code + "--------------");
-
-                    //这里拿到了这个code,去做2次网络请求获取access_token和用户个人信息
-//                    WXLoginUtils().getWXLoginResult(code, this);
-
-                } else if (type == RETURN_MSG_TYPE_SHARE) {
-                    Toast.makeText(mContext, "微信分享成功", Toast.LENGTH_SHORT).show();
-                }
-                break;
-        }
-    }
 }

BIN
app/src/main/res/drawable/umeng_socialize_back_icon.png


+ 11 - 0
app/src/main/res/drawable/umeng_socialize_btn_bg.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape android:shape="rectangle"
+    xmlns:android="http://schemas.android.com/apk/res/android">
+    <solid android:color="@android:color/transparent" />
+    <stroke android:width="1dp"
+        android:color="#ffffff"
+
+        />
+
+
+</shape>

BIN
app/src/main/res/drawable/umeng_socialize_copy.png


BIN
app/src/main/res/drawable/umeng_socialize_copyurl.png


BIN
app/src/main/res/drawable/umeng_socialize_delete.png


+ 11 - 0
app/src/main/res/drawable/umeng_socialize_edit_bg.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape android:shape="rectangle"
+    xmlns:android="http://schemas.android.com/apk/res/android">
+    <solid android:color="@android:color/transparent" />
+    <stroke android:width="1dp"
+        android:color="#C3C6C9"
+
+        />
+
+
+</shape>

BIN
app/src/main/res/drawable/umeng_socialize_fav.png


BIN
app/src/main/res/drawable/umeng_socialize_menu_default.png


BIN
app/src/main/res/drawable/umeng_socialize_more.png


BIN
app/src/main/res/drawable/umeng_socialize_qq.png


BIN
app/src/main/res/drawable/umeng_socialize_qzone.png


BIN
app/src/main/res/drawable/umeng_socialize_share_music.png


BIN
app/src/main/res/drawable/umeng_socialize_share_video.png


BIN
app/src/main/res/drawable/umeng_socialize_share_web.png


BIN
app/src/main/res/drawable/umeng_socialize_wechat.png


BIN
app/src/main/res/drawable/umeng_socialize_wxcircle.png


+ 25 - 0
app/src/main/res/layout/socialize_share_menu_item.xml

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:gravity="center"
+    android:orientation="vertical">
+
+    <com.umeng.socialize.shareboard.SocializeImageView
+        android:id="@+id/socialize_image_view"
+        android:layout_width="50dp"
+        android:layout_height="50dp"
+        android:padding="5dp"
+        android:src="@drawable/umeng_socialize_menu_default" />
+
+    <TextView
+        android:id="@+id/socialize_text_view"
+        android:layout_width="63dp"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="6dp"
+        android:ellipsize="end"
+        android:singleLine="true"
+        android:text="未知"
+        android:textSize="12sp" />
+
+</LinearLayout>

+ 121 - 0
app/src/main/res/layout/umeng_socialize_oauth_dialog.xml

@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    android:background="#D4E0E5">
+
+
+    <RelativeLayout
+        android:id="@+id/umeng_socialize_titlebar"
+        android:layout_width="match_parent"
+        android:layout_height="54dp"
+        android:background="#0086DC">
+
+        <TextView
+            android:id="@+id/umeng_title"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_centerInParent="true"
+            android:text=""
+            android:textColor="#ffffff"
+            android:textSize="18sp" />
+
+        <RelativeLayout
+            android:id="@+id/umeng_back"
+            android:layout_width="60dp"
+            android:layout_height="match_parent"
+
+            android:onClick="onCancel"
+            android:visibility="visible">
+
+            <ImageButton
+
+                android:layout_width="12dp"
+                android:layout_height="20dp"
+                android:layout_centerVertical="true"
+                android:background="@drawable/umeng_socialize_back_icon"
+                android:layout_marginLeft="15dp"
+                android:scaleType="center" />
+        </RelativeLayout>
+
+        <TextView
+            android:id="@+id/umeng_share_btn"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentRight="true"
+            android:layout_centerInParent="true"
+            android:layout_marginRight="10dp"
+            android:background="@drawable/umeng_socialize_btn_bg"
+            android:padding="4dp"
+            android:text="分享"
+            android:textColor="#ffffff" />
+    </RelativeLayout>
+
+    <RelativeLayout
+        android:id="@+id/umeng_socialize_follow"
+        android:layout_width="fill_parent"
+        android:layout_height="40dp"
+        android:layout_alignParentBottom="true"
+        android:background="#AAAAAA"
+        android:visibility="visible">
+
+        <CheckBox
+            android:id="@+id/umeng_socialize_follow_check"
+            android:layout_width="20dp"
+            android:layout_height="20dp"
+            android:layout_centerVertical="true"
+            android:layout_marginLeft="20dp"
+            android:checked="true"
+            android:visibility="gone" />
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_centerVertical="true"
+            android:layout_marginLeft="15dp"
+            android:layout_toRightOf="@id/umeng_socialize_follow_check"
+            android:text="关注官方微博"
+            android:textColor="#f8f8f8"
+            android:textSize="16sp"
+            android:visibility="gone" />
+    </RelativeLayout>
+
+    <!--<LinearLayout-->
+        <!--android:id="@+id/webView_container"-->
+        <!--android:layout_width="match_parent"-->
+        <!--android:layout_height="match_parent"-->
+        <!--android:layout_above="@id/umeng_socialize_follow"-->
+        <!--android:layout_below="@id/umeng_socialize_titlebar"-->
+        <!--android:orientation="horizontal"-->
+        <!--android:visibility="visible" />-->
+
+    <WebView
+        android:id="@+id/webView"
+        android:layout_width="fill_parent"
+        android:layout_height="fill_parent"
+        android:background="#F2F5F6"
+        android:layout_above="@id/umeng_socialize_follow"
+        android:layout_below="@id/umeng_socialize_titlebar"
+        android:visibility="visible" />
+
+    <RelativeLayout
+        android:id="@+id/progress_bar_parent"
+        android:layout_width="fill_parent"
+        android:layout_height="fill_parent"
+        android:layout_below="@id/umeng_socialize_titlebar"
+        android:background="#F2F5F6" >
+
+        <LinearLayout
+            android:layout_width="80dp"
+            android:layout_height="80dp"
+            android:layout_centerInParent="true"
+            android:orientation="horizontal">
+
+            <ProgressBar
+                android:layout_width="fill_parent"
+                android:layout_height="fill_parent"
+                android:layout_margin="10dp" />
+        </LinearLayout>
+    </RelativeLayout>
+
+</RelativeLayout>

+ 5 - 0
app/src/main/res/layout/xask_getmoney_act_layout.xml

@@ -220,6 +220,7 @@
             >
 
         <TextView
+
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:textSize="@dimen/text_size_25"
@@ -300,6 +301,7 @@
             android:layout_marginBottom="10dp"
             />
        <RelativeLayout
+           android:id="@+id/rl_wx"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
@@ -349,6 +351,7 @@
             android:layout_height="wrap_content"
             android:layout_marginTop="10dp"
             android:layout_marginBottom="10dp"
+            android:id="@+id/rl_qq"
             >
             <ImageView
                 android:id="@+id/iv_qq"
@@ -395,6 +398,7 @@
             android:layout_height="wrap_content"
             android:layout_marginTop="10dp"
             android:layout_marginBottom="10dp"
+            android:id="@+id/rl_qr"
             >
             <ImageView
                 android:id="@+id/iv_qr"
@@ -442,6 +446,7 @@
             android:layout_height="wrap_content"
             android:layout_marginTop="10dp"
             android:layout_marginBottom="10dp"
+            android:id="@+id/rl_link"
             >
             <ImageView
                 android:id="@+id/iv_link"

+ 18 - 0
app/src/main/res/values/umeng_socialize_colors.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?><resources>
+
+
+
+	<!--<color name="umeng_socialize_list_item_bgcolor">#FFFFFF</color>-->
+	<!--<color name="umeng_socialize_divider">#E6E6E6</color>-->
+	<!--<color name="umeng_socialize_text_time">#999999</color>-->
+	<!--<color name="umeng_socialize_text_title">#464f61</color>-->
+	<!--<color name="umeng_socialize_text_friends_list">#959696</color>-->
+	<!--<color name="umeng_socialize_text_share_content">#666666</color>-->
+	<!--<color name="umeng_socialize_ucenter_bg">#EEEEEE</color>-->
+	<!--<color name="umeng_socialize_text_ucenter">#595959</color>-->
+	<!--<color name="umeng_socialize_edit_bg">#C4C4C4</color>-->
+	<!--<color name="umeng_socialize_grid_divider_line">#F8F8F8</color>-->
+	<!--<color name="umeng_socialize_web_bg">#F4F4F4</color>-->
+	<!--<color name="umeng_socialize_shareactivity">#D4E0E5</color>-->
+	<!--<color name="umeng_socialize_shareactivitydefault">#ffffff</color>-->
+</resources>

+ 82 - 0
app/src/main/res/values/umeng_socialize_style.xml

@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+    <!--<style name="ACPLDialog">-->
+        <!--<item name="android:windowFrame">@null</item>-->
+        <!--<item name="android:windowNoTitle">true</item>-->
+        <!--<item name="android:windowIsFloating">true</item>-->
+        <!--<item name="android:windowContentOverlay">@null</item>-->
+    <!--</style>-->
+    <!--<style name="umeng_socialize_action_bar_itemlayout">-->
+        <!--<item name="android:layout_height">fill_parent</item>-->
+        <!--<item name="android:layout_width">fill_parent</item>-->
+        <!--<item name="android:layout_weight">1</item>-->
+        <!--<item name="android:paddingLeft">4dp</item>-->
+        <!--<item name="android:paddingTop">4dp</item>-->
+        <!--<item name="android:paddingRight">4dp</item>-->
+        <!--<item name="android:gravity">center_vertical</item>-->
+    <!--</style>-->
+
+    <!--<style name="umeng_socialize_action_bar_item_im">-->
+        <!--<item name="android:layout_width">25dp</item>-->
+        <!--<item name="android:layout_height">25dp</item>-->
+        <!--<item name="android:scaleType">fitCenter</item>-->
+        <!--<item name="android:layout_centerVertical">true</item>-->
+    <!--</style>-->
+
+    <!--<style name="umeng_socialize_action_bar_item_tv">-->
+        <!--<item name="android:layout_width">wrap_content</item>-->
+        <!--<item name="android:layout_height">fill_parent</item>-->
+        <!--<item name="android:layout_marginLeft">5dp</item>-->
+        <!--<item name="android:text">999</item>-->
+        <!--<item name="android:gravity">center</item>-->
+        <!--<item name="android:textColor">#ffffff</item>-->
+        <!--<item name="android:textSize">12sp</item>-->
+        <!--<item name="android:textStyle">bold</item>-->
+    <!--</style>-->
+
+    <!--网页授权的布局-->
+    <style name="umeng_socialize_popup_dialog" parent="@android:style/Theme.Dialog">
+        <item name="android:windowFrame">@null</item>
+        <item name="android:windowIsFloating">true</item>
+        <item name="android:windowIsTranslucent">true</item>
+        <item name="android:windowNoTitle">true</item>
+        <item name="android:background">@android:color/transparent</item>
+        <item name="android:windowBackground">@android:color/transparent</item>
+        <item name="android:backgroundDimEnabled">true</item>
+        <item name="android:backgroundDimAmount">0.6</item>
+    </style>
+
+
+    <!--<style name="Theme.UMDialog" parent="android:style/Theme.Dialog">-->
+        <!--<item name="android:windowNoTitle">true</item>-->
+        <!--<item name="android:windowBackground">@android:color/transparent</item>-->
+    <!--</style>-->
+
+    <style name="Theme.UMDefault" parent="android:style/Theme.NoTitleBar"></style>
+
+    <!--<style name="umeng_socialize_divider">-->
+        <!--<item name="android:layout_width">fill_parent</item>-->
+        <!--<item name="android:layout_height">1dp</item>-->
+        <!--<item name="android:background">@color/umeng_socialize_divider</item>-->
+    <!--</style>-->
+
+    <!--<style name="umeng_socialize_list_item">-->
+        <!--<item name="android:layout_width">fill_parent</item>-->
+        <!--<item name="android:layout_height">55dp</item>-->
+        <!--<item name="android:background">@color/umeng_socialize_list_item_bgcolor</item>-->
+        <!--<item name="android:paddingBottom">5dp</item>-->
+        <!--<item name="android:paddingTop">5dp</item>-->
+    <!--</style>-->
+
+    <!--<style name="umeng_socialize_edit_padding">-->
+        <!--<item name="android:layout_width">fill_parent</item>-->
+        <!--<item name="android:layout_height">fill_parent</item>-->
+        <!--<item name="android:background">@color/umeng_socialize_list_item_bgcolor</item>-->
+        <!--<item name="android:layout_marginLeft">6dp</item>-->
+        <!--<item name="android:layout_marginRight">6dp</item>-->
+        <!--<item name="android:layout_marginTop">6dp</item>-->
+        <!--<item name="android:layout_marginBottom">6dp</item>-->
+    <!--</style>-->
+
+
+</resources>