第一次提交
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package com.xinlingwu.share;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.test.InstrumentationRegistry;
|
||||
import android.support.test.runner.AndroidJUnit4;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class ExampleInstrumentedTest {
|
||||
@Test
|
||||
public void useAppContext() {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getTargetContext();
|
||||
|
||||
assertEquals("com.xinlingwu.share.test", appContext.getPackageName());
|
||||
}
|
||||
}
|
||||
46
share/src/main/AndroidManifest.xml
Normal file
46
share/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,46 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.xinlingwu.share">
|
||||
|
||||
<application>
|
||||
|
||||
<activity
|
||||
android:name="com.umeng.qq.tencent.AuthActivity"
|
||||
android:launchMode="singleTask"
|
||||
android:noHistory="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<data android:scheme="tencent1112299706" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<!-- <activity-->
|
||||
<!-- android:name=".WBShareActivity"-->
|
||||
<!-- android:configChanges="keyboardHidden|orientation"-->
|
||||
<!-- android:screenOrientation="portrait">-->
|
||||
<!-- <intent-filter>-->
|
||||
<!-- <action android:name="com.sina.weibo.sdk.action.ACTION_SDK_REQ_ACTIVITY" />-->
|
||||
<!-- <category android:name="android.intent.category.DEFAULT" />-->
|
||||
<!-- </intent-filter>-->
|
||||
<!-- </activity>-->
|
||||
<activity
|
||||
android:name="com.umeng.qq.tencent.AssistActivity"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
|
||||
<activity
|
||||
android:name="com.umeng.socialize.editorpage.ShareActivity"
|
||||
android:excludeFromRecents="true"
|
||||
android:theme="@style/Theme.UMDefault" />
|
||||
|
||||
<meta-data
|
||||
android:name="UMENG_APPKEY"
|
||||
android:value="647408eca1a164591b258202"/>
|
||||
|
||||
</application>
|
||||
</manifest>
|
||||
|
||||
217
share/src/main/java/com/xinlingwu/share/ShareManager.java
Normal file
217
share/src/main/java/com/xinlingwu/share/ShareManager.java
Normal file
@@ -0,0 +1,217 @@
|
||||
package com.xinlingwu.share;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
import com.umeng.socialize.PlatformConfig;
|
||||
import com.umeng.socialize.ShareAction;
|
||||
import com.umeng.socialize.UMAuthListener;
|
||||
import com.umeng.socialize.UMShareAPI;
|
||||
import com.umeng.socialize.UMShareListener;
|
||||
import com.umeng.socialize.bean.SHARE_MEDIA;
|
||||
import com.umeng.socialize.media.UMImage;
|
||||
import com.umeng.socialize.media.UMWeb;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created by abby on 2016/12/11.
|
||||
*/
|
||||
|
||||
public class ShareManager {
|
||||
public static final int TYPE_QQ = 0;
|
||||
public static final int TYPE_WEIXIN = 1;
|
||||
public static final int TYPE_WEIBO = 2;
|
||||
public static final int TYPE_PENG = 3;
|
||||
public static final int TYPE_KONG = 4;
|
||||
private static ShareManager mInstance;
|
||||
private iAuthStatus mStatus;
|
||||
private iShareStatus mShareStatus;
|
||||
private UMAuthListener mAuthListener = new UMAuthListener() {
|
||||
@Override
|
||||
public void onStart(SHARE_MEDIA share_media) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete(SHARE_MEDIA share_media, int i, Map<String, String> map) {
|
||||
mStatus.success(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(SHARE_MEDIA share_media, int i, Throwable throwable) {
|
||||
mStatus.error();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancel(SHARE_MEDIA share_media, int i) {
|
||||
mStatus.cancel();
|
||||
}
|
||||
};
|
||||
|
||||
private UMShareListener mShareListener = new UMShareListener() {
|
||||
@Override
|
||||
public void onStart(SHARE_MEDIA share_media) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResult(SHARE_MEDIA share_media) {
|
||||
if(null != mShareStatus) {
|
||||
mShareStatus.success();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(SHARE_MEDIA share_media, Throwable throwable) {
|
||||
if(null != mShareStatus) {
|
||||
mShareStatus.error();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancel(SHARE_MEDIA share_media) {
|
||||
if(null != mShareStatus) {
|
||||
mShareStatus.cancel();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public interface iAuthStatus{
|
||||
void success(Map<String, String> map);
|
||||
void error();
|
||||
void cancel();
|
||||
}
|
||||
|
||||
public interface iShareStatus{
|
||||
void success();
|
||||
void error();
|
||||
void cancel();
|
||||
}
|
||||
|
||||
public static ShareManager getInstance(){
|
||||
if(null == mInstance){
|
||||
mInstance = new ShareManager();
|
||||
}
|
||||
|
||||
return mInstance;
|
||||
}
|
||||
|
||||
public void setShareStatus(iShareStatus status){
|
||||
mShareStatus = status;
|
||||
}
|
||||
|
||||
public void configWeixin(String id, String sec){
|
||||
PlatformConfig.setWeixin(id, sec);
|
||||
}
|
||||
|
||||
public void configWeibo(String id, String sec, String redirectUrl){
|
||||
PlatformConfig.setSinaWeibo(id, sec, redirectUrl);
|
||||
}
|
||||
|
||||
public void configQQ(String id, String sec){
|
||||
PlatformConfig.setQQZone(id, sec);
|
||||
}
|
||||
|
||||
public void verify(iAuthStatus status, Activity activity, int type){
|
||||
mStatus = status;
|
||||
UMShareAPI mShareApi = UMShareAPI.get(activity);
|
||||
if(TYPE_QQ == type) {
|
||||
mShareApi.getPlatformInfo(activity, SHARE_MEDIA.QQ, mAuthListener);
|
||||
}else if(TYPE_WEIXIN == type){
|
||||
mShareApi.getPlatformInfo(activity, SHARE_MEDIA.WEIXIN, mAuthListener);
|
||||
}else if(TYPE_WEIBO == type){
|
||||
mShareApi.getPlatformInfo(activity, SHARE_MEDIA.SINA, mAuthListener);
|
||||
}
|
||||
}
|
||||
|
||||
public void delete(Activity activity,UMAuthListener umAuthListener){
|
||||
UMShareAPI mShareApi = UMShareAPI.get(activity);
|
||||
mShareApi.deleteOauth(activity, SHARE_MEDIA.QQ, umAuthListener);
|
||||
mShareApi.deleteOauth(activity, SHARE_MEDIA.WEIXIN, umAuthListener);
|
||||
mShareApi.deleteOauth(activity, SHARE_MEDIA.SINA, umAuthListener);
|
||||
}
|
||||
|
||||
public void onActivityResult(Context context, int requestCode, int resultCode, Intent data){
|
||||
|
||||
UMShareAPI.get(context).onActivityResult(requestCode, resultCode, data);
|
||||
}
|
||||
|
||||
public boolean isInstalled(Activity activity, int type){
|
||||
UMShareAPI mShareApi = UMShareAPI.get(activity);
|
||||
if(type == TYPE_WEIXIN || type == TYPE_PENG) {
|
||||
return mShareApi.isInstall(activity, SHARE_MEDIA.WEIXIN);
|
||||
}else if(type == TYPE_WEIBO){
|
||||
return mShareApi.isInstall(activity, SHARE_MEDIA.SINA);
|
||||
}else{
|
||||
return mShareApi.isInstall(activity, SHARE_MEDIA.QQ);
|
||||
}
|
||||
}
|
||||
|
||||
public void shareToPlatform(int type, String url, String imageUrl, String title, String description, Activity context){
|
||||
UMWeb web = new UMWeb(url);
|
||||
web.setThumb(new UMImage(context, imageUrl));
|
||||
web.setTitle(title);
|
||||
web.setDescription(description);
|
||||
|
||||
SHARE_MEDIA media = null;
|
||||
switch (type){
|
||||
case 1:
|
||||
media = SHARE_MEDIA.WEIXIN;
|
||||
break;
|
||||
case 2:
|
||||
media = SHARE_MEDIA.WEIXIN_CIRCLE;
|
||||
break;
|
||||
case 5:
|
||||
media = SHARE_MEDIA.SINA;
|
||||
break;
|
||||
case 3:
|
||||
media = SHARE_MEDIA.QQ;
|
||||
break;
|
||||
case 4:
|
||||
media = SHARE_MEDIA.QZONE;
|
||||
break;
|
||||
}
|
||||
|
||||
if(null != media) {
|
||||
new ShareAction(context).setPlatform(media).setCallback(mShareListener).withMedia(web).share();
|
||||
}
|
||||
}
|
||||
|
||||
public void shareToPlatformCallback(int type, String url, String imageUrl, String title, String description,
|
||||
Activity context, UMShareListener listener){
|
||||
UMWeb web = new UMWeb(url);
|
||||
web.setThumb(new UMImage(context, imageUrl));
|
||||
web.setTitle(title);
|
||||
web.setDescription(description);
|
||||
|
||||
SHARE_MEDIA media = null;
|
||||
switch (type){
|
||||
case 1:
|
||||
media = SHARE_MEDIA.WEIXIN;
|
||||
break;
|
||||
case 2:
|
||||
media = SHARE_MEDIA.WEIXIN_CIRCLE;
|
||||
break;
|
||||
case 5:
|
||||
media = SHARE_MEDIA.SINA;
|
||||
break;
|
||||
case 3:
|
||||
media = SHARE_MEDIA.QQ;
|
||||
break;
|
||||
case 4:
|
||||
media = SHARE_MEDIA.QZONE;
|
||||
break;
|
||||
}
|
||||
|
||||
if(null != media) {
|
||||
new ShareAction(context).setPlatform(media).setCallback(listener).withMedia(web).share();
|
||||
}
|
||||
}
|
||||
|
||||
private ShareManager(){
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
BIN
share/src/main/res/drawable/umeng_socialize_back_icon.png
Normal file
BIN
share/src/main/res/drawable/umeng_socialize_back_icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 500 B |
11
share/src/main/res/drawable/umeng_socialize_btn_bg.xml
Normal file
11
share/src/main/res/drawable/umeng_socialize_btn_bg.xml
Normal file
@@ -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>
|
||||
124
share/src/main/res/layout/umeng_socialize_oauth_dialog.xml
Normal file
124
share/src/main/res/layout/umeng_socialize_oauth_dialog.xml
Normal file
@@ -0,0 +1,124 @@
|
||||
<?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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:viewBindingIgnore="true"
|
||||
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>
|
||||
BIN
share/src/main/res/mipmap/share_logo.png
Normal file
BIN
share/src/main/res/mipmap/share_logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 38 KiB |
29
share/src/main/res/values/strings.xml
Normal file
29
share/src/main/res/values/strings.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">UShareDemo</string>
|
||||
|
||||
<string name="facebook_app_id">1266254913438718</string>
|
||||
|
||||
|
||||
<string name="umeng_update_content">版本号:6.4.3\n1.修复了反馈中空指针的bug\n2.增加了微信分享小程序的功能\n3.解决了部分已知bug</string>
|
||||
<string name="umeng_home_title">U-Share产品Demo</string>
|
||||
<string name="umeng_home_update">新版更新内容</string>
|
||||
<string name="umeng_share_title">分享</string>
|
||||
<string name="umeng_auth_title">授权</string>
|
||||
<string name="umeng_delauth_title">删除授权</string>
|
||||
<string name="umeng_getinfo_title">获取用户信息</string>
|
||||
<string name="umeng_check_title">自检工具</string>
|
||||
<string name="umeng_menu_title">分享菜单模板</string>
|
||||
|
||||
<string name="umeng_check_sign">检查签名</string>
|
||||
<string name="umeng_check_sina">检查新浪</string>
|
||||
<string name="umeng_check_wx">检查微信</string>
|
||||
<string name="umeng_check_alipay">检查支付宝</string>
|
||||
<string name="umeng_check_qq">检查qq</string>
|
||||
<string name="umeng_check_fb">检查facebook</string>
|
||||
<string name="umeng_check_vk">vkontakte</string>
|
||||
<string name="umeng_choose_style">选择分享类型</string>
|
||||
|
||||
<string name="umeng_sharebutton_copy">复制文本</string>
|
||||
<string name="umeng_sharebutton_copyurl">复制连接</string>
|
||||
</resources>
|
||||
18
share/src/main/res/values/umeng_socialize_colors.xml
Normal file
18
share/src/main/res/values/umeng_socialize_colors.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><resources>
|
||||
<color name="umeng_socialize_comments_bg">#F4F4F4</color>
|
||||
<color name="umeng_socialize_color_group">#2c3035</color>
|
||||
<color name="umeng_socialize_list_item_textcolor">#333333</color>
|
||||
<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>
|
||||
58
share/src/main/res/values/umeng_socialize_strings.xml
Normal file
58
share/src/main/res/values/umeng_socialize_strings.xml
Normal file
@@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<dimen name="alphabet_size">12dip</dimen>
|
||||
<dimen name="umeng_socialize_pad_window_height">350dip</dimen>
|
||||
<dimen name="umeng_socialize_pad_window_width">580dip</dimen>
|
||||
<!-- 平台名称 -->
|
||||
<string name="umeng_socialize_text_tencent_key">腾讯微博</string>
|
||||
<string name="umeng_socialize_text_wenxin_fav">微信收藏</string>
|
||||
<string name="umeng_socialize_text_sina_key">微博</string>
|
||||
<string name="umeng_socialize_text_qq_key">QQ</string>
|
||||
<string name="umeng_socialize_text_qq_zone_key">QQ空间</string>
|
||||
<string name="umeng_socialize_text_renren_key">人人网</string>
|
||||
<string name="umeng_socialize_text_douban_key">豆瓣</string>
|
||||
<string name="umeng_socialize_text_weixin_key">微信</string>
|
||||
<string name="umeng_socialize_text_weixin_circle_key">微信朋友圈</string>
|
||||
<string name="umeng_socialize_text_weixin_fav_key">微信收藏</string>
|
||||
<string name="umeng_socialize_text_add_custom_platform">请配置用户平台</string>
|
||||
<string name="umeng_example_home_btn_plus">社交分享</string>
|
||||
<string name="umeng_socialize_text_waitting_share">分享中…</string>
|
||||
<string name="umeng_socialize_content_hint">说点啥…</string>
|
||||
<string name="umeng_socialize_cancel_btn_str">取消</string>
|
||||
<string name="umeng_socialize_send_btn_str">发送</string>
|
||||
|
||||
<string name="umeng_socialize_female">女</string>
|
||||
<string name="umeng_socialize_male">男</string>
|
||||
|
||||
<string name="umeng_socialize_share">分享</string>
|
||||
|
||||
<string name="umeng_socialize_mail">邮件</string>
|
||||
<string name="umeng_socialize_sms">短信</string>
|
||||
<string name="umeng_socialize_sina">新浪</string>
|
||||
<string name="umeng_socialize_text_yixin_key">易信</string>
|
||||
<string name="umeng_socialize_text_yixincircle_key">易信朋友圈</string>
|
||||
|
||||
<string name="umeng_socialize_text_laiwangdynamic_key">点点虫动态</string>
|
||||
<string name="umeng_socialize_text_evernote_key">印象笔记</string>
|
||||
<string name="umeng_socialize_text_ydnote_key">有道云笔记</string>
|
||||
<string name="umeng_socialize_text_facebook_key">Facebook</string>
|
||||
<string name="umeng_socialize_text_facebookmessager_key">Facebook Messager</string>
|
||||
<string name="umeng_socialize_text_twitter_key">Twitter</string>
|
||||
<string name="umeng_socialize_text_instagram_key">Instagram</string>
|
||||
<string name="umeng_socialize_text_pinterest_key">Pinterest</string>
|
||||
<string name="umeng_socialize_text_pocket_key">Pocket</string>
|
||||
<string name="umeng_socialize_text_linkedin_key">Linkedin</string>
|
||||
<string name="umeng_socialize_text_foursquare_key">Foursquare</string>
|
||||
<string name="umeng_socialize_text_whatsapp_key">WhatsApp</string>
|
||||
<string name="umeng_socialize_text_line_key">LINE</string>
|
||||
<string name="umeng_socialize_text_flickr_key">Flickr</string>
|
||||
<string name="umeng_socialize_text_tumblr_key">Tumblr</string>
|
||||
<string name="umeng_socialize_text_alipay_key">支付宝</string>
|
||||
<string name="umeng_socialize_text_kakao_key">KakaoTalk</string>
|
||||
<string name="umeng_socialize_text_googleplus_key">GooglePlus</string>
|
||||
<string name="umeng_socialize_text_more_key">更多</string>
|
||||
<string name="umeng_socialize_text_dingding_key">钉钉</string>
|
||||
<string name="umeng_socialize_text_vkontakte_key">VKontakte</string>
|
||||
<string name="umeng_socialize_text_dropbox_key">DropBox</string>
|
||||
</resources>
|
||||
82
share/src/main/res/values/umeng_socialize_style.xml
Normal file
82
share/src/main/res/values/umeng_socialize_style.xml
Normal file
@@ -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>
|
||||
17
share/src/test/java/com/xinlingwu/share/ExampleUnitTest.java
Normal file
17
share/src/test/java/com/xinlingwu/share/ExampleUnitTest.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package com.xinlingwu.share;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
public class ExampleUnitTest {
|
||||
@Test
|
||||
public void addition_isCorrect() {
|
||||
assertEquals(4, 2 + 2);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user