Kaynağa Gözat

修改部分bug,任务下载,逻辑修改

liujiangyao 8 yıl önce
ebeveyn
işleme
f3bbcb83e3

+ 1 - 1
app/src/main/AndroidManifest.xml

@@ -40,7 +40,7 @@
     <application
         android:name=".SheepApp"
         android:allowBackup="true"
-        android:icon="@drawable/icon"
+        android:icon="@mipmap/icon"
         android:label="@string/app_name"
         android:supportsRtl="true"
         android:theme="@style/AppTheme">

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

@@ -6,9 +6,9 @@ package com.sheep.gamegroup.util;
 
 public class ConnectAddress {
 
-//  public static final String BASE_HTTP = "http://10.8.220.6:8080/";//何威
+  public static final String BASE_HTTP = "http://10.8.220.6:8080/";//何威
 //     public static final String BASE_HTTP = "http://10.8.220.5:8080/";//张伟
-   public static final String BASE_HTTP = "http://test.sheep.kfzs.com/";//测试服地址
+//   public static final String BASE_HTTP = "http://test.sheep.kfzs.com/";//测试服地址
 
     public static final String V1 = "/v1/";
 

+ 5 - 1
app/src/main/java/com/sheep/gamegroup/view/activity/AccountAndSecurityAct.java

@@ -223,7 +223,11 @@ public class AccountAndSecurityAct extends BaseActivity implements AccountAndSec
                         .load(mEntity.getAvatar())
                         .placeholder(R.mipmap.ic_launcher)
                         .into(ivHead);
-                tvWx.setText(entity.getWx_openid());
+                if (TextUtils.isEmpty(entity.getWx_nickname())) {
+                    tvWx.setText("未绑定");
+                } else {
+                    tvWx.setText(entity.getWx_nickname());
+                }
                 boolean isBanck = TextUtils.isEmpty(entity.getBank_card());
                 boolean isId_number = TextUtils.isEmpty(entity.getId_number());
                 boolean isRoalName = TextUtils.isEmpty(entity.getReal_name());

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

@@ -19,6 +19,7 @@ import com.sheep.gamegroup.util.StringUtils;
 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 com.umeng.socialize.ShareAction;
 import com.umeng.socialize.UMShareListener;
 import com.umeng.socialize.bean.SHARE_MEDIA;
@@ -62,6 +63,9 @@ public class AskGetMoneyAct extends BaseUMActivity implements UMShareListener, A
 
     @Override
     public void initView() {
+        TitleBarUtils.getInstance()
+                .setTitle(this,"邀请赚钱")
+                .setTitleFinish(this);
         DaggerAskGetMoneyComponent.builder().askGetMoneyModule(new AskGetMoneyModule(this))
                 .netComponent(SheepApp.get(this).getNetComponent())
                 .build()

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

@@ -13,6 +13,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.googlecode.protobuf.format.util.TextUtils;
 import com.sheep.gamegroup.di.components.DaggerBindDataComponent;
 import com.sheep.gamegroup.di.modules.BindDataModule;
+import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.presenter.BindDataContract;
 import com.sheep.gamegroup.presenter.BindDataPresenter;
 import com.sheep.gamegroup.util.ActivityManager;
@@ -70,7 +71,7 @@ public class BindDataAct extends BaseActivity implements BindDataContract.View {
 
     @Override
     public void failView(Object o) {
-        G.showToast("error");
+        G.showToast(((BaseMessage)o).getMsg()+"");
         hideProgress();
     }
 

+ 29 - 0
app/src/main/java/com/sheep/gamegroup/view/activity/ChangeWxOrTelAct.java

@@ -0,0 +1,29 @@
+package com.sheep.gamegroup.view.activity;
+
+import com.sheep.gamegroup.absBase.BaseActivity;
+
+/**
+ * Created by ljy on 2018/3/26.
+ */
+
+public class ChangeWxOrTelAct extends BaseActivity {
+    @Override
+    protected int getLayoutId() {
+        return 0;
+    }
+
+    @Override
+    public void initView() {
+
+    }
+
+    @Override
+    public void initListener() {
+
+    }
+
+    @Override
+    public void initData() {
+
+    }
+}

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

@@ -309,8 +309,8 @@ public class DialogActivity extends Activity implements TaskDialogContract.View
         if (task_entity != null) {
             ClassFileHelper.getInstance().createSDDirection();
             File mApkPath = new File(ClassFileHelper.DIR, task_entity.getTask_name() + ClassFileHelper.FILE_SUFFIX);
+            downloadInfo = MyDbManager.getInstance().dbFindDownLoad(task_entity.getTask_name(), mApkPath.getAbsolutePath());
             if (!mApkPath.exists()) {
-                downloadInfo = MyDbManager.getInstance().dbFindDownLoad(task_entity.getTask_name(), mApkPath.getAbsolutePath());
                 if (downloadInfo == null) {
                     downloadInfo = new DownloadInfo();
                     downloadInfo.setUrl(task_entity.getDownload_link());

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

@@ -14,8 +14,10 @@ import com.alibaba.fastjson.JSONObject;
 
 import com.sheep.gamegroup.absBase.BaseActivity;
 import com.sheep.gamegroup.di.components.DaggerPhoneComponent;
+import com.sheep.gamegroup.di.components.NetComponent;
 import com.sheep.gamegroup.di.modules.PhoneModule;
 import com.sheep.gamegroup.exception.ApiException;
+import com.sheep.gamegroup.model.api.ApiService;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.LoginEntity;
 import com.sheep.gamegroup.model.entity.UserEntity;

+ 25 - 24
app/src/main/java/com/sheep/gamegroup/view/adapter/DownLoadTvAdp.java

@@ -99,20 +99,20 @@ public class DownLoadTvAdp extends BaseAdapter {
         }
         else {
             holder.refresh();
-            if (downloadInfo.getState().value() < DownloadState.FINISHED.value()) {
-                try {
-                    downloadManager.startDownload(
-                            downloadInfo.getPkgName(),
-                            downloadInfo.getUrl(),
-                            downloadInfo.getLabel(),
-                            downloadInfo.getFileSavePath(), "",
-                            downloadInfo.isAutoResume(),
-                            downloadInfo.isAutoRename(),
-                            holder);
-                } catch (DbException ex) {
-                    Toast.makeText(x.app(), "添加下载失败", Toast.LENGTH_LONG).show();
-                }
-            }
+//            if (downloadInfo.getState().value() < DownloadState.FINISHED.value()) {
+//                try {
+//                    downloadManager.startDownload(
+//                            downloadInfo.getPkgName(),
+//                            downloadInfo.getUrl(),
+//                            downloadInfo.getLabel(),
+//                            downloadInfo.getFileSavePath(), "",
+//                            downloadInfo.isAutoResume(),
+//                            downloadInfo.isAutoRename(),
+//                            holder);
+//                } catch (DbException ex) {
+//                    Toast.makeText(x.app(), "添加下载失败", Toast.LENGTH_LONG).show();
+//                }
+//            }
         }
 
         return view;
@@ -170,19 +170,20 @@ public class DownLoadTvAdp extends BaseAdapter {
             switch (state) {
                 case WAITING:
                 case STARTED:
-                    if(downloadInfo.getProgress() == 0){
-                        start_task_tv.setText("开始下载");
-
-                    }else if(downloadInfo.getProgress() == 100){
-                        start_task_tv.setText("开始试玩");
-                    }
-                    else {
-
-                        start_task_tv.setText("继续");
-                    }
+//                    if(downloadInfo.getProgress() == 0){
+//                        start_task_tv.setText("开始下载");
+//
+//                    }else if(downloadInfo.getProgress() == 100){
+//                        start_task_tv.setText("开始试玩");
+//                    }
+//                    else {
+//
+//                        start_task_tv.setText("继续");
+//                    }
                     break;
                 case ERROR:
                 case STOPPED:
+                    start_task_tv.setText("继续");
                     break;
                 case FINISHED:
                     if (PackageUtil.isAppInstalled(mContext, getDownloadInfo().getPkgName())) {

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/view/adapter/TaskStateAdapter.java

@@ -61,7 +61,7 @@ public class TaskStateAdapter extends BaseAdapter {
             holder = (ViewHolder) convertView.getTag();
         }
         holder.name_tv.setText(getItem(position).getName()+"");
-        if(getItem(position).getStatus() == 2){
+        if(getItem(position).getStatus() == 1){
 
             holder.point_iv.setImageResource(R.mipmap.tast_state_piont_ok_img);
             holder.line_view.setBackgroundColor(context.getResources().getColor(R.color.yellow2_end));

+ 0 - 4
app/src/main/java/com/sheep/gamegroup/view/adapter/TryMakeMoneyAdp.java

@@ -50,10 +50,8 @@ public class TryMakeMoneyAdp extends AdpCommonRecy<RecyleObj> {
 
     @Override
     public int getViewIdByType(int type) {
-        Log.e("1-----getViewIdByType",type+"");
         int resId = R.layout.empty;
         RecyleType recyleType = RecyleType.values()[type];
-        Log.e("1-----getViewIdByType",recyleType+"");
         switch (recyleType){
             case RELEASE_TASK:
                 resId = R.layout.try_mkmy_release_task_list;
@@ -67,7 +65,6 @@ public class TryMakeMoneyAdp extends AdpCommonRecy<RecyleObj> {
 
     @Override
     public void convert(ViewHolder holder, RecyleObj recyleObj) {
-        Log.e("-----convert",recyleObj.getRecyleType()+"");
 
         switch (recyleObj.getRecyleType()){
             case RELEASE_TASK:
@@ -125,7 +122,6 @@ public class TryMakeMoneyAdp extends AdpCommonRecy<RecyleObj> {
             @Override
             public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, final int i) {
                     viewHolder.itemView.setTag(TAG_ID_TEMP, etyList.get(i).getId());
-                Log.e("-----viewholder",i+"");
                 if(i == 0){
                     viewHolder.itemView.findViewById(R.id.item_title_tv).setVisibility(View.VISIBLE);
                     ((TextView)viewHolder.itemView.findViewById(R.id.item_title_tv)).setText("推荐");

BIN
app/src/main/res/drawable-hdpi/icon.png


BIN
app/src/main/res/drawable-mdpi/icon.png


BIN
app/src/main/res/drawable-xhdpi/icon.png


BIN
app/src/main/res/drawable/icon.png


+ 40 - 0
app/src/main/res/layout/change_wx_tel_layout.xml

@@ -0,0 +1,40 @@
+<?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:orientation="vertical"
+    android:background="@color/bg_gray">
+
+    <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:orientation="vertical">
+
+            <ImageView
+                android:id="@+id/phone_iv"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_horizontal"
+                android:layout_marginLeft="100dp"
+                android:layout_marginRight="100dp"
+                android:src="@mipmap/no_bind_phone"
+                android:layout_marginTop="35dp"
+                android:layout_marginBottom="5dp"/>
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text=""
+                />
+        </LinearLayout>
+    </ScrollView>
+
+
+</LinearLayout>

+ 1 - 0
app/src/main/res/layout/download_item_dialog.xml

@@ -73,6 +73,7 @@
                     android:layout_height="wrap_content"
                     android:scrollbars="none"
                     android:divider="@null"
+                    android:listSelector="@color/transparent"
                     android:layout_below="@+id/dialog_item_icon_iv"
                     android:layout_centerHorizontal="true"
                     android:layout_marginLeft="@dimen/content_padding_40"

+ 13 - 14
app/src/main/res/layout/x_account_security_layout.xml

@@ -30,7 +30,7 @@
             android:id="@+id/tv_name"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:text="野蛮老司机"
+            android:text=""
             android:layout_toRightOf="@id/iv_head"
             style="@style/txt_style_15_black"
             android:layout_marginTop="5dp"
@@ -40,7 +40,7 @@
             android:id="@+id/tv_link_content"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:text="@string/share_link_content"
+            android:text=""
             android:layout_toRightOf="@id/iv_head"
             android:layout_below="@id/tv_name"
             android:layout_marginTop="3dp"
@@ -86,16 +86,6 @@
             android:layout_centerVertical="true"
             />
 
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="@string/phone"
-            android:layout_toRightOf="@id/iv_phone"
-            style="@style/txt_style_15"
-            android:layout_marginLeft="5dp"
-            android:layout_centerVertical="true"
-            />
-
 
         <TextView
             android:id="@+id/tv_phone"
@@ -145,7 +135,7 @@
             style="@style/txt_style_15"
             android:layout_marginLeft="5dp"
             android:layout_centerVertical="true"
-            />
+            android:id="@+id/textView2" />
 
 
         <TextView
@@ -158,6 +148,15 @@
             android:drawableRight="@mipmap/x_ic_next"
             android:drawablePadding="10dp"
             />
+
+        <TextView
+            style="@style/txt_style_15"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentBottom="true"
+            android:layout_alignStart="@+id/textView2"
+            android:layout_marginBottom="40dp"
+            android:text="@string/phone" />
     </RelativeLayout>
 
 
@@ -225,7 +224,7 @@
         android:layout_marginTop="40dp"
         android:layout_marginLeft="20dp"
         android:layout_marginRight="20dp"
-        android:background="@drawable/radidius_bg_tv_blue_gray_selector"
+        android:background="@drawable/selector_button_full_main"
         android:gravity="center"
         android:padding="@dimen/content_padding_10"
         android:text="退出登录"

BIN
app/src/main/res/mipmap-xhdpi/icon.png


BIN
app/src/main/res/mipmap-xhdpi/no_bind_img.png


BIN
app/src/main/res/mipmap-xxhdpi/no_bind_img.png