Przeglądaj źródła

界面调整,分享对话框制作

yang_div 8 lat temu
rodzic
commit
90a114688f

+ 189 - 1
app/src/main/java/com/kfzs/duanduan/fragment/FgtPersonalCenter.java

@@ -1,28 +1,57 @@
 package com.kfzs.duanduan.fragment;
 
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.content.Intent;
+import android.net.Uri;
 import android.os.Bundle;
+import android.os.Environment;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
+import android.view.Window;
+import android.view.WindowManager;
 import android.widget.ImageView;
 import android.widget.TextView;
 
+import com.alibaba.fastjson.JSONObject;
+import com.bumptech.glide.Glide;
+import com.bumptech.glide.request.FutureTarget;
+import com.bumptech.glide.request.RequestOptions;
+import com.bumptech.glide.request.target.Target;
 import com.kfzs.duanduan.BaseCompatFragment;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.FriendAndAwardEntity;
 import com.sheep.gamegroup.model.entity.UserEntity;
 import com.sheep.gamegroup.model.entity.WebviewEntity;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.util.AppUtil;
+import com.sheep.gamegroup.util.FastJsonUtils;
 import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.MyDbManager;
+import com.sheep.gamegroup.util.StringUtils;
 import com.sheep.gamegroup.util.UMConfigUtils;
+import com.sheep.gamegroup.view.activity.AskGetMoneyAct;
 import com.sheep.gamegroup.view.activity.PersonalCenterAct;
 import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.utils.G;
 
 import org.xutils.ex.DbException;
 
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.util.Date;
+import java.util.concurrent.ExecutionException;
+
 import butterknife.BindView;
 import butterknife.ButterKnife;
 import butterknife.OnClick;
 import butterknife.Unbinder;
+import rx.android.schedulers.AndroidSchedulers;
+import rx.schedulers.Schedulers;
 
 /**
  * 个人中心
@@ -49,7 +78,7 @@ public class FgtPersonalCenter extends BaseCompatFragment {
     }
 
     private void initData() {
-
+        getShardData();
         try {
             userEntitys = MyDbManager.getInstance().dbFindUser();
         } catch (DbException e) {
@@ -110,10 +139,169 @@ public class FgtPersonalCenter extends BaseCompatFragment {
                                 getActivity());
                 break;
             case R.id.recommend_friend_layout://推荐给好友
+                if(Ety!= null){
+                    shardFriend(getActivity(),Ety.getShare_link());
+                }
                 break;
             case R.id.tv_submit://注销
                 ((PersonalCenterAct)getActivity()).loginOut();
                 break;
         }
     }
+
+
+    /**
+     * 分享对话框
+     * @param activity
+     * @param link
+     */
+    private void shardFriend(final Activity activity, final String link) {
+        AlertDialog.Builder builder = new AlertDialog.Builder(activity);
+        View view = View.inflate(activity, R.layout.x_recommend_dialog, null);
+        builder.setView(view);
+
+        final AlertDialog dialog = builder.create();
+        ImageView iv = view.findViewById(R.id.iv_close);
+        TextView withdrawal = view.findViewById(R.id.withdrawal);
+        TextView tv_link = view.findViewById(R.id.tv_link);
+        TextView save_pic = view.findViewById(R.id.save_pic);
+        ImageView iv_qr = view.findViewById(R.id.iv_qr);
+        ImageView iv_qr_small = view.findViewById(R.id.iv_qr_small);
+
+        tv_link.setText(link);
+
+        Glide.with(activity)
+                .load(AppUtil.getQRLink(link, 800))
+                .apply(new RequestOptions().override(800, 800))
+                .into(iv_qr);
+        Glide.with(activity)
+                .load("http://cdngame.kuaifazs.com/icon.png")
+                .apply(new RequestOptions().override(G.WIDTH/5))
+                .into(iv_qr_small);
+        dialog.show();
+        Window window = dialog.getWindow();
+        if(window != null) {
+            android.view.WindowManager.LayoutParams p = window.getAttributes();
+            p.height = WindowManager.LayoutParams.WRAP_CONTENT;
+//            p.height = G.WIDTH;
+            p.width = G.WIDTH;
+            dialog.getWindow().setAttributes(p);     //设置生效
+        }
+        iv.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                dialog.dismiss();
+            }
+        });
+
+        withdrawal.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                StringUtils.CopyText(activity,Ety.getShare_link());
+                showToast("复制链接成功");
+            }
+        });
+
+        save_pic.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+
+                new Thread(new Runnable() {
+                    @Override
+                    public void run() {
+                        String imagePath =  Environment.getExternalStorageDirectory().getAbsolutePath() + "/" + new Date().toString() +".png";
+                        String path =   getImagePath(AppUtil.getQRLink(link, 800));
+                        /**
+                         * 拷贝到指定路径
+                         */
+                        copyFile(path, imagePath);
+                        Intent intentBroadcast = new Intent(
+                                Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
+                        File file = new File(imagePath);
+                        intentBroadcast.setData(Uri.fromFile(file));
+                        activity.sendBroadcast(intentBroadcast);
+                    }
+                }).start();
+                showToast("已保存");
+            }
+        });
+
+    }
+
+    FriendAndAwardEntity Ety;
+
+    /**
+     * 获取分享数据
+     */
+    private void  getShardData(){
+        SheepApp.get(getActivity()).getNetComponent().getApiService().FriendCountAndAward()
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.mContext) {
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        showToast(baseMessage.getMsg());
+                    }
+
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        if(baseMessage!=null){
+                            Ety = FastJsonUtils.toBean( JSONObject.toJSONString(baseMessage.getData()),FriendAndAwardEntity.class);
+                        }else{
+                            showToast("数据解析出错");
+                        }
+
+                    }
+                });
+
+    }
+
+
+    /**
+     * 获取Glide显示图片的缓存路径
+     * @param imgUrl
+     * @return
+     */
+    private String getImagePath(String imgUrl) {
+        String path = null;
+        FutureTarget<File> future = Glide.with(this)
+                .load(imgUrl)
+                .downloadOnly(Target.SIZE_ORIGINAL,Target.SIZE_ORIGINAL);
+        try {
+            File cacheFile = future.get();
+            path = cacheFile.getAbsolutePath();
+        } catch (InterruptedException | ExecutionException e) {
+            e.printStackTrace();
+        }
+        return path;
+    }
+
+    /**
+     * 保存图片
+     * @param oldPath
+     * @param newPath
+     */
+    public void copyFile(String oldPath, String newPath) {
+        try {
+            int bytesum = 0;
+            int byteread = 0;
+            File oldfile = new File(oldPath);
+            if (oldfile.exists()) { //文件存在时
+                InputStream inStream = new FileInputStream(oldPath); //读入原文件
+                FileOutputStream fs = new FileOutputStream(newPath);
+                byte[] buffer = new byte[1024];
+                while ( (byteread = inStream.read(buffer)) != -1) {
+                    bytesum += byteread; //字节数 文件大小
+                    fs.write(buffer, 0, byteread);
+                }
+                inStream.close();
+            }
+        }
+        catch (Exception e) {
+            e.printStackTrace();
+
+        }
+
+    }
+
 }

+ 1 - 1
app/src/main/java/com/kfzs/duanduan/fragment/FgtSmallSheep.java

@@ -418,7 +418,7 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
             case R.id.recharge:
             case R.id.q_dec_tv:
 //                G.showToast("Q币充值");
-                Jump2View.getInstance().goRechargeQAct(activity,null);
+                Jump2View.getInstance().goRechargeAct(activity,null);
                 break;
             case R.id.lying_iv://躺着赚钱
             case R.id.lying_dec_tv:

+ 19 - 0
app/src/main/java/com/sheep/gamegroup/model/api/ApiService.java

@@ -333,12 +333,31 @@ public interface ApiService {
 
     /******div***/
 
+    /**
+     * 获取下发充值类型
+     * @param page
+     * @return
+     */
     @GET("app/recharge/pay_way")
     Observable<BaseMessage> getRechargePayway(@Query("type") String page);
 
+    /**
+     * 充值
+     * @param jsonObject
+     * @return
+     */
     @POST("app/recharge/recharge_balance")
     Observable<BaseMessage> getRechargeBalance(@Body JSONObject jsonObject);
 
+
+    /**
+     * 绵羊币充值
+     * @param parame
+     * @return
+     */
+    @POST("app/***/")
+    Observable<BaseMessage> goRechargeQ(@Body JSONObject parame);
+
     /******div***/
 
     /**

+ 19 - 12
app/src/main/java/com/sheep/gamegroup/model/entity/RechargeQEntity.java

@@ -6,17 +6,16 @@ package com.sheep.gamegroup.model.entity;
 
 public class RechargeQEntity {
 
-    public RechargeQEntity(boolean selectState, String value) {
-        this.selectState = selectState;
-        this.value = value;
-    }
+    private boolean selectState;
+    private String text;
+    private String price;
 
-    public RechargeQEntity() {
+    public RechargeQEntity(boolean selectState, String price,String text) {
+        this.selectState = selectState;
+        this.price = price;
+        this.text = text;
     }
 
-    private boolean selectState;
-    private String value;
-
     public boolean isSelectState() {
         return selectState;
     }
@@ -25,11 +24,19 @@ public class RechargeQEntity {
         this.selectState = selectState;
     }
 
-    public String getValue() {
-        return value == null? "": value;
+    public String getText() {
+        return text;
+    }
+
+    public void setText(String text) {
+        this.text = text;
+    }
+
+    public String getPrice() {
+        return price;
     }
 
-    public void setValue(String value) {
-        this.value = value;
+    public void setPrice(String price) {
+        this.price = price;
     }
 }

+ 3 - 1
app/src/main/java/com/sheep/gamegroup/presenter/RechargeQContract.java

@@ -11,11 +11,13 @@ public interface RechargeQContract {
 
     interface Presenter{
 
-
+        void goRechargeQ(JSONObject jsonObject);
 
     }
 
     interface View{
+        void succRechargeQ(BaseMessage o);
+        void failRechargeQ(BaseMessage o);
 
     }
 }

+ 18 - 53
app/src/main/java/com/sheep/gamegroup/presenter/RechargeQPresenter.java

@@ -26,57 +26,22 @@ public class RechargeQPresenter implements RechargeQContract.Presenter {
         this.apiService = apiService;
     }
 
-//    @Override
-//    public void goWithdrawal(JSONObject jsonObject) {
-//        apiService.goWithdrawal(jsonObject)
-//                .subscribeOn(Schedulers.io())
-//                .observeOn(AndroidSchedulers.mainThread())
-//                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.mContext) {
-//                    @Override
-//                    public void onError(BaseMessage baseMessage) {
-//                        view.failData(baseMessage);
-//                    }
-//
-//                    @Override
-//                    public void onNext(BaseMessage baseMessage) {
-//                        view.updateView(baseMessage);
-//                    }
-//                });
-//    }
-//
-//    @Override
-//    public void getCanWithdrawAmount() {
-//        apiService.getCanWithdrawAmount()
-//                .subscribeOn(Schedulers.io())
-//                .observeOn(AndroidSchedulers.mainThread())
-//                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.mContext) {
-//                    @Override
-//                    public void onError(BaseMessage baseMessage) {
-//                        view.failBalanceData(baseMessage);
-//                    }
-//
-//                    @Override
-//                    public void onNext(BaseMessage baseMessage) {
-//                        view.updateBalanceView(baseMessage);
-//                    }
-//                });
-//    }
-//
-//    @Override
-//    public void getWithdrawAmountOption() {
-//        apiService.getWithdrawAmountOption()
-//                .subscribeOn(Schedulers.io())
-//                .observeOn(AndroidSchedulers.mainThread())
-//                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.mContext) {
-//                    @Override
-//                    public void onError(BaseMessage baseMessage) {
-//                        view.failWithdrawAmountOptionData(baseMessage);
-//                    }
-//
-//                    @Override
-//                    public void onNext(BaseMessage baseMessage) {
-//                        view.updateWithdrawAmountOptionView(baseMessage);
-//                    }
-//                });
-//    }
+    @Override
+    public void goRechargeQ(JSONObject jsonObject) {
+        apiService.goRechargeQ(jsonObject)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.mContext) {
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        view.failRechargeQ(baseMessage);
+                    }
+
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        view.succRechargeQ(baseMessage);
+                    }
+                });
+    }
+
 }

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

@@ -150,6 +150,8 @@ public class AskGetMoneyAct extends BaseUMActivity implements UMShareListener, A
     }
 
 
+
+
     @Override
     public void onStart(SHARE_MEDIA share_media) {
 

+ 40 - 14
app/src/main/java/com/sheep/gamegroup/view/activity/RechargeQAct.java

@@ -4,6 +4,7 @@ import android.app.Activity;
 import android.graphics.Color;
 import android.text.SpannableString;
 import android.text.Spanned;
+import android.text.TextUtils;
 import android.text.style.ForegroundColorSpan;
 import android.view.View;
 import android.widget.AdapterView;
@@ -13,6 +14,7 @@ import android.widget.TextView;
 import com.sheep.gamegroup.absBase.BaseActivity;
 import com.sheep.gamegroup.di.components.DaggerRechargeQComponent;
 import com.sheep.gamegroup.di.modules.RechargeQModule;
+import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.RechargeQEntity;
 import com.sheep.gamegroup.presenter.RechargeQContract;
 import com.sheep.gamegroup.presenter.RechargeQPresenter;
@@ -21,6 +23,7 @@ import com.sheep.gamegroup.util.MyGridview;
 import com.sheep.gamegroup.view.adapter.RechargeQAdapter;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.utils.G;
 import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
 
 import java.util.ArrayList;
@@ -54,12 +57,13 @@ public class RechargeQAct extends BaseActivity implements RechargeQContract.View
     EditText etQq;
     @BindView(R.id.rechargeq_sure)
     TextView rechargeqSure;
-
     private List<RechargeQEntity> wlLists = new ArrayList<>();
-
     private RechargeQAdapter adapter;
     private int select;
 
+    String text_qq;//充值QQ号
+    String text_QBNumber;//充值金额
+
     @Override
     protected int getLayoutId() {
         return R.layout.rechargeq_layout;
@@ -86,6 +90,7 @@ public class RechargeQAct extends BaseActivity implements RechargeQContract.View
             @Override
             public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                 select = position;
+                RechargeQEntity rechargeQEntity = (RechargeQEntity) parent.getItemAtPosition(position);
                 for (int i = 0; i < wlLists.size(); i++) {
                     if (position == i) {
                         wlLists.get(i).setSelectState(true);
@@ -95,24 +100,22 @@ public class RechargeQAct extends BaseActivity implements RechargeQContract.View
                     }
                     adapter.notifyDataSetChanged();
                 }
+                text_QBNumber = rechargeQEntity.getPrice();
+                tvMybNumber.setText(String.format(getString(R.string.rechargeq_amount),rechargeQEntity.getPrice()));
             }
         });
 
         tvZk.setText(getSpannableString());
-//        showProgress();
-//        presenter.getCanWithdrawAmount();
-//        presenter.getWithdrawAmountOption();
+
     }
 
     private void tests(){
-        wlLists.add(new RechargeQEntity(true,"1"));
-        wlLists.add(new RechargeQEntity(false,"1"));
-        wlLists.add(new RechargeQEntity(false,"1"));
-        wlLists.add(new RechargeQEntity(false,"1"));
-        wlLists.add(new RechargeQEntity(false,"1"));
-        wlLists.add(new RechargeQEntity(false,"1"));
-        wlLists.add(new RechargeQEntity(false,"1"));
-        wlLists.add(new RechargeQEntity(false,"1"));
+        wlLists.add(new RechargeQEntity(true,"9.5","10QB"));
+        wlLists.add(new RechargeQEntity(true,"19","20QB"));
+        wlLists.add(new RechargeQEntity(true,"47.5","50QB"));
+        wlLists.add(new RechargeQEntity(true,"95","100QB"));
+        wlLists.add(new RechargeQEntity(true,"190","200QB"));
+        wlLists.add(new RechargeQEntity(true,"475","500QB"));
     }
 
     @Override
@@ -133,12 +136,35 @@ public class RechargeQAct extends BaseActivity implements RechargeQContract.View
                 Jump2View.getInstance().goRechargeAct(activity,null);
                 break;
             case R.id.rechargeq_sure:
+                if(TextUtils.isEmpty(text_QBNumber)){
+                    text_QBNumber = etQbNumber.getText().toString().trim();
+                }
+                if(TextUtils.isEmpty(text_QBNumber)){
+                    G.showToast("请选择充值QB数量");
+                    return;
+                }
+                text_qq = etQq.getText().toString().trim();
+                if(TextUtils.isEmpty(text_qq)){
+                    G.showToast("请输入QQ号");
+                    return;
+                }
+
+         showProgress();
+         presenter.goRechargeQ(null);
                 break;
         }
     }
 
+    @Override
+    public void succRechargeQ(BaseMessage o) {
+        hideProgress();
+    }
 
-
+    @Override
+    public void failRechargeQ(BaseMessage o) {
+        hideProgress();
+        G.showToast(o.getMsg());
+    }
 
     private SpannableString getSpannableString(){
         SpannableString spannableString = new SpannableString("(使用绵羊币充值享95折优惠)");

+ 2 - 2
app/src/main/java/com/sheep/gamegroup/view/adapter/RechargeQAdapter.java

@@ -74,8 +74,8 @@ public class RechargeQAdapter extends BaseAdapter {
             holder.item_tv_y.setTextColor(ContextCompat.getColor(context,R.color.blue_end));
         }
 
-//        holder.item_tv_qb.setText("100QB");
-//        holder.item_tv_y.setText(priceShow.getValue() +"元");
+        holder.item_tv_qb.setText(priceShow.getText());
+        holder.item_tv_y.setText(priceShow.getPrice() +"元");
 
         return convertView;
     }

+ 3 - 1
app/src/main/res/layout/rechargeq_layout.xml

@@ -94,7 +94,7 @@
 
                         <TextView
                             android:id="@+id/tv_myb_number"
-                            android:layout_width="wrap_content"
+                            android:layout_width="155dp"
                             android:layout_height="wrap_content"
                             android:text="当前绵羊币金额:150元"
                             android:textColor="@color/black_444444"
@@ -135,6 +135,8 @@
                         android:layout_height="40dp"
                         android:background="@null"
                         android:hint="请输入QQ号"
+                        android:inputType="number"
+                        android:maxLength="11"
                         android:textColor="@color/black_444444"
                         android:textColorHint="@color/disenable_color"
                         android:textSize="@dimen/text_size_3" />

+ 146 - 0
app/src/main/res/layout/x_recommend_dialog.xml

@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/white"
+    android:orientation="vertical">
+
+
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="40dp">
+        <TextView
+            android:layout_width="match_parent"
+            android:layout_height="40dp"
+            android:layout_gravity="center"
+            android:gravity="center"
+            android:background="@color/blue_end"
+            android:text="推荐给好友"
+            android:textColor="@color/white"
+            android:textSize="@dimen/text_size_16" />
+        <ImageView
+            android:id="@+id/iv_close"
+            android:layout_width="30dp"
+            android:layout_height="30dp"
+            android:layout_gravity="right"
+            android:layout_centerVertical="true"
+            android:layout_alignParentRight="true"
+            android:layout_marginRight="@dimen/content_padding_10"
+            android:src="@mipmap/try_dialog_x" />
+    </RelativeLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginBottom="20dp"
+        android:layout_marginLeft="20dp"
+        android:layout_marginRight="20dp"
+        android:layout_marginTop="@dimen/text_size_5"
+        android:orientation="vertical">
+
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="left"
+            android:layout_marginLeft="20dp"
+            android:layout_marginRight="20dp"
+            android:layout_marginTop="@dimen/content_padding_small"
+            android:layout_marginBottom="@dimen/content_padding_small"
+            android:text="请小绵羊下载链接发给好友"
+            android:textColor="@color/txt_black_cc444444"
+            android:textSize="@dimen/text_size_15" />
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="40dp"
+            android:layout_marginLeft="20dp"
+            android:layout_marginRight="20dp"
+            android:gravity="center_vertical"
+            android:orientation="horizontal">
+
+            <TextView
+                android:id="@+id/tv_link"
+                android:layout_width="0.0dp"
+                android:layout_height="30dp"
+                android:layout_weight="1"
+                android:gravity="left|center_vertical"
+                android:lines="1"
+                android:maxLines="1"
+                android:singleLine="true"
+                android:paddingLeft="@dimen/content_padding_10"
+                android:paddingRight="@dimen/content_padding_10"
+                android:textColor="@color/txt_black_cc444444"
+                android:textSize="@dimen/text_size_15"
+                android:background="@drawable/recharge_bg_angle_blue_normal"
+                />
+
+            <TextView
+                android:id="@+id/withdrawal"
+                style="@style/style_button"
+                android:layout_width="wrap_content"
+                android:layout_height="@dimen/content_padding_30"
+                android:textSize="@dimen/text_size_12"
+                android:layout_marginBottom="5dp"
+                android:layout_marginLeft="10dp"
+                android:layout_marginTop="5dp"
+                android:text="复制链接" />
+        </LinearLayout>
+
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center"
+            android:layout_marginTop="5dp"
+            android:text="通过链接加入小绵羊即为你的好友下线,好友完成任务你可以额外获得20%的提成奖励哦!"
+            android:textColor="@color/txt_black_cc444444"
+            android:layout_marginRight="@dimen/content_padding_20"
+            android:layout_marginLeft="@dimen/content_padding_20"
+            android:textSize="@dimen/text_size_12" />
+
+
+        <RelativeLayout
+            android:layout_width="wrap_content"
+            android:layout_height="180dp"
+            android:layout_gravity="center_horizontal"
+            android:layout_marginLeft="@dimen/content_padding_20"
+            android:layout_marginRight="@dimen/content_padding_20"
+            android:layout_marginTop="5dp"
+            >
+
+            <ImageView
+                android:id="@+id/iv_qr"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerInParent="true"
+                android:src="@drawable/loading" />
+
+            <ImageView
+                android:id="@+id/iv_qr_small"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerInParent="true" />
+
+        </RelativeLayout>
+
+        <TextView
+            android:id="@+id/save_pic"
+            style="@style/style_button"
+            android:layout_marginBottom="20dp"
+            android:layout_marginLeft="100dp"
+            android:layout_marginRight="100dp"
+            android:layout_marginTop="20dp"
+            android:text="保存二维码至手机" />
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center"
+            android:layout_marginTop="10dp"
+            android:text="邀请好友下载小绵羊App,开启赚钱之路"
+            android:textColor="@color/txt_black_cc444444"
+            android:textSize="13sp" />
+    </LinearLayout>
+</LinearLayout>

+ 1 - 0
app/src/main/res/values/strings.xml

@@ -19,6 +19,7 @@
     <string name="agent_extract">代理提成:%s元</string>
     <string name="recharge_amount">充值金额:%s元</string>
     <string name="available_amount">可提现金额:%s元</string>
+    <string name="rechargeq_amount">当前绵羊币金额:%s元</string>
 
     <string name="feedback_notice_hellow">致亲爱的您,\n &#160;&#160;&#160;&#160;&#160;我们会重视您提出的每一个建议。您的批评与意见是我们产品前进的动力,感谢您对小绵羊APP的支持!</string>
     <string name="feedback_notice_end">小绵羊项目组全体人员</string>