Przeglądaj źródła

邀请赚钱界面分享对话框显示与响应

zengjiebin 7 lat temu
rodzic
commit
ac80f9adfc

+ 8 - 2
app/src/main/java/com/sheep/gamegroup/model/entity/UserEntity.java

@@ -4,6 +4,8 @@ import android.text.TextUtils;
 
 import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.util.TestUtil;
+import com.sheep.gamegroup.view.dialog.DialogShare;
+
 import org.xutils.db.annotation.Column;
 import org.xutils.db.annotation.Table;
 
@@ -318,7 +320,11 @@ public class UserEntity implements Serializable {
         return must_bind_mobile == 0 && TextUtils.isEmpty(mobile);
     }
     //测试服用测试分享链接,正式服用正式的
-    public String getShareLink(String type){//测试服对应的下载地址为http://10.8.230.17:7776/newsheep?id=32778005
-        return TestUtil.isSheep() ? CommonUtil.getInstance().jointString(getShare_link(), type) : CommonUtil.getInstance().jointString("http://10.8.210.230:8902/share.html?invitation_code="+getInvitation_code(),type);
+    public String getShareLink(@DialogShare.SHARE_TYPE String type){
+        return CommonUtil.getInstance().jointString(getShareLink(), type);
+    }
+    //测试服用测试分享链接,正式服用正式的
+    public String getShareLink(){//测试服对应的下载地址为http://10.8.230.17:7776/newsheep?id=32778005
+        return TestUtil.isSheep() ? getShare_link() : "http://10.8.210.230:8902/share.html?invitation_code="+getInvitation_code();
     }
 }

Plik diff jest za duży
+ 242 - 200
app/src/main/java/com/sheep/gamegroup/util/CommonUtil.java


+ 1 - 4
app/src/main/java/com/sheep/gamegroup/util/DataUtil.java

@@ -12,14 +12,12 @@ import android.text.TextUtils;
 
 import com.alibaba.fastjson.JSON;
 import com.sheep.gamegroup.model.api.BaseMessageConverter;
-import com.sheep.gamegroup.model.entity.AppUsage;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.TaskAcceptedEty;
 import com.sheep.gamegroup.model.entity.UserEntity;
 import com.sheep.gamegroup.model.util.AutoTaskListUtil;
 import com.sheep.jiuyan.samllsheep.BuildConfig;
 import com.sheep.jiuyan.samllsheep.SheepApp;
-import com.sheep.jiuyan.samllsheep.service.FloatShotScreenService;
 import com.sheep.jiuyan.samllsheep.utils.FileUtil;
 import com.sheep.jiuyan.samllsheep.utils.G;
 import com.sheep.jiuyan.samllsheep.utils.SpUtils;
@@ -30,7 +28,6 @@ import org.afinal.simplecache.ApiKey;
 import java.io.File;
 import java.util.HashMap;
 import java.util.List;
-import java.util.Locale;
 import java.util.Map;
 import java.util.TreeMap;
 
@@ -284,7 +281,7 @@ public class DataUtil {
         return null;
     }
     //是否使用小绵羊截图方案
-    public static final boolean IS_USE_SCREEN_SHOT = TestUtil.isTest();
+    public static final boolean IS_USE_SCREEN_SHOT = BuildConfig.DEBUG;
     /**
      * 截图路径
      *

+ 2 - 1
app/src/main/java/com/sheep/gamegroup/util/Jump2View.java

@@ -95,6 +95,7 @@ import com.sheep.gamegroup.view.activity.WithdrawalListAct;
 import com.sheep.gamegroup.view.activity.WithdrawalResultAct;
 import com.sheep.gamegroup.view.dialog.DialogNewbieTask1;
 import com.sheep.gamegroup.view.dialog.DialogNewbieTaskRegistSuccess;
+import com.sheep.gamegroup.view.dialog.DialogShare;
 import com.sheep.jiuyan.samllsheep.BuildConfig;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
@@ -1420,7 +1421,7 @@ public class Jump2View {
                 @Override
                 public void call(String find_share_url) {
                     String url = String.format(Locale.CHINA, "%s?authorization=%s&%s=%d&invitation_code=%s", find_share_url, SpUtils.getToken(activity), idName, id, DataUtil.getInstance().getInvitationCode());
-                    CommonUtil.getInstance().popShare(activity, url, "all");
+                    CommonUtil.getInstance().popShare(activity, url, DialogShare.ALL);
                 }
             });
         }catch (Exception e){

+ 2 - 1
app/src/main/java/com/sheep/gamegroup/util/TestUtil.java

@@ -31,6 +31,7 @@ import com.sheep.gamegroup.view.activity.ActInstallApkList;
 import com.sheep.gamegroup.view.activity.ActSheepApkList;
 import com.sheep.gamegroup.view.activity.ActWeb;
 import com.sheep.gamegroup.view.dialog.DialogNewbieTaskList;
+import com.sheep.gamegroup.view.dialog.DialogShare;
 import com.sheep.jiuyan.samllsheep.BuildConfig;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
@@ -491,7 +492,7 @@ public class TestUtil {
      * umen 分享
      */
     private void testUmen(Activity context){
-        CommonUtil.getInstance().popShare(context, "http://www.baidu.com", "all");
+        CommonUtil.getInstance().popShare(context, "http://www.baidu.com", DialogShare.ALL);
         UMImage umImage = new UMImage(context, R.mipmap.icon);
         new ShareAction(context)
                 .withText("hehe")

+ 77 - 3
app/src/main/java/com/sheep/gamegroup/util/ViewUtil.java

@@ -11,12 +11,16 @@ import android.net.Uri;
 import android.os.Build;
 import android.provider.MediaStore;
 import android.support.v7.app.AlertDialog;
+import android.support.v7.widget.GridLayoutManager;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
 import android.text.Html;
 import android.text.TextUtils;
 import android.text.method.ScrollingMovementMethod;
 import android.view.Gravity;
 import android.view.LayoutInflater;
 import android.view.View;
+import android.view.Window;
 import android.view.WindowManager;
 import android.webkit.WebView;
 import android.widget.ImageView;
@@ -32,6 +36,7 @@ import com.sheep.gamegroup.model.entity.DialogConfig;
 import com.sheep.gamegroup.model.entity.GameAccountEntity;
 import com.sheep.gamegroup.model.entity.PayEntity;
 import com.sheep.gamegroup.view.activity.SplashAct;
+import com.sheep.gamegroup.view.adapter.AdbCommonRecycler;
 import com.sheep.gamegroup.view.dialog.DialogAddAccount;
 import com.sheep.gamegroup.view.dialog.DialogModifyAccount;
 import com.sheep.gamegroup.view.dialog.DialogOrienteeringDetails;
@@ -47,6 +52,7 @@ import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.IOException;
+import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 
@@ -73,7 +79,6 @@ public class ViewUtil {
     }
 
     public static void showQR(final Activity activity, String link) {
-        link = CommonUtil.getInstance().jointString(link, "ohter");
         QR_SHARE.onEvent();
         View dialog_parent = View.inflate(activity, R.layout.dialog_parent, null);
         final AlertDialog dialog = new AlertDialog.Builder(activity, R.style.MyDialogActivityTheme)
@@ -704,8 +709,8 @@ public class ViewUtil {
      * @param activity
      * @param url
      */
-    public void showShare(Activity activity, String url){
-        new DialogShare(activity, url).showShare();
+    public void showShare(Activity activity, String url, String description){
+        new DialogShare(activity, url, description).showShare();
     }
 
     public static void centerImage(ImageView imageView, String pictures) {
@@ -828,4 +833,73 @@ public class ViewUtil {
         new DialogAddAccount(activity).showAddAccount(action1);
     }
 
+    public static void showShareDialog(final Activity activity, final String url, final String description){
+        View dialog_parent = View.inflate(activity, R.layout.ask_to_share, null);
+        final AlertDialog dialog = new AlertDialog.Builder(activity, R.style.AppTheme_Dialog_Alert)
+                .setView(dialog_parent)
+                .create();
+//        TextView ask_share_title = dialog_parent.findViewById(R.id.ask_share_title);
+        RecyclerView ask_share_list = dialog_parent.findViewById(R.id.ask_share_list);
+        GridLayoutManager gridLayoutManager = new GridLayoutManager(activity, 5);
+        ask_share_list.setLayoutManager(gridLayoutManager);
+//        ask_share_list.setHasFixedSize(true);
+//        ask_share_list.setNestedScrollingEnabled(false);
+        List<String> list = ListUtil.emptyList();
+        list.add(DialogShare.FACE_TO_FACE);
+        list.add(DialogShare.WX);
+        list.add(DialogShare.QQ);
+        list.add(DialogShare.WEIXIN_CIRCLE);
+        list.add(DialogShare.COPY_SHARE_LINK);
+        final List<String> imgList = ListUtil.emptyList();
+        imgList.add("share_face_to_face");
+        imgList.add("share_wx");
+        imgList.add("share_qq");
+        imgList.add("share_weixin_circle");
+        imgList.add("share_copy_share_link");
+        final List<String> nameList = ListUtil.emptyList();
+        nameList.add("面对面");
+        nameList.add("微信");
+        nameList.add("QQ好友");
+        nameList.add("朋友圈");
+        nameList.add("复制链接");
+        AdbCommonRecycler<String> adapter = new AdbCommonRecycler<String>(activity, list) {
+
+            @Override
+            public int getViewIdByType(int type) {
+                return R.layout.ask_to_share_item;
+            }
+
+            @Override
+            public void convert(ViewHolder holder, final String item) {
+                View itemView = holder.itemView;
+                if (item == null)
+                    return;
+                ImageView ask_to_share_item_img = itemView.findViewById(R.id.ask_to_share_item_img);
+                TextView ask_to_share_item_name = itemView.findViewById(R.id.ask_to_share_item_name);
+                int position = holder.getAdapterPosition();
+                GlideImageLoader.setImage(ask_to_share_item_img, String.format(Locale.CHINA, "http://cdngame.kuaifazs.com/%s.png", imgList.get(position)));
+                ask_to_share_item_name.setText(nameList.get(position));
+                itemView.setOnClickListener(new View.OnClickListener() {
+                    @Override
+                    public void onClick(View view) {
+                        CommonUtil.getInstance().popShare(activity, url, item, description);
+                    }
+                });
+
+            }
+        };
+        ask_share_list.setAdapter(adapter);
+        try {
+            dialog.show();
+            Window window = dialog.getWindow();
+            if(window != null) {
+                window.setGravity(Gravity.BOTTOM);
+                WindowManager.LayoutParams params = window.getAttributes();
+                params.width = G.WIDTH > G.HEIGHT ? G.HEIGHT : G.WIDTH;
+                window.setAttributes(params);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
 }

+ 4 - 100
app/src/main/java/com/sheep/gamegroup/view/activity/AskGetMoneyAct.java

@@ -13,7 +13,6 @@ import android.webkit.WebView;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.RelativeLayout;
-import android.widget.ScrollView;
 import android.widget.TextView;
 
 import com.kfzs.duanduan.fragment.FgtFriendExtractPage;
@@ -24,19 +23,13 @@ import com.sheep.gamegroup.di.modules.AskGetMoneyModule;
 import com.sheep.gamegroup.model.entity.AskAward;
 import com.sheep.gamegroup.model.entity.AskTop;
 import com.sheep.gamegroup.model.entity.BaseMessage;
-import com.sheep.gamegroup.model.entity.BulletinEnty;
-import com.sheep.gamegroup.model.entity.DialogConfig;
 import com.sheep.gamegroup.model.entity.FriendAndAwardEntity;
-import com.sheep.gamegroup.model.entity.TaskEty;
-import com.sheep.gamegroup.model.entity.TaskReleaseEty;
 import com.sheep.gamegroup.model.entity.UserEntity;
-import com.sheep.gamegroup.model.entity.XiaomiGameEntity;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.presenter.AskGetMoneyContract;
 import com.sheep.gamegroup.presenter.AskGetMoneyPresenter;
 import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.util.ListUtil;
-import com.sheep.gamegroup.util.StringUtils;
 import com.sheep.gamegroup.util.ViewHolder;
 import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.gamegroup.view.adapter.AdbCommonRecycler;
@@ -46,11 +39,8 @@ import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.utils.G;
 import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
 import com.sunfusheng.marqueeview.MarqueeView;
-import com.umeng.socialize.ShareAction;
 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.List;
 import java.util.Locale;
@@ -58,17 +48,10 @@ import java.util.Locale;
 import javax.inject.Inject;
 
 import butterknife.BindView;
-import butterknife.OnClick;
 import rx.android.schedulers.AndroidSchedulers;
 import rx.functions.Action1;
 import rx.schedulers.Schedulers;
 
-import static com.sheep.gamegroup.util.UMConfigUtils.Event.LINK_SHARE;
-import static com.sheep.gamegroup.util.UMConfigUtils.Event.QR_COPY;
-import static com.sheep.gamegroup.util.UMConfigUtils.Event.SHARE_TO_QQ;
-import static com.sheep.gamegroup.util.UMConfigUtils.Event.SHARE_TO_WX;
-import static com.sheep.gamegroup.view.adapter.TryMakeMoneyAdp.PUBLIC_TAG_PREFIX_TEXTVIEW_LIST;
-
 /**
  * Created by Administrator on 2018/3/19.
  */
@@ -311,60 +294,6 @@ public class AskGetMoneyAct extends BaseUMActivity implements UMShareListener, A
                 });
     }
 
-    private void shareToWX() {
-        shareToOther(1);
-    }
-
-    private void shareToQQ() {
-        shareToOther(2);
-    }
-
-    private void shareToOther(int code) {
-        if (userEntity == null) {
-            G.showToast("数据正在加载中");
-            return;
-        }
-        ShareAction shareAction = new ShareAction(AskGetMoneyAct.this);
-        if (code == 1) {
-            shareAction.setPlatform(SHARE_MEDIA.WEIXIN);
-            CommonUtil.getInstance().popShare(AskGetMoneyAct.this, userEntity.getShareLink(), "wx", mEntity.getShare_desc());
-            CommonUtil.getInstance().popShare(AskGetMoneyAct.this, userEntity.getShareLink("wx"), "wx",mEntity.getShare_desc());
-        } else {
-            shareAction.setPlatform(SHARE_MEDIA.QQ);
-            CommonUtil.getInstance().popShare(AskGetMoneyAct.this, userEntity.getShareLink(), "qq", mEntity.getShare_desc());
-            CommonUtil.getInstance().popShare(AskGetMoneyAct.this, userEntity.getShareLink("qq"), "qq",mEntity.getShare_desc());
-        }
-    }
-
-
-    private void shareToLink() {
-        if (userEntity == null) {
-            G.showToast("数据正在加载中");
-            return;
-        }
-        LINK_SHARE.onEvent();
-        ViewUtil.showMsgDialog(this, new DialogConfig().setTitle("分享链接").setMsg(userEntity.getShareLink())
-                .setMsgMore("通过连接加入小绵羊即可成为你的好友").setMsgMoreColor(R.color.txt_black_9e9c9c)
-                .setBtnLeftText("复制链接").setBtnLeftOnClickListener(new View.OnClickListener() {
-                    @Override
-                    public void onClick(View view) {
-                        QR_COPY.onEvent();
-                        StringUtils.CopyText(userEntity.getShareLink());
-                        G.showToast("复制链接成功");
-                    }
-                }));
-        ViewUtil.showMsgDialog(this, new DialogConfig().setTitle("分享链接").setMsg(userEntity.getShareLink("other"))
-            .setMsgMore("通过连接加入小绵羊即可成为你的好友").setMsgMoreColor(R.color.txt_black_9e9c9c)
-            .setBtnLeftText("复制链接").setBtnLeftOnClickListener(new View.OnClickListener() {
-                        @Override
-                        public void onClick(View view) {
-                            QR_COPY.onEvent();
-                            StringUtils.CopyText(userEntity.getShareLink("other"));
-                            G.showToast("复制链接成功");
-                        }
-                    }));
-    }
-
 
     @Override
     public void onStart(SHARE_MEDIA share_media) {
@@ -413,33 +342,6 @@ public class AskGetMoneyAct extends BaseUMActivity implements UMShareListener, A
     }
 
 
-    @OnClick({R.id.rl_wx, R.id.rl_qq, R.id.rl_qr, R.id.rl_link})
-    public void onViewClicked(View view) {
-        try {
-            switch (view.getId()) {
-                case R.id.rl_wx:
-                    shareToWX();
-                    SHARE_TO_WX.onEvent();
-                    break;
-                case R.id.rl_qq:
-                    shareToQQ();
-                    SHARE_TO_QQ.onEvent();
-                    break;
-                case R.id.rl_qr:
-                    if (userEntity == null) {
-                        G.showToast("数据正在加载中");
-                        break;
-                    }
-                    ViewUtil.showQR(AskGetMoneyAct.this, userEntity.getShareLink("other"));
-                    break;
-                case R.id.rl_link:
-                    shareToLink();
-                    break;
-            }
-        } catch (Exception e) {
-            G.showToast(R.string.loading_data);
-        }
-    }
 
     private SparseArray<FgtFriendExtractPage> mTestFragments;
 
@@ -481,7 +383,7 @@ public class AskGetMoneyAct extends BaseUMActivity implements UMShareListener, A
             @Override
             public void onPageSelected(int i) {
                 curPage = i + 1;
-                friend_extract_page_tv.setText("" + curPage);
+                friend_extract_page_tv.setText(String.format(Locale.CHINA,"%d", curPage));
                 checkAddPage(curPage, mTestFragments.get(curPage).getList().size());
             }
 
@@ -515,6 +417,8 @@ public class AskGetMoneyAct extends BaseUMActivity implements UMShareListener, A
     }
     //显示分享对话框
     public void showShareView(View view) {
-
+        String url = userEntity.getShareLink();
+        String description = mEntity.getShare_desc();
+        ViewUtil.showShareDialog(activity, url, description);
     }
 }

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

@@ -18,6 +18,7 @@ import com.sheep.gamegroup.util.DataUtil;
 import com.sheep.gamegroup.util.GlideImageLoader;
 import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.gamegroup.view.dialog.DialogShare;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.utils.G;
@@ -114,7 +115,7 @@ public class PersonalInfoAct extends AbsChooseImageActivity {
                 USER_INFO_NAME.onEvent();
                 break;
             case R.id.personal_info_qr_container:
-                ViewUtil.showQR(PersonalInfoAct.this, userEntity.getShareLink("other"));
+                ViewUtil.showQR(PersonalInfoAct.this, userEntity.getShareLink(DialogShare.OTHER));
                 break;
             case R.id.personal_info_phone_container:   //跳转到绑定手机号
                 Jump2View.getInstance().goBindPhone(activity, null);

+ 33 - 15
app/src/main/java/com/sheep/gamegroup/view/dialog/DialogShare.java

@@ -2,38 +2,54 @@ package com.sheep.gamegroup.view.dialog;
 
 import android.app.Activity;
 import android.content.DialogInterface;
+import android.support.annotation.StringDef;
 import android.support.v7.app.AlertDialog;
 import android.text.TextUtils;
 import android.view.Gravity;
-import android.view.LayoutInflater;
 import android.view.View;
 import android.view.Window;
 import android.view.WindowManager;
-import android.widget.EditText;
 import android.widget.LinearLayout;
 import android.widget.TextView;
 
 import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.util.StringUtils;
-import com.sheep.gamegroup.util.ViewUtil;
-import com.sheep.gamegroup.view.activity.ActWeb;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.utils.G;
 
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
 /**
  * Created by ljy on 2018/6/22.
  */
 
 public class DialogShare {
+    public final static String FACE_TO_FACE = "face_to_face";
+    public final static String COPY_SHARE_LINK = "copy_share_link";
+    public final static String WEIXIN_CIRCLE = "weixin_circle";
+    public final static String QQ = "qq";
+    public final static String WX = "wx";
+    public final static String ALL = "all";
+    public final static String OTHER = "other";
+
+    @StringDef({FACE_TO_FACE, COPY_SHARE_LINK, WEIXIN_CIRCLE, QQ, WX, OTHER, ALL})
+    @Retention(RetentionPolicy.SOURCE)
+    public @interface SHARE_TYPE {
+    }
+
     private Activity activity;
     private String link;
+    private String description;
 
-    public DialogShare(Activity activity, String link) {
+    public DialogShare(Activity activity, String link, String description) {
         this.activity = activity;
         this.link = link;
+        this.description = description;
     }
-    public void showShare(){
-        if(activity == null){
+
+    public void showShare() {
+        if (activity == null) {
             return;
         }
         View dialog_parent = View.inflate(activity, R.layout.share_panel_layout, null);
@@ -46,12 +62,12 @@ public class DialogShare {
         TextView tv_link = dialog_parent.findViewById(R.id.tv_link);
         TextView cancel_share_tv = dialog_parent.findViewById(R.id.cancel_share_tv);
         if (!TextUtils.isEmpty(link))
-            tv_link.setText(CommonUtil.getInstance().jointString(link, "ohter"));
+            tv_link.setText(link);
 
         withdrawal.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                StringUtils.CopyText(CommonUtil.getInstance().jointString(link, "ohter"));
+                StringUtils.CopyText(link);
                 G.showToast("复制链接成功");
             }
         });
@@ -60,7 +76,7 @@ public class DialogShare {
         qq_layotu.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                CommonUtil.getInstance().popShare(activity, link, "qq");
+                CommonUtil.getInstance().popShare(activity, link, QQ, description);
 
                 dialog.dismiss();
             }
@@ -68,7 +84,7 @@ public class DialogShare {
         weixin_layotu.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                CommonUtil.getInstance().popShare(activity, link, "wx");
+                CommonUtil.getInstance().popShare(activity, link, WX, description);
                 dialog.dismiss();
             }
         });
@@ -88,10 +104,12 @@ public class DialogShare {
         try {
             dialog.show();
             Window window = dialog.getWindow();
-            window.setGravity(Gravity.BOTTOM);
-            WindowManager.LayoutParams params = dialog.getWindow().getAttributes();
-            params.width = G.WIDTH > G.HEIGHT? G.HEIGHT : G.WIDTH;
-            dialog.getWindow().setAttributes(params);
+            if(window != null) {
+                window.setGravity(Gravity.BOTTOM);
+                WindowManager.LayoutParams params = window.getAttributes();
+                params.width = G.WIDTH > G.HEIGHT ? G.HEIGHT : G.WIDTH;
+                window.setAttributes(params);
+            }
         } catch (Exception e) {
             e.printStackTrace();
         }

+ 30 - 0
app/src/main/res/layout/ask_to_share.xml

@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_gravity="bottom"
+        android:background="#ffffffff">
+
+        <TextView
+            android:id="@+id/ask_share_title"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="邀请好友"
+            android:textColor="#ff333333"
+            android:textSize="14sp"
+            android:padding="@dimen/content_padding_15"/>
+        <android.support.v7.widget.RecyclerView
+            android:id="@+id/ask_share_list"
+            android:layout_below="@+id/ask_share_title"
+            android:layout_marginTop="20dp"
+            android:layout_marginStart="@dimen/content_padding_15"
+            android:layout_marginBottom="35dp"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"/>
+    </RelativeLayout>
+
+</FrameLayout>

+ 23 - 0
app/src/main/res/layout/ask_to_share_item.xml

@@ -0,0 +1,23 @@
+<?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_horizontal"
+    android:orientation="vertical">
+
+    <ImageView
+        android:id="@+id/ask_to_share_item_img"
+        android:layout_width="50dp"
+        android:layout_height="50dp"
+        android:src="@mipmap/x_ic_wx" />
+
+    <TextView
+        android:id="@+id/ask_to_share_item_name"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="20dp"
+        android:text="面对面"
+        android:textColor="#ff333333"
+        android:textSize="12sp" />
+
+</LinearLayout>