Procházet zdrojové kódy

Merge remote-tracking branch 'origin/sheep2.0' into sheep2.0

# Conflicts:
#	app/build.gradle
#	app/src/main/AndroidManifest.xml
zengjiebin před 8 roky
rodič
revize
3933e5aeb5
31 změnil soubory, kde provedl 1466 přidání a 13 odebrání
  1. 1 1
      .idea/misc.xml
  2. 15 10
      app/build.gradle
  3. 24 0
      app/src/main/AndroidManifest.xml
  4. 6 2
      app/src/main/java/com/kfzs/duanduan/fragment/FgtSmallSheep.java
  5. 1 0
      app/src/main/java/com/sheep/gamegroup/alipay/PayResult.java
  6. 16 0
      app/src/main/java/com/sheep/gamegroup/di/components/RechargeQComponent.java
  7. 22 0
      app/src/main/java/com/sheep/gamegroup/di/modules/RechargeQModule.java
  8. 12 0
      app/src/main/java/com/sheep/gamegroup/model/api/ApiService.java
  9. 43 0
      app/src/main/java/com/sheep/gamegroup/model/entity/RechargeEntity.java
  10. 46 0
      app/src/main/java/com/sheep/gamegroup/model/entity/RechargePriceEntity.java
  11. 35 0
      app/src/main/java/com/sheep/gamegroup/model/entity/RechargeQEntity.java
  12. 21 0
      app/src/main/java/com/sheep/gamegroup/presenter/RechargeQContract.java
  13. 82 0
      app/src/main/java/com/sheep/gamegroup/presenter/RechargeQPresenter.java
  14. 44 0
      app/src/main/java/com/sheep/gamegroup/util/Jump2View.java
  15. 219 0
      app/src/main/java/com/sheep/gamegroup/view/activity/RechargeAct.java
  16. 149 0
      app/src/main/java/com/sheep/gamegroup/view/activity/RechargeQAct.java
  17. 62 0
      app/src/main/java/com/sheep/gamegroup/view/activity/RechargeResultAct.java
  18. 86 0
      app/src/main/java/com/sheep/gamegroup/view/adapter/RechargeAdapter.java
  19. 82 0
      app/src/main/java/com/sheep/gamegroup/view/adapter/RechargePriceAdapter.java
  20. 87 0
      app/src/main/java/com/sheep/gamegroup/view/adapter/RechargeQAdapter.java
  21. 18 0
      app/src/main/res/drawable/recharge_bg_angle_blue_hold.xml
  22. 17 0
      app/src/main/res/drawable/recharge_bg_angle_blue_normal.xml
  23. 14 0
      app/src/main/res/layout/homepage_item_top2.xml
  24. 115 0
      app/src/main/res/layout/recharge_act_layout.xml
  25. 10 0
      app/src/main/res/layout/recharge_gridview_item.xml
  26. 33 0
      app/src/main/res/layout/recharge_result_act_layout.xml
  27. 20 0
      app/src/main/res/layout/rechargeprice_gridview_item.xml
  28. 29 0
      app/src/main/res/layout/rechargeq_gridview_item.xml
  29. 157 0
      app/src/main/res/layout/rechargeq_layout.xml
  30. binární
      app/src/main/res/mipmap-xhdpi/icon_pay_result_bg.png
  31. binární
      app/src/main/res/mipmap-xxhdpi/icon_pay_result_bg.png

+ 1 - 1
.idea/misc.xml

@@ -24,7 +24,7 @@
       </value>
     </option>
   </component>
-  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="JDK" project-jdk-type="JavaSDK">
     <output url="file://$PROJECT_DIR$/build/classes" />
   </component>
   <component name="ProjectType">

+ 15 - 10
app/build.gradle

@@ -128,16 +128,16 @@ dependencies {
     compile 'com.android.support:design:27.1.0'
     compile 'com.android.support.constraint:constraint-layout:1.0.2'
     testCompile 'junit:junit:4.12'
-
     compile 'com.google.code.gson:gson:2.8.2'
     compile('com.jcodecraeer:xrecyclerview:1.5.2') {
-    //    compile 'com.shark:screencapture:1.0.0'
+        //    compile 'com.shark:screencapture:1.0.0'
         exclude group: 'com.android.support', module: 'design'
     }
     compile 'com.squareup.okhttp3:okhttp:3.10.0'
     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.liulishuo.filedownloader:library:1.6.9'
     compile 'com.tencent.bugly:crashreport_upgrade:1.3.4'
 
     //其中latest.release指代最新版本号,也可以指定明确的版本号,例如1.2.0
@@ -149,13 +149,15 @@ dependencies {
     debugCompile('com.readystatesoftware.chuck:library:1.1.0') {
         exclude group: 'com.android.support', module: 'design'
     }
-//    compile 'de.hdodenhof:circleimageview:2.2.0'
+
+    //    compile 'de.hdodenhof:circleimageview:2.2.0'
     releaseCompile('com.readystatesoftware.chuck:library-no-op:1.1.0') {
         exclude group: 'com.android.support', module: 'design'
     }
     compile 'org.xutils:xutils:3.5.0'
     compile 'com.mylhyl:acp:1.1.7'
-//    compile 'cn.yipianfengye.android:zxing-library:2.2'
+
+    //    compile 'cn.yipianfengye.android:zxing-library:2.2'
     compile 'com.github.huburt-Hu:NewbieGuide:v1.2.0'
     debugCompile 'com.android.support:multidex:1.0.1'
 
@@ -210,7 +212,8 @@ dependencies {
     compile 'com.flipboard:bottomsheet-commons:1.5.3'
     compile 'com.google.protobuf:protobuf-java:3.2.0'
     compile 'com.umeng.analytics:analytics:6.0.9'
-//    compile(name: 'FileDownloader-1.0.0', ext: 'aar')
+
+    //    compile(name: 'FileDownloader-1.0.0', ext: 'aar')
 
     //    compile files('libs/SocialSDK_QQ_Simplify.jar')
 
@@ -255,17 +258,19 @@ dependencies {
     compile 'com.github.zhangkexpz:LayoutScroll:v1.0'
     compile 'me.iwf.photopicker:PhotoPicker:0.9.12@aar'
     compile 'com.github.bumptech.glide:glide:4.1.1'
-//    compile 'com.github.yalantis:ucrop:2.2.1-native'
-//    compile 'com.google.zxing:core:3.3.0'
+
+    //    compile 'com.github.yalantis:ucrop:2.2.1-native'
+
+    //    compile 'com.google.zxing:core:3.3.0'
     compile project(':ucrop')
     compile project(':kfzslibrary')
-
-    compile ('com.arialyy.aria:aria-core:3.3.16'){
+    compile('com.arialyy.aria:aria-core:3.3.16') {
         exclude group: 'com.android.support'
     }
     annotationProcessor 'com.arialyy.aria:aria-compiler:3.3.16'
     compile 'com.sunfusheng:marqueeview:1.3.3'
     compile 'com.github.nanchen2251:CompressHelper:1.0.5'
+    compile files('libs/alipaySdk-20170922.jar')
     //极光
     compile files('libs/jcore-android-1.2.0.jar')
     compile files('libs/jpush-android-3.1.2.jar')

+ 24 - 0
app/src/main/AndroidManifest.xml

@@ -416,6 +416,30 @@
         <meta-data android:name="JPUSH_CHANNEL" android:value="developer-default"/>
         <meta-data android:name="JPUSH_APPKEY" android:value="28b74d520261c6f78e3e0921" /> <!--  </>值来自开发者平台取得的AppKey-->
         <!--极光推送end-->
+
+        <!-- div start-->
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.RechargeAct"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.RechargeQAct"
+            android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.view.activity.RechargeResultAct"
+            android:screenOrientation="portrait" />
+        <!-- div end-->
+
+        <!-- alipay 支付宝 sdk begin -->
+        <activity
+            android:name="com.alipay.sdk.app.H5PayActivity"
+            android:configChanges="orientation|keyboardHidden|navigation|screenSize"
+            android:exported="false"
+            android:screenOrientation="behind"
+            android:windowSoftInputMode="adjustResize|stateHidden" >
+        </activity>
+
+        <!-- alipay 支付宝 sdk end -->
+
     </application>
 
 

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

@@ -143,6 +143,8 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
     SwipeRefreshLayout refresh;
     @BindView(R.id.recyclerview)
     RecyclerView recyclerview;
+    @BindView(R.id.recharge)
+    TextView recharge;
 
     @Inject
     SmallSheepPresenter pagePresenter;
@@ -368,7 +370,7 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
                 });
     }
 
-    @OnClick({ R.id.user_layout, R.id.withdrawal, R.id.try_play_layout,
+    @OnClick({R.id.recharge, R.id.user_layout, R.id.withdrawal, R.id.try_play_layout,
             R.id.invitation_layout, R.id.lying_layout, R.id.newbie_task,
             R.id.card_layout, R.id.icon_layout, R.id.info_layout, R.id.homepage_wxfz,
             R.id.q_iv, R.id.q_name_tv, R.id.q_dec_tv,
@@ -430,8 +432,10 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
                 break;
             case R.id.q_iv://Q币充值
             case R.id.q_name_tv:
+            case R.id.recharge:
             case R.id.q_dec_tv:
-                G.showToast("Q币充值");
+//                G.showToast("Q币充值");
+                Jump2View.getInstance().goRechargeQAct(activity,null);
                 break;
             case R.id.lying_iv://躺着赚钱
             case R.id.lying_dec_tv:

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 0
app/src/main/java/com/sheep/gamegroup/alipay/PayResult.java


+ 16 - 0
app/src/main/java/com/sheep/gamegroup/di/components/RechargeQComponent.java

@@ -0,0 +1,16 @@
+package com.sheep.gamegroup.di.components;
+
+import com.sheep.gamegroup.di.modules.RechargeQModule;
+import com.sheep.gamegroup.di.scopes.UserScope;
+import com.sheep.gamegroup.view.activity.RechargeQAct;
+
+import dagger.Component;
+
+/**
+ * Created by ljy on 2018/3/18.
+ */
+@UserScope
+@Component(modules = RechargeQModule.class, dependencies = NetComponent.class)
+public interface RechargeQComponent {
+    void inject(RechargeQAct withdrawalAct);
+}

+ 22 - 0
app/src/main/java/com/sheep/gamegroup/di/modules/RechargeQModule.java

@@ -0,0 +1,22 @@
+package com.sheep.gamegroup.di.modules;
+
+import com.sheep.gamegroup.presenter.RechargeQContract;
+
+import dagger.Module;
+import dagger.Provides;
+
+/**
+ * Created by ljy on 2018/3/18.
+ */
+@Module
+public class RechargeQModule {
+    private RechargeQContract.View view;
+
+    public RechargeQModule(RechargeQContract.View view) {
+        this.view = view;
+    }
+    @Provides
+    public RechargeQContract.View provideView(){
+        return view;
+    }
+}

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

@@ -328,4 +328,16 @@ public interface ApiService {
      */
     @GET("app/user/consumption_log")
     Observable<BaseMessage> getConsumption_log(@Query("page") int page, @Query("per_page") int per_page);
+
+
+
+    /******div***/
+
+    @GET("app/recharge/pay_way")
+    Observable<BaseMessage> getRechargePayway(@Query("type") String page);
+
+    @POST("app/recharge/recharge_balance")
+    Observable<BaseMessage> getRechargeBalance(@Body JSONObject jsonObject);
+
+    /******div***/
 }

+ 43 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/RechargeEntity.java

@@ -0,0 +1,43 @@
+package com.sheep.gamegroup.model.entity;
+
+/**
+ * Created by Administrator on 2018/4/13.
+ */
+
+public class RechargeEntity {
+
+    /**
+     * Id : 1
+     * Name : 支付宝
+     * Status : 0
+     */
+
+    private int Id;
+    private String Name;
+    private int Status;
+
+    public int getId() {
+        return Id;
+    }
+
+    public void setId(int Id) {
+        this.Id = Id;
+    }
+
+    public String getName() {
+        return Name;
+    }
+
+    public void setName(String Name) {
+        this.Name = Name;
+    }
+
+    public int getStatus() {
+        return Status;
+    }
+
+    public void setStatus(int Status) {
+        this.Status = Status;
+    }
+
+}

+ 46 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/RechargePriceEntity.java

@@ -0,0 +1,46 @@
+package com.sheep.gamegroup.model.entity;
+
+/**
+ * Created by Administrator on 2018/4/13.
+ * 充值金额
+ */
+
+public class RechargePriceEntity {
+
+
+
+    private boolean selectState;//选中状态
+    private String value;//充值描述
+    private int price;//充值金额
+
+    public RechargePriceEntity(boolean selectState, String value,int price) {
+        this.selectState = selectState;
+        this.value = value;
+        this.price = price;
+    }
+
+
+    public boolean isSelectState() {
+        return selectState;
+    }
+
+    public void setSelectState(boolean selectState) {
+        this.selectState = selectState;
+    }
+
+    public String getValue() {
+        return value == null? "": value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    public int getPrice() {
+        return price;
+    }
+
+    public void setPrice(int price) {
+        this.price = price;
+    }
+}

+ 35 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/RechargeQEntity.java

@@ -0,0 +1,35 @@
+package com.sheep.gamegroup.model.entity;
+
+/**
+ * Created by ljy on 2018/3/18.
+ */
+
+public class RechargeQEntity {
+
+    public RechargeQEntity(boolean selectState, String value) {
+        this.selectState = selectState;
+        this.value = value;
+    }
+
+    public RechargeQEntity() {
+    }
+
+    private boolean selectState;
+    private String value;
+
+    public boolean isSelectState() {
+        return selectState;
+    }
+
+    public void setSelectState(boolean selectState) {
+        this.selectState = selectState;
+    }
+
+    public String getValue() {
+        return value == null? "": value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+}

+ 21 - 0
app/src/main/java/com/sheep/gamegroup/presenter/RechargeQContract.java

@@ -0,0 +1,21 @@
+package com.sheep.gamegroup.presenter;
+
+import com.alibaba.fastjson.JSONObject;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+
+/**
+ * Created by ljy on 2018/3/18.
+ */
+
+public interface RechargeQContract {
+
+    interface Presenter{
+
+
+
+    }
+
+    interface View{
+
+    }
+}

+ 82 - 0
app/src/main/java/com/sheep/gamegroup/presenter/RechargeQPresenter.java

@@ -0,0 +1,82 @@
+package com.sheep.gamegroup.presenter;
+
+import com.alibaba.fastjson.JSONObject;
+import com.sheep.gamegroup.model.api.ApiService;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+
+import javax.inject.Inject;
+
+import rx.android.schedulers.AndroidSchedulers;
+import rx.schedulers.Schedulers;
+
+/**
+ * Created by ljy on 2018/3/18.
+ */
+
+public class RechargeQPresenter implements RechargeQContract.Presenter {
+
+    private RechargeQContract.View view;
+    private ApiService apiService;
+
+    @Inject
+    public RechargeQPresenter(RechargeQContract.View view, ApiService apiService) {
+        this.view = view;
+        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);
+//                    }
+//                });
+//    }
+}

+ 44 - 0
app/src/main/java/com/sheep/gamegroup/util/Jump2View.java

@@ -41,6 +41,9 @@ import com.sheep.gamegroup.view.activity.PersionInfoAct;
 import com.sheep.gamegroup.view.activity.PersonalCenterAct;
 import com.sheep.gamegroup.view.activity.PhoneAct;
 import com.sheep.gamegroup.view.activity.RealNameAuthenAct;
+import com.sheep.gamegroup.view.activity.RechargeAct;
+import com.sheep.gamegroup.view.activity.RechargeQAct;
+import com.sheep.gamegroup.view.activity.RechargeResultAct;
 import com.sheep.gamegroup.view.activity.TaskDetailAct;
 import com.sheep.gamegroup.view.activity.TaskDetailAddQQAct;
 import com.sheep.gamegroup.view.activity.TaskDetailCreditCardAct;
@@ -508,4 +511,45 @@ public class Jump2View {
         Intent intent = new Intent(context, ActMyMoney.class);
         context.startActivity(intent);
     }
+
+
+
+
+
+
+
+
+
+
+
+    /**
+     * 跳到充值结果页面
+     * @param context
+     * @param resultStatus 支付宝支付结果码
+     */
+    public void goRechargeResultAct(Context context, String resultStatus){
+        Intent intent = new Intent(context, RechargeResultAct.class);
+        intent.putExtra("payCode",resultStatus);
+        context.startActivity(intent);
+    }
+
+    /**
+     * 跳到充值页面
+     * @param context
+     * @param o
+     */
+    public void goRechargeAct(Context context, Object o){
+        Intent intent = new Intent(context, RechargeAct.class);
+        context.startActivity(intent);
+    }
+
+    /**
+     * 跳到绵羊币充值充值页面
+     * @param context
+     * @param o
+     */
+    public void goRechargeQAct(Context context, Object o){
+        Intent intent = new Intent(context, RechargeQAct.class);
+        context.startActivity(intent);
+    }
 }

+ 219 - 0
app/src/main/java/com/sheep/gamegroup/view/activity/RechargeAct.java

@@ -0,0 +1,219 @@
+package com.sheep.gamegroup.view.activity;
+
+import android.view.View;
+import android.widget.AdapterView;
+
+import com.alibaba.fastjson.JSONObject;
+import com.alipay.sdk.app.PayTask;
+import com.sheep.gamegroup.absBase.BaseActivity;
+import com.sheep.gamegroup.alipay.PayResult;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.RechargeEntity;
+import com.sheep.gamegroup.model.entity.RechargePriceEntity;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.util.Jump2View;
+import com.sheep.gamegroup.util.MyGridview;
+import com.sheep.gamegroup.view.adapter.RechargeAdapter;
+import com.sheep.gamegroup.view.adapter.RechargePriceAdapter;
+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;
+import java.util.List;
+
+import butterknife.BindView;
+import butterknife.OnClick;
+import rx.android.schedulers.AndroidSchedulers;
+import rx.schedulers.Schedulers;
+
+/**
+ * Created by Administrator on 2018/3/19.
+ * 充值界面
+ */
+
+public class RechargeAct extends BaseActivity {
+
+    int mPayType = -1;//选择支付方式的id
+    String mAmount = null;//支付的金额
+
+    @BindView(R.id.rechargeprice_greidview)
+    MyGridview rechargeprice_greidview;
+    @BindView(R.id.recharge_greidview)
+    MyGridview rechargeGreidview;
+
+    RechargePriceAdapter rechargePriceAdapter;
+    List<RechargePriceEntity> mPriceEntityList = new ArrayList<>();
+    int select = -1;
+
+    RechargeAdapter rechargeAdapter;
+
+
+    @Override
+    protected int getLayoutId() {
+        return R.layout.recharge_act_layout;
+    }
+
+    @Override
+    public void initView() {
+        TitleBarUtils.getInstance()
+                .setTitle(this, "充值")
+                .setTitleFinish(this);
+    }
+
+    @Override
+    public void initListener() {
+    }
+
+    @Override
+    public void initData() {
+        addDatas();
+        rechargePriceAdapter = new RechargePriceAdapter(RechargeAct.this, mPriceEntityList);
+        rechargeprice_greidview.setVerticalSpacing(20);
+        rechargeprice_greidview.setAdapter(rechargePriceAdapter);
+        rechargeprice_greidview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+            @Override
+            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+                select = position;
+                for (int i = 0; i < mPriceEntityList.size(); i++) {
+                    if (position == i) {
+                        mPriceEntityList.get(i).setSelectState(true);
+                    } else {
+                        mPriceEntityList.get(i).setSelectState(false);
+
+                    }
+                    rechargePriceAdapter.notifyDataSetChanged();
+                }
+            }
+        });
+
+
+        rechargeAdapter = new RechargeAdapter(RechargeAct.this);
+
+        rechargeGreidview.setVerticalSpacing(40);
+        rechargeGreidview.setAdapter(rechargeAdapter);
+        rechargeGreidview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+            @Override
+            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+                RechargeEntity  rechargeEntity = (RechargeEntity) parent.getItemAtPosition(position);
+                mPayType = rechargeEntity.getId();
+                rechargeAdapter.setSelect(position);
+                rechargeAdapter.notifyDataSetChanged();
+            }
+        });
+
+
+        showProgress();
+        getRechargePayway();
+    }
+
+    private void getRechargePayway() {
+        SheepApp.getInstance().getNetComponent().getApiService().getRechargePayway("2")
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(RechargeAct.this) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        hideProgress();
+                        List<RechargeEntity> list = baseMessage.getDatas(RechargeEntity.class);
+                        rechargeAdapter.addAll(list);
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        hideProgress();
+                        G.showToast(baseMessage.getMsg() + "");
+                    }
+                });
+    }
+
+    private void getRechargeBalance() {
+        JSONObject jsonObject = new JSONObject();
+        jsonObject.put("Amount", Float.valueOf(mAmount));
+        jsonObject.put("PayType", mPayType);
+        SheepApp.getInstance().getNetComponent().getApiService().getRechargeBalance(jsonObject)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(RechargeAct.this) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        hideProgress();
+                        pay(baseMessage.getData().toString());
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        hideProgress();
+                        G.showToast(baseMessage.getMsg() + "");
+                    }
+                });
+    }
+
+    @OnClick({R.id.tv_recharge_pay})
+    public void onViewClicked(View view) {
+        RechargeEntity rechargeEntity;
+        switch (view.getId()) {
+
+            case R.id.tv_recharge_pay:
+                if (mPayType == -1) {
+                    G.showToast("请选择支付方式");
+                    return;
+                }
+                if (select == -1) {
+                    G.showToast("请选择充值金额");
+                    return;
+                }
+                mAmount = String.valueOf(mPriceEntityList.get(select).getPrice());
+
+                showProgress();
+                getRechargeBalance();
+                break;
+        }
+    }
+
+    private void pay(final String payInfo) {
+        Runnable payRunnable = new Runnable() {
+
+            @Override
+            public void run() {
+                // 构造PayTask 对象
+                PayTask alipay = new PayTask(RechargeAct.this);
+                // 调用支付接口,获取支付结果
+                final String result = alipay.pay(payInfo, true);
+
+                runOnUiThread(new Runnable() {
+
+                    @Override
+                    public void run() {
+
+                        PayResult payResult = new PayResult(result);
+                        /**
+                         * 同步返回的结果必须放置到服务端进行验证(验证的规则请看https://doc.open.alipay.com/doc2/
+                         * detail.htm?spm=0.0.0.0.xdvAU6&treeId=59&articleId=103665&
+                         * docType=1) 建议商户依赖异步通知
+                         */
+//						String resultInfo = payResult.getResult();// 同步返回需要验证的信息
+
+                        String resultStatus = payResult.getResultStatus();
+                        Jump2View.getInstance().goRechargeResultAct(RechargeAct.this, resultStatus);
+                        finish();
+                    }
+                });
+            }
+        };
+
+        // 必须异步调用
+        Thread payThread = new Thread(payRunnable);
+        payThread.start();
+    }
+
+    private void addDatas() {
+        mPriceEntityList.add(new RechargePriceEntity(false, "10元", 10));
+        mPriceEntityList.add(new RechargePriceEntity(false, "20元", 20));
+        mPriceEntityList.add(new RechargePriceEntity(false, "50元", 50));
+        mPriceEntityList.add(new RechargePriceEntity(false, "100元", 100));
+        mPriceEntityList.add(new RechargePriceEntity(false, "200元", 200));
+        mPriceEntityList.add(new RechargePriceEntity(false, "500元", 500));
+    }
+}

+ 149 - 0
app/src/main/java/com/sheep/gamegroup/view/activity/RechargeQAct.java

@@ -0,0 +1,149 @@
+package com.sheep.gamegroup.view.activity;
+
+import android.app.Activity;
+import android.graphics.Color;
+import android.text.SpannableString;
+import android.text.Spanned;
+import android.text.style.ForegroundColorSpan;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.EditText;
+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.RechargeQEntity;
+import com.sheep.gamegroup.presenter.RechargeQContract;
+import com.sheep.gamegroup.presenter.RechargeQPresenter;
+import com.sheep.gamegroup.util.Jump2View;
+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.TitleBarUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.inject.Inject;
+
+import butterknife.BindView;
+import butterknife.OnClick;
+
+/**
+ * Q币充值
+ */
+
+public class RechargeQAct extends BaseActivity implements RechargeQContract.View {
+
+    Activity activity;
+    @Inject
+    RechargeQPresenter presenter;
+    @BindView(R.id.tv_zk)
+    TextView tvZk;
+    @BindView(R.id.rechargeq_greidview)
+    MyGridview rechargeqGreidview;
+    @BindView(R.id.et_qb_number)
+    EditText etQbNumber;
+    @BindView(R.id.tv_myb_number)
+    TextView tvMybNumber;
+    @BindView(R.id.tv_myb_recharge)
+    TextView tvMybRecharge;
+    @BindView(R.id.et_qq)
+    EditText etQq;
+    @BindView(R.id.rechargeq_sure)
+    TextView rechargeqSure;
+
+    private List<RechargeQEntity> wlLists = new ArrayList<>();
+
+    private RechargeQAdapter adapter;
+    private int select;
+
+    @Override
+    protected int getLayoutId() {
+        return R.layout.rechargeq_layout;
+    }
+
+    @Override
+    public void initView() {
+        activity = this;
+        TitleBarUtils
+                .getInstance()
+                .setTitle(activity, "Q币充值")
+                .setTitleFinish(activity);
+        DaggerRechargeQComponent.builder()
+                .netComponent(SheepApp.get(this).getNetComponent())
+                .rechargeQModule(new RechargeQModule(this))
+                .build()
+                .inject(this);
+        tests();//测试代码------------------测试代码----------------测试代码--------------------测试代码----------------------------
+        adapter = new RechargeQAdapter(activity, wlLists);
+        rechargeqGreidview.setVerticalSpacing(20);
+        rechargeqGreidview.setAdapter(adapter);
+        adapter.notifyDataSetChanged();
+        rechargeqGreidview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+            @Override
+            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+                select = position;
+                for (int i = 0; i < wlLists.size(); i++) {
+                    if (position == i) {
+                        wlLists.get(i).setSelectState(true);
+                    } else {
+                        wlLists.get(i).setSelectState(false);
+
+                    }
+                    adapter.notifyDataSetChanged();
+                }
+            }
+        });
+
+        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"));
+    }
+
+    @Override
+    public void initListener() {
+
+    }
+
+    @Override
+    public void initData() {
+
+
+    }
+
+    @OnClick({R.id.tv_myb_recharge, R.id.rechargeq_sure})
+    public void onViewClicked(View view) {
+        switch (view.getId()) {
+            case R.id.tv_myb_recharge:
+                Jump2View.getInstance().goRechargeAct(activity,null);
+                break;
+            case R.id.rechargeq_sure:
+                break;
+        }
+    }
+
+
+
+
+    private SpannableString getSpannableString(){
+        SpannableString spannableString = new SpannableString("(使用绵羊币充值享95折优惠)");
+        ForegroundColorSpan colorSpan = new ForegroundColorSpan(Color.parseColor("#ff0006"));
+        spannableString.setSpan(colorSpan, 9, 11, Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
+        return spannableString;
+    }
+}

+ 62 - 0
app/src/main/java/com/sheep/gamegroup/view/activity/RechargeResultAct.java

@@ -0,0 +1,62 @@
+package com.sheep.gamegroup.view.activity;
+
+import android.text.TextUtils;
+import android.widget.TextView;
+
+import com.sheep.gamegroup.absBase.BaseActivity;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
+
+import butterknife.BindView;
+import butterknife.OnClick;
+
+/**
+ * Created by Administrator on 2018/3/19.
+ * 充值界面
+ */
+
+public class RechargeResultAct extends BaseActivity {
+
+
+    @BindView(R.id.tv_recharge_result_state)
+    TextView tvRechargeResultState;
+    @BindView(R.id.tv_recharge_result_pay)
+    TextView tvRechargeResultPay;
+
+    @Override
+    protected int getLayoutId() {
+        return R.layout.recharge_result_act_layout;
+    }
+
+    @Override
+    public void initView() {
+        String resultStatus = getIntent().getStringExtra("payCode");
+        if (TextUtils.equals(resultStatus, "9000")) {
+            TitleBarUtils.getInstance()
+                    .setTitle(this, "交易成功")
+                    .setTitleFinish(this);
+            tvRechargeResultState.setText("交易成功");
+        } else {
+            TitleBarUtils.getInstance()
+                    .setTitle(this, "交易失败")
+                    .setTitleFinish(this);
+            tvRechargeResultState.setText("交易失败");
+        }
+    }
+
+    @Override
+    public void initListener() {
+
+    }
+
+    @Override
+    public void initData() {
+
+    }
+
+
+    @OnClick(R.id.tv_recharge_result_pay)
+    public void onViewClicked() {
+        finish();
+    }
+}

+ 86 - 0
app/src/main/java/com/sheep/gamegroup/view/adapter/RechargeAdapter.java

@@ -0,0 +1,86 @@
+package com.sheep.gamegroup.view.adapter;
+
+import android.content.Context;
+import android.support.v4.content.ContextCompat;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AbsListView;
+import android.widget.BaseAdapter;
+import android.widget.TextView;
+
+import com.sheep.gamegroup.model.entity.RechargeEntity;
+import com.sheep.gamegroup.model.entity.RechargeQEntity;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.utils.G;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 充值gridview的 adapter
+ */
+
+public class RechargeAdapter extends BaseAdapter {
+    private Context context;
+    private List<RechargeEntity> listData =  new ArrayList<>();
+    int select = -1;
+
+    public RechargeAdapter(Context context) {
+        this.context = context;
+    }
+
+    public void setSelect(int select) {
+        this.select = select;
+    }
+
+    public void addAll(List<RechargeEntity> list){
+        this.listData.addAll(list);
+        notifyDataSetChanged();
+    }
+
+    @Override
+    public int getCount() {
+        return listData.size();
+    }
+
+    @Override
+    public RechargeEntity getItem(int position) {
+        return listData.get(position);
+    }
+
+    @Override
+    public long getItemId(int position) {
+        return 0;
+    }
+
+    @Override
+    public View getView(int position, View convertView, ViewGroup parent) {
+        ViewHolder holder = null;
+        if (holder == null) {
+            holder = new ViewHolder();
+            convertView = LayoutInflater.from(context).inflate(R.layout.recharge_gridview_item, null);
+            holder.tv_pay = convertView.findViewById(R.id.tv_pay);
+            convertView.setTag(holder);
+        }else {
+            holder = (ViewHolder) convertView.getTag();
+        }
+        RechargeEntity priceShow = getItem(position);
+        if (position == select){
+            holder.tv_pay.setBackground(context.getResources().getDrawable(R.drawable.selector_button_full_main));
+            holder.tv_pay.setTextColor(ContextCompat.getColor(context,R.color.white));
+        }else{
+            holder.tv_pay.setBackground(context.getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
+            holder.tv_pay.setTextColor(ContextCompat.getColor(context,R.color.black));
+
+        }
+
+        holder.tv_pay.setText(priceShow.getName());
+
+        return convertView;
+    }
+
+    class ViewHolder{
+        TextView tv_pay;
+    }
+}

+ 82 - 0
app/src/main/java/com/sheep/gamegroup/view/adapter/RechargePriceAdapter.java

@@ -0,0 +1,82 @@
+package com.sheep.gamegroup.view.adapter;
+
+import android.content.Context;
+import android.support.v4.content.ContextCompat;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AbsListView;
+import android.widget.BaseAdapter;
+import android.widget.TextView;
+
+import com.sheep.gamegroup.model.entity.RechargePriceEntity;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.utils.G;
+
+import java.util.List;
+
+/**
+ * 充值gridview的 adapter
+ */
+
+public class RechargePriceAdapter extends BaseAdapter {
+    private Context context;
+    private List<RechargePriceEntity> listData;
+
+    public RechargePriceAdapter(Context context, List<RechargePriceEntity> listData) {
+        this.context = context;
+        this.listData = listData;
+    }
+
+    @Override
+    public int getCount() {
+        return listData.size();
+    }
+
+    @Override
+    public RechargePriceEntity getItem(int position) {
+        return listData.get(position);
+    }
+
+    @Override
+    public long getItemId(int position) {
+        return 0;
+    }
+
+    @Override
+    public View getView(int position, View convertView, ViewGroup parent) {
+        ViewHolder holder = null;
+        if (holder == null) {
+            holder = new ViewHolder();
+            convertView = LayoutInflater.from(context).inflate(R.layout.rechargeprice_gridview_item, null);
+
+            holder.item_tv_y = convertView.findViewById(R.id.item_tv_y);
+
+            // 获取屏幕宽度
+            int W = G.WIDTH <G.HEIGHT ? G.WIDTH : G.HEIGHT;
+            int cricleRadius = W / 4 ;
+            int h = cricleRadius  / 3;
+            convertView.setLayoutParams(new AbsListView.LayoutParams(cricleRadius, ViewGroup.LayoutParams.WRAP_CONTENT));
+//            convertView.setPadding(0,0,0,2);
+            convertView.setTag(holder);
+        }else {
+            holder = (ViewHolder) convertView.getTag();
+        }
+        RechargePriceEntity priceShow = getItem(position);
+        if (priceShow.isSelectState()){
+            convertView.setBackground(context.getResources().getDrawable(R.drawable.recharge_bg_angle_blue_hold));
+            holder.item_tv_y.setTextColor(ContextCompat.getColor(context,R.color.white));
+        }else{
+            convertView.setBackground(context.getResources().getDrawable(R.drawable.recharge_bg_angle_blue_normal));
+            holder.item_tv_y.setTextColor(ContextCompat.getColor(context,R.color.blue_end));
+        }
+
+        holder.item_tv_y.setText(priceShow.getValue());
+
+        return convertView;
+    }
+
+    class ViewHolder{
+        TextView item_tv_y;
+    }
+}

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

@@ -0,0 +1,87 @@
+package com.sheep.gamegroup.view.adapter;
+
+import android.content.Context;
+import android.support.v4.content.ContextCompat;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AbsListView;
+import android.widget.BaseAdapter;
+import android.widget.TextView;
+
+import com.sheep.gamegroup.model.entity.RechargeQEntity;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.utils.G;
+
+import java.util.List;
+
+/**
+ * 充值Q币gridview的 adapter
+ */
+
+public class RechargeQAdapter extends BaseAdapter {
+    private Context context;
+    private List<RechargeQEntity> listData;
+
+    public RechargeQAdapter(Context context, List<RechargeQEntity> listData) {
+        this.context = context;
+        this.listData = listData;
+    }
+
+    @Override
+    public int getCount() {
+        return listData.size();
+    }
+
+    @Override
+    public RechargeQEntity getItem(int position) {
+        return listData.get(position);
+    }
+
+    @Override
+    public long getItemId(int position) {
+        return 0;
+    }
+
+    @Override
+    public View getView(int position, View convertView, ViewGroup parent) {
+        ViewHolder holder = null;
+        if (holder == null) {
+            holder = new ViewHolder();
+            convertView = LayoutInflater.from(context).inflate(R.layout.rechargeq_gridview_item, null);
+
+            holder.item_tv_qb = convertView.findViewById(R.id.item_tv_qb);
+            holder.item_tv_y = convertView.findViewById(R.id.item_tv_y);
+
+            // 获取屏幕宽度
+            int W = G.WIDTH <G.HEIGHT ? G.WIDTH : G.HEIGHT;
+            int cricleRadius = W / 4 -20;
+            int h = cricleRadius  / 3;
+            convertView.setLayoutParams(new AbsListView.LayoutParams(cricleRadius, ViewGroup.LayoutParams.WRAP_CONTENT));
+//            convertView.setPadding(0,0,0,2);
+            convertView.setTag(holder);
+        }else {
+            holder = (ViewHolder) convertView.getTag();
+        }
+        RechargeQEntity priceShow = getItem(position);
+        if (priceShow.isSelectState()){
+            convertView.setBackground(context.getResources().getDrawable(R.drawable.recharge_bg_angle_blue_hold));
+            holder.item_tv_qb.setTextColor(ContextCompat.getColor(context,R.color.white));
+            holder.item_tv_y.setTextColor(ContextCompat.getColor(context,R.color.white));
+        }else{
+            convertView.setBackground(context.getResources().getDrawable(R.drawable.recharge_bg_angle_blue_normal));
+            holder.item_tv_qb.setTextColor(ContextCompat.getColor(context,R.color.blue_end));
+            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() +"元");
+
+        return convertView;
+    }
+
+    class ViewHolder{
+        TextView item_tv_qb;
+        TextView item_tv_y;
+    }
+}

+ 18 - 0
app/src/main/res/drawable/recharge_bg_angle_blue_hold.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+
+    <gradient
+        android:startColor="@color/blue_start"
+        android:endColor="@color/blue_end"/>
+
+    <stroke
+        android:width="0.5dp"
+        android:color="@color/blue_start"
+        />
+
+
+    <corners
+        android:radius="7dp"/>
+
+</shape>

+ 17 - 0
app/src/main/res/drawable/recharge_bg_angle_blue_normal.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+
+    <gradient
+        android:startColor="@color/white"
+        android:endColor="@color/white"/>
+
+    <stroke
+        android:width="0.5dp"
+        android:color="@color/blue_start"
+        />
+
+    <corners
+        android:radius="7dp"/>
+
+</shape>

+ 14 - 0
app/src/main/res/layout/homepage_item_top2.xml

@@ -68,6 +68,20 @@
             android:layout_marginBottom="@dimen/content_padding_small"/>
 
         <TextView
+            android:id="@+id/recharge"
+            android:layout_width="wrap_content"
+            android:layout_height="30dp"
+            android:background="@drawable/x_shap_shadow_bg_rectgangle_white"
+            android:gravity="center"
+            android:minWidth="100dp"
+            android:text="充值"
+            android:textColor="@color/blue_34a6e7"
+            android:textSize="@dimen/text_size_4"
+            android:layout_alignParentRight="true"
+            android:layout_marginTop="@dimen/content_padding_20"
+            />
+
+        <TextView
             android:id="@+id/withdrawal"
             android:layout_width="wrap_content"
             android:layout_height="30dp"

+ 115 - 0
app/src/main/res/layout/recharge_act_layout.xml

@@ -0,0 +1,115 @@
+<?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/bg_gray"
+    android:fitsSystemWindows="true"
+    android:orientation="vertical">
+
+    <include layout="@layout/title" />
+
+
+    <ScrollView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:scrollbars="none">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:gravity="center_horizontal"
+            android:orientation="vertical">
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="vertical"
+                android:padding="@dimen/content_padding_10">
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:background="@drawable/x_shap_shadow_bg_rectgangle_white"
+                    android:orientation="vertical"
+                    android:padding="@dimen/content_padding_13">
+
+
+                    <TextView
+                        style="@style/txt_style_15"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="7dp"
+                        android:paddingLeft="@dimen/content_padding_big"
+                        android:text="充值金额" />
+
+
+                    <com.sheep.gamegroup.util.MyGridview
+                        android:id="@+id/rechargeprice_greidview"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="@dimen/content_padding_20"
+                        android:gravity="center_horizontal"
+                        android:listSelector="@color/transparent"
+                        android:numColumns="3"
+                        android:scrollbars="none"
+                        android:visibility="visible" />
+
+                    <EditText
+                        android:id="@+id/et_charge_price"
+                        android:layout_width="match_parent"
+                        android:layout_height="40dp"
+                        android:layout_marginTop="@dimen/content_padding_10"
+                        android:background="@null"
+                        android:hint="请输入充值金额"
+                        android:paddingLeft="@dimen/content_padding_big"
+                        android:textColor="@color/black_444444"
+                        android:textColorHint="@color/disenable_color"
+                        android:textSize="@dimen/text_size_3" />
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="@dimen/content_padding_10"
+                    android:background="@drawable/x_shap_shadow_bg_rectgangle_white"
+                    android:orientation="vertical"
+                    android:padding="@dimen/content_padding_13">
+
+                    <TextView
+                        style="@style/txt_style_15"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="7dp"
+                        android:paddingLeft="@dimen/content_padding_big"
+                        android:text="支付方式" />
+
+                    <com.sheep.gamegroup.util.MyGridview
+                        android:id="@+id/recharge_greidview"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="@dimen/content_padding_65"
+                        android:layout_marginRight="@dimen/content_padding_65"
+                        android:layout_marginTop="@dimen/content_padding_20"
+                        android:background="@color/white"
+                        android:gravity="center_horizontal"
+                        android:listSelector="@color/transparent"
+                        android:numColumns="1"
+                        android:scrollbars="none"
+                        android:visibility="visible" />
+                </LinearLayout>
+            </LinearLayout>
+
+            <TextView
+                android:id="@+id/tv_recharge_pay"
+                style="@style/txt_big_btn_style"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_horizontal"
+                android:layout_marginTop="20dp"
+                android:clickable="true"
+                android:gravity="center"
+                android:text="立即支付" />
+
+        </LinearLayout>
+    </ScrollView>
+</LinearLayout>

+ 10 - 0
app/src/main/res/layout/recharge_gridview_item.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/tv_pay"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:gravity="center"
+    android:paddingBottom="@dimen/content_padding_10"
+    android:paddingTop="@dimen/content_padding_10"
+    android:text="微信"
+    android:textColor="@color/black" />

+ 33 - 0
app/src/main/res/layout/recharge_result_act_layout.xml

@@ -0,0 +1,33 @@
+<?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:fitsSystemWindows="true"
+    android:orientation="vertical">
+
+    <include layout="@layout/title" />
+
+
+    <TextView
+        android:id="@+id/tv_recharge_result_state"
+        android:layout_width="wrap_content"
+        android:layout_height="80dp"
+        android:gravity="center_vertical"
+        style="@style/txt_style_15"
+        android:text="支付成功"
+        android:paddingLeft="18dp"
+        android:drawableLeft="@mipmap/icon_pay_result_bg"
+        android:drawablePadding="10dp"
+        />
+
+    <TextView
+        android:id="@+id/tv_recharge_result_pay"
+        style="@style/txt_big_btn_style"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center_horizontal"
+        android:layout_marginTop="20dp"
+        android:clickable="true"
+        android:gravity="center"
+        android:text="返回商户" />
+</LinearLayout>

+ 20 - 0
app/src/main/res/layout/rechargeprice_gridview_item.xml

@@ -0,0 +1,20 @@
+<?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="wrap_content"
+    android:gravity="center"
+    android:paddingTop="@dimen/content_padding_10"
+    android:paddingBottom="@dimen/content_padding_10"
+    android:orientation="vertical">
+
+    <TextView
+        android:id="@+id/item_tv_y"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:gravity="center"
+        android:text="10元"
+        android:textSize="@dimen/text_size_15"
+        android:textColor="@color/blue_end"/>
+</LinearLayout>

+ 29 - 0
app/src/main/res/layout/rechargeq_gridview_item.xml

@@ -0,0 +1,29 @@
+<?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="wrap_content"
+    android:gravity="center"
+    android:paddingTop="@dimen/content_padding_3"
+    android:paddingBottom="@dimen/content_padding_3"
+    android:paddingRight="@dimen/content_padding_10"
+    android:paddingLeft="@dimen/content_padding_10"
+    android:orientation="vertical">
+    <TextView
+        android:id="@+id/item_tv_qb"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:gravity="center"
+        android:text="100QB"
+        android:textSize="@dimen/text_size_15"
+        android:textColor="@color/blue_end"/>
+    <TextView
+        android:id="@+id/item_tv_y"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:gravity="center"
+        android:text="10元"
+        android:textSize="@dimen/text_size_12"
+        android:textColor="@color/blue_end"/>
+</LinearLayout>

+ 157 - 0
app/src/main/res/layout/rechargeq_layout.xml

@@ -0,0 +1,157 @@
+<?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/bg_gray"
+    android:orientation="vertical">
+
+    <include layout="@layout/title" />
+
+    <ScrollView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:scrollbars="none">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:gravity="center_horizontal"
+            android:orientation="vertical">
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="vertical"
+                android:padding="@dimen/content_padding_10">
+
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:background="@drawable/x_shap_shadow_bg_rectgangle_white"
+                    android:orientation="vertical"
+                    android:padding="@dimen/content_padding_13">
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:orientation="horizontal">
+
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:text="选择充值的Q币数量"
+                            android:textColor="@color/black_444444"
+                            android:textSize="@dimen/text_size_3" />
+
+                        <TextView
+                            android:id="@+id/tv_zk"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:text="(使用绵羊币充值享95折优惠)"
+                            android:textColor="@color/black_444444"
+                            android:textSize="@dimen/text_size_12" />
+                    </LinearLayout>
+
+                    <com.sheep.gamegroup.util.MyGridview
+                        android:id="@+id/rechargeq_greidview"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="@dimen/content_padding_20"
+                        android:background="@color/white"
+                        android:gravity="center_horizontal"
+                        android:listSelector="@color/transparent"
+                        android:numColumns="3"
+                        android:scrollbars="none"
+                        android:visibility="visible" />
+
+                </LinearLayout>
+
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="@dimen/content_padding_10"
+                    android:background="@drawable/x_shap_shadow_bg_rectgangle_white"
+                    android:orientation="vertical"
+                    android:padding="@dimen/content_padding_13">
+
+                    <EditText
+                        android:id="@+id/et_qb_number"
+                        android:layout_width="match_parent"
+                        android:layout_height="40dp"
+                        android:background="@null"
+                        android:hint="请输入充值QB数"
+                        android:textColor="@color/black_444444"
+                        android:textColorHint="@color/disenable_color"
+                        android:textSize="@dimen/text_size_3" />
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="40dp"
+                        android:gravity="center_vertical"
+                        android:orientation="horizontal">
+
+                        <TextView
+                            android:id="@+id/tv_myb_number"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:text="当前绵羊币金额:150元"
+                            android:textColor="@color/black_444444"
+                            android:textSize="@dimen/text_size_3" />
+
+                        <TextView
+                            android:id="@+id/tv_myb_recharge"
+                            android:layout_width="60dp"
+                            android:layout_height="wrap_content"
+                            android:clickable="true"
+                            android:gravity="center_horizontal"
+                            android:text="充值"
+                            android:textColor="@color/blue_end"
+                            android:textSize="@dimen/text_size_3" />
+                    </LinearLayout>
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="@dimen/content_padding_10"
+                    android:background="@drawable/x_shap_shadow_bg_rectgangle_white"
+                    android:orientation="vertical"
+                    android:padding="@dimen/content_padding_13">
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="40dp"
+                        android:gravity="center_vertical"
+                        android:text="请输入充值的QQ账户"
+                        android:textColor="@color/black_444444"
+                        android:textSize="@dimen/text_size_3" />
+
+
+                    <EditText
+                        android:id="@+id/et_qq"
+                        android:layout_width="match_parent"
+                        android:layout_height="40dp"
+                        android:background="@null"
+                        android:hint="请输入QQ号"
+                        android:textColor="@color/black_444444"
+                        android:textColorHint="@color/disenable_color"
+                        android:textSize="@dimen/text_size_3" />
+                </LinearLayout>
+            </LinearLayout>
+
+
+            <TextView
+                android:id="@+id/rechargeq_sure"
+                style="@style/txt_big_btn_style"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:background="@drawable/selector_button_full_main"
+                android:text="立即支付" />
+
+        </LinearLayout>
+    </ScrollView>
+
+
+</LinearLayout>

binární
app/src/main/res/mipmap-xhdpi/icon_pay_result_bg.png


binární
app/src/main/res/mipmap-xxhdpi/icon_pay_result_bg.png