|
|
@@ -2,13 +2,11 @@ package com.kfzs.duanduan.fragment;
|
|
|
|
|
|
import android.app.Activity;
|
|
|
import android.content.Context;
|
|
|
-import android.content.DialogInterface;
|
|
|
import android.os.Bundle;
|
|
|
import android.os.Handler;
|
|
|
import android.os.Message;
|
|
|
import android.support.v4.view.ViewPager;
|
|
|
import android.support.v4.widget.SwipeRefreshLayout;
|
|
|
-import android.support.v7.app.AlertDialog;
|
|
|
import android.support.v7.widget.LinearLayoutManager;
|
|
|
import android.support.v7.widget.RecyclerView;
|
|
|
import android.text.TextUtils;
|
|
|
@@ -30,12 +28,10 @@ import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.bumptech.glide.Glide;
|
|
|
import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
|
|
-import com.bumptech.glide.load.resource.bitmap.CenterCrop;
|
|
|
import com.bumptech.glide.request.RequestOptions;
|
|
|
import com.kfzs.duanduan.BaseCompatFragment;
|
|
|
import com.kfzs.duanduan.event.BigEvent;
|
|
|
import com.kfzs.duanduan.react.ReactUtil;
|
|
|
-import com.kfzs.duanduan.view.ImageGlarry;
|
|
|
import com.sheep.gamegroup.di.components.DaggerSmallSheepComponent;
|
|
|
import com.sheep.gamegroup.di.modules.SmallSheepModule;
|
|
|
import com.sheep.gamegroup.di.modules.TryMakeMoneyModule;
|
|
|
@@ -61,14 +57,13 @@ import com.sheep.gamegroup.presenter.TryMakeMoneyContract;
|
|
|
import com.sheep.gamegroup.presenter.TryMakeMoneyPresenter;
|
|
|
import com.sheep.gamegroup.util.AppUtil;
|
|
|
import com.sheep.gamegroup.util.CommonUtil;
|
|
|
-import com.sheep.gamegroup.util.ConnectAddress;
|
|
|
import com.sheep.gamegroup.util.ImageGlarryDrawable;
|
|
|
import com.sheep.gamegroup.util.Jump2View;
|
|
|
import com.sheep.gamegroup.util.MyDbManager;
|
|
|
import com.sheep.gamegroup.util.PreferenceUtils;
|
|
|
+import com.sheep.gamegroup.util.TestUtil;
|
|
|
import com.sheep.gamegroup.util.UMConfigUtils;
|
|
|
import com.sheep.gamegroup.view.adapter.TryMakeMoneyAdp;
|
|
|
-import com.sheep.gamegroup.view.customview.GlideCircleTransform;
|
|
|
import com.sheep.gamegroup.view.dialog.DialogNewbieTask1;
|
|
|
import com.sheep.gamegroup.view.dialog.DialogNewbieTaskList;
|
|
|
import com.sheep.gamegroup.view.dialog.DialogNewbieTaskRegistSuccess;
|
|
|
@@ -95,7 +90,6 @@ import butterknife.BindView;
|
|
|
import butterknife.ButterKnife;
|
|
|
import butterknife.OnClick;
|
|
|
import butterknife.Unbinder;
|
|
|
-import jp.wasabeef.glide.transformations.CropCircleTransformation;
|
|
|
import rx.android.schedulers.AndroidSchedulers;
|
|
|
import rx.schedulers.Schedulers;
|
|
|
|
|
|
@@ -148,9 +142,6 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
|
|
|
@BindView(R.id.recyclerview)
|
|
|
RecyclerView recyclerview;
|
|
|
|
|
|
- @BindView(R.id.test_change)
|
|
|
- TextView test_change;
|
|
|
-
|
|
|
@Inject
|
|
|
SmallSheepPresenter pagePresenter;
|
|
|
@Inject
|
|
|
@@ -193,7 +184,7 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
|
|
|
setContentView(R.layout.homepage_act_layout);
|
|
|
initView();
|
|
|
initListener();
|
|
|
- testChange();
|
|
|
+ TestUtil.testChange(getActivity(), (TextView) getViewById(R.id.test_change));
|
|
|
}
|
|
|
|
|
|
public void initView() {
|
|
|
@@ -369,7 +360,7 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
|
|
|
}
|
|
|
|
|
|
@OnClick({ 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.invitation_layout, R.id.lying_layout, R.id.newbie_task, R.id.card_layout, R.id.icon_layout, R.id.info_layout})
|
|
|
public void onViewClicked(View view) {
|
|
|
switch (view.getId()) {
|
|
|
case R.id.user_layout:
|
|
|
@@ -415,6 +406,7 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
|
|
|
});
|
|
|
break;
|
|
|
case R.id.icon_layout://头像
|
|
|
+ case R.id.info_layout://其它信息
|
|
|
Jump2View.getInstance().goPersonnalCenterView(activity, null);
|
|
|
break;
|
|
|
}
|
|
|
@@ -879,36 +871,4 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
|
|
|
|
|
|
|
|
|
}
|
|
|
- private void testChange(){
|
|
|
- if(BuildConfig.DEBUG || !"sheep".equals(BuildConfig.FLAVOR)){
|
|
|
- test_change.setVisibility(View.VISIBLE);
|
|
|
- test_change.setText(SheepApp.getInstance().getConnectAddress().getName());
|
|
|
- test_change.setOnClickListener(new View.OnClickListener() {
|
|
|
- @Override
|
|
|
- public void onClick(View view) {
|
|
|
-
|
|
|
- final String[] items = {"张伟", "测试服", "正式服"};
|
|
|
- AlertDialog dialog = new AlertDialog.Builder(activity).setTitle("请选择要切换的服务器")
|
|
|
- .setItems(items, new DialogInterface.OnClickListener() {
|
|
|
-
|
|
|
- @Override
|
|
|
- public void onClick(DialogInterface dialog, int which) {
|
|
|
- switch (items[which]){
|
|
|
- case "张伟":
|
|
|
- SheepApp.getInstance().setConnectAddress(ConnectAddress.sheepzhangwei);
|
|
|
- break;
|
|
|
- case "测试服":
|
|
|
- SheepApp.getInstance().setConnectAddress(ConnectAddress.sheeptest);
|
|
|
- break;
|
|
|
- case "正式服":
|
|
|
- SheepApp.getInstance().setConnectAddress(ConnectAddress.sheep);
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }).create();
|
|
|
- dialog.show();
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
}
|