Sfoglia il codice sorgente

邀请好友界面完善

zhaoyi 8 anni fa
parent
commit
8bea02e49f
43 ha cambiato i file con 1400 aggiunte e 619 eliminazioni
  1. 2 2
      app/build.gradle
  2. 4 0
      app/src/main/AndroidManifest.xml
  3. 2 2
      app/src/main/java/com/sheep/jiuyan/samllsheep/Config.java
  4. 9 0
      app/src/main/java/com/sheep/jiuyan/samllsheep/event/MainTab.java
  5. 14 0
      app/src/main/java/com/sheep/jiuyan/samllsheep/net/NetManager.java
  6. 10 3
      app/src/main/java/com/sheep/jiuyan/samllsheep/net/Url.java
  7. 18 0
      app/src/main/java/com/sheep/jiuyan/samllsheep/page/AskFriendActivity.java
  8. 0 2
      app/src/main/java/com/sheep/jiuyan/samllsheep/page/LoginActivity.java
  9. 76 48
      app/src/main/java/com/sheep/jiuyan/samllsheep/page/MainActivity.java
  10. 144 0
      app/src/main/java/com/sheep/jiuyan/samllsheep/page/NewUserGuideActivity.java
  11. 28 2
      app/src/main/java/com/sheep/jiuyan/samllsheep/page/RegisterActivity.java
  12. 1 6
      app/src/main/java/com/sheep/jiuyan/samllsheep/page/ShotScreenActivity.java
  13. 6 60
      app/src/main/java/com/sheep/jiuyan/samllsheep/page/WebActivity.java
  14. 85 0
      app/src/main/java/com/sheep/jiuyan/samllsheep/page/adapter/AdpNewUserTask.java
  15. 88 0
      app/src/main/java/com/sheep/jiuyan/samllsheep/page/entry/NewUserTask.java
  16. 108 0
      app/src/main/java/com/sheep/jiuyan/samllsheep/page/entry/UerInviteInfo.java
  17. 7 0
      app/src/main/java/com/sheep/jiuyan/samllsheep/page/view/RappTabLayout.java
  18. BIN
      app/src/main/res/drawable-hdpi/banner.png
  19. BIN
      app/src/main/res/drawable-hdpi/ico.png
  20. BIN
      app/src/main/res/drawable-hdpi/icon_jl.png
  21. BIN
      app/src/main/res/drawable-hdpi/login_bg.png
  22. BIN
      app/src/main/res/drawable-hdpi/today.png
  23. BIN
      app/src/main/res/drawable-xhdpi/banner.png
  24. BIN
      app/src/main/res/drawable-xhdpi/icon_jl.png
  25. BIN
      app/src/main/res/drawable-xhdpi/today.png
  26. BIN
      app/src/main/res/drawable-xxhdpi/banner.png
  27. BIN
      app/src/main/res/drawable-xxhdpi/hongb.png
  28. BIN
      app/src/main/res/drawable-xxhdpi/icon_jl.png
  29. BIN
      app/src/main/res/drawable-xxhdpi/jux.png
  30. BIN
      app/src/main/res/drawable-xxhdpi/today.png
  31. 9 0
      app/src/main/res/drawable/sp_edt_background_login.xml
  32. 9 0
      app/src/main/res/drawable/texe_background_new_user_normal.xml
  33. 8 0
      app/src/main/res/drawable/texe_background_new_user_unable.xml
  34. 2 2
      app/src/main/res/drawable/texe_background_normal.xml
  35. 6 0
      app/src/main/res/drawable/text_background_new_user.xml
  36. 394 360
      app/src/main/res/layout/activity_ask_friend.xml
  37. 77 58
      app/src/main/res/layout/login_actvity.xml
  38. 47 0
      app/src/main/res/layout/new_user_guide_activity.xml
  39. 71 0
      app/src/main/res/layout/new_user_item.xml
  40. 65 0
      app/src/main/res/layout/new_user_red_dialog.xml
  41. 106 74
      app/src/main/res/layout/register_activity.xml
  42. 1 0
      app/src/main/res/values/colors.xml
  43. 3 0
      app/src/main/res/values/common.xml

+ 2 - 2
app/build.gradle

@@ -6,7 +6,7 @@ android {
     buildToolsVersion "26.0.2"
     defaultConfig {
         applicationId "com.sheep.jiuyan.samllsheep"
-        minSdkVersion 21
+        minSdkVersion 18
         targetSdkVersion 26
         versionCode 1
         versionName "1.0"
@@ -33,7 +33,7 @@ dependencies {
              })*/
     compile 'com.android.support.constraint:constraint-layout:1.0.2'
     testCompile 'junit:junit:4.12'
-    compile 'com.shark:screencapture:1.0.0'
+//    compile 'com.shark:screencapture:1.0.0'
     compile 'com.google.code.gson:gson:2.7'
     compile 'com.jcodecraeer:xrecyclerview:1.5.2'
     compile 'com.github.bumptech.glide:glide:3.7.0'

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

@@ -28,6 +28,7 @@
         android:name=".SheepApp"
         android:allowBackup="true"
         android:icon="@drawable/icon"
+        android:label="@string/app_name"
         android:supportsRtl="true"
         android:theme="@style/AppTheme">
 
@@ -104,6 +105,9 @@
             android:name=".page.MoneyHistroyActivity"
             android:screenOrientation="portrait"/>
         <activity
+            android:name=".page.NewUserGuideActivity"
+            android:screenOrientation="portrait"/>
+        <activity
             android:name=".page.WXAccountActivity"
             android:screenOrientation="portrait"/>
 

+ 2 - 2
app/src/main/java/com/sheep/jiuyan/samllsheep/Config.java

@@ -15,8 +15,8 @@ public class Config {
         return mConfig;
     }
 
-//        public String mBaseUrl = "http://10.8.220.132:8088";
-        public String mBaseUrl = "http://10.8.220.213:8088";
+        public String mBaseUrl = "http://10.8.220.132:8088";
+//        public String mBaseUrl = "http://10.8.220.213:8088";
 //    public String mBaseUrl = "http://10.8.220.130:8088";
     //    public String mBaseUrl = "http://api.task.bandaimi.com";
     //      public String mBaseUrl = "http://test.ss.shouyouquan.com";

+ 9 - 0
app/src/main/java/com/sheep/jiuyan/samllsheep/event/MainTab.java

@@ -0,0 +1,9 @@
+package com.sheep.jiuyan.samllsheep.event;
+
+/**
+ * Created by kemllor on 2018/1/25.
+ */
+
+public class MainTab {
+    public int index;
+}

+ 14 - 0
app/src/main/java/com/sheep/jiuyan/samllsheep/net/NetManager.java

@@ -12,6 +12,7 @@ import java.io.File;
 import java.util.Map;
 import java.util.concurrent.TimeUnit;
 
+import okhttp3.FormBody;
 import okhttp3.Headers;
 import okhttp3.MediaType;
 import okhttp3.MultipartBody;
@@ -56,6 +57,19 @@ public class NetManager {
         getInstancce(context).newCall(request).enqueue(callback);
     }
 
+    public static void postForm(String url, Map<String, String> parma, Context context, SheepCallback callback) {
+        FormBody.Builder builder = new FormBody.Builder();
+        if (parma != null) {
+            for (Map.Entry<String, String> el : parma.entrySet()) {
+                builder.add(el.getKey(), el.getValue());
+            }
+
+        }
+        FormBody body = builder.build();
+        Request request = new Request.Builder().url(url).post(body).build();
+        getInstancce(context).newCall(request).enqueue(callback);
+    }
+
     public static void post(String url, Map<String, String> parma, Context context, SheepCallback callback) {
         JSONObject object = new JSONObject();
         for (Map.Entry<String, String> el : parma.entrySet()) {

+ 10 - 3
app/src/main/java/com/sheep/jiuyan/samllsheep/net/Url.java

@@ -59,8 +59,15 @@ public class Url {
     public static String REGISTER_HW = Config.instance().mBaseUrl + "/v1/user/registerHw";
     //邀请链接
     public static String USER_INVITE_URL = Config.instance().mBaseUrl + "/v1/user/getInviteUrl";
-
-
-
+    //新手任务
+    public static String NEW_USER_TASK_LIST = Config.instance().mBaseUrl + "/v1/newbie/";
+    //好友信息
+    public static String USER_INVITE_INFO = Config.instance().mBaseUrl + "/v1/search/statistics";
+    //是否完成新手任务
+    public static String USER_ISFINISH_NEW_TASK = Config.instance().mBaseUrl + "/v1/newbie/can_receive";
+    //获取完成新手任务礼包
+    public static String GET_NEW_TASK_RED = Config.instance().mBaseUrl + "/v1/newbie/receive";
+    //新手任务奖励
+    public static String GET_NEW_TASK_MONEY = Config.instance().mBaseUrl + "/v1/newbie/know_the_sheep";
 
 }

+ 18 - 0
app/src/main/java/com/sheep/jiuyan/samllsheep/page/AskFriendActivity.java

@@ -24,6 +24,7 @@ import com.sheep.jiuyan.samllsheep.net.NetManager;
 import com.sheep.jiuyan.samllsheep.net.SheepCallback;
 import com.sheep.jiuyan.samllsheep.net.Url;
 import com.sheep.jiuyan.samllsheep.page.entry.InviteUrl;
+import com.sheep.jiuyan.samllsheep.page.entry.UerInviteInfo;
 import com.sheep.jiuyan.samllsheep.utils.DeviceUtils;
 import com.sheep.jiuyan.samllsheep.utils.PackageUtil;
 import com.sheep.jiuyan.samllsheep.utils.SpUtils;
@@ -47,6 +48,7 @@ public class AskFriendActivity extends BaseActivity implements View.OnClickListe
     private RelativeLayout rl_link;
 
     private String shareLink;
+    private TextView tv_today_size;
 
     @Override
     protected int getLayoutId() {
@@ -57,6 +59,7 @@ public class AskFriendActivity extends BaseActivity implements View.OnClickListe
     public void initView() {
         tv_reward_size = (TextView) findViewById(R.id.tv_reward_size);
         tv_friend_size = (TextView) findViewById(R.id.tv_friend_size);
+        tv_today_size = (TextView) findViewById(R.id.tv_today_size);
         tv_proportion_size = (TextView) findViewById(R.id.tv_proportion_size);
         rl_emw = (RelativeLayout) findViewById(R.id.rl_emw);
         rl_link = (RelativeLayout) findViewById(R.id.rl_link);
@@ -73,6 +76,21 @@ public class AskFriendActivity extends BaseActivity implements View.OnClickListe
     @Override
     public void initData() {
         getShareLink();
+        getInviteInfo();
+    }
+
+    private void getInviteInfo() {
+        HashMap<String, String> map = new HashMap<>();
+        map.put("wx_open_id", SpUtils.getOpenId(this));
+        NetManager.get(Url.USER_INVITE_INFO, map, getApplicationContext(), new SheepCallback<UerInviteInfo>(this) {
+            @Override
+            public void success(UerInviteInfo uerInviteInfo) {
+                tv_reward_size.setText(uerInviteInfo.getUser().getCommission());
+                tv_friend_size.setText(uerInviteInfo.getUser().getInviteNum());
+                tv_proportion_size.setText(uerInviteInfo.getUser().getProportion());
+                tv_today_size.setText(uerInviteInfo.getUser().getTodayNum());
+            }
+        });
     }
 
     private void getShareLink() {

+ 0 - 2
app/src/main/java/com/sheep/jiuyan/samllsheep/page/LoginActivity.java

@@ -61,8 +61,6 @@ public class LoginActivity extends BaseActivity {
     @Override
     public void initView() {
         findViews();
-        TitleBarUtils.getInstance().setTitle(this, "登  录")
-                .setTitleFinish(this);
        /* new Thread(new Runnable() {
             @Override
             public void run() {

+ 76 - 48
app/src/main/java/com/sheep/jiuyan/samllsheep/page/MainActivity.java

@@ -5,6 +5,7 @@ import android.app.AlertDialog;
 import android.content.DialogInterface;
 import android.content.Intent;
 import android.content.pm.PackageManager;
+import android.net.Uri;
 import android.os.Build;
 import android.os.Bundle;
 import android.os.SystemClock;
@@ -13,6 +14,7 @@ import android.support.v4.app.ActivityCompat;
 import android.support.v4.content.ContextCompat;
 import android.support.v4.view.ViewPager;
 import android.support.v4.widget.SwipeRefreshLayout;
+import android.text.TextUtils;
 import android.util.Log;
 import android.view.View;
 import android.view.animation.AccelerateDecelerateInterpolator;
@@ -31,8 +33,12 @@ import com.mylhyl.acp.AcpOptions;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.base.BaseActivity;
 import com.sheep.jiuyan.samllsheep.download.DownloadManager;
+import com.sheep.jiuyan.samllsheep.event.MainTab;
 import com.sheep.jiuyan.samllsheep.event.NewUserDialog;
 import com.sheep.jiuyan.samllsheep.floatwindow.FloatWindow;
+import com.sheep.jiuyan.samllsheep.net.NetManager;
+import com.sheep.jiuyan.samllsheep.net.SheepCallback;
+import com.sheep.jiuyan.samllsheep.net.Url;
 import com.sheep.jiuyan.samllsheep.page.adapter.AdpMainPageViewPager;
 import com.sheep.jiuyan.samllsheep.page.fragment.FgtMainPageOffline;
 import com.sheep.jiuyan.samllsheep.page.fragment.FgtMainPageTask;
@@ -45,7 +51,9 @@ import org.greenrobot.eventbus.EventBus;
 import org.greenrobot.eventbus.Subscribe;
 import org.greenrobot.eventbus.ThreadMode;
 
+import java.io.IOException;
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
 
 import de.hdodenhof.circleimageview.CircleImageView;
@@ -75,37 +83,19 @@ public class MainActivity extends BaseActivity {
     private AlertDialog mDialog;
 
     private ImageButton btn;
+    private AlertDialog mRedDialog;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
-        showNewDialog();
+        Intent intent = getIntent();
+        String tag = intent.getStringExtra("tag");
+        if (TextUtils.equals(tag, "once")) {
+            showNewDialog();
+        }
         super.onCreate(savedInstanceState);
-        Intent intent = new Intent(this, FloatWindow.class);
-        startActivity(intent);
         EventBus.getDefault().register(this);
-       /* Intent intent = new Intent(this, FloatWindow.class);
-        startActivity(intent);*/
     }
 
-
-    //    @Override
-    //    public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
-    //        if (requestCode == INTENT_GET_PERMISSION) {
-    //            boolean isOk = true;
-    //            for (int result : grantResults) {
-    //                if (result == PackageManager.PERMISSION_DENIED) {
-    //                    isOk = false;
-    //                    break;//只要有一个拒绝,就退出并提示
-    //                }
-    //            }
-    //            if (!isOk) {
-    //                G.showToast("权限获取失败,部分功能可能无法正常工作。");
-    //            }
-    //        }
-    //        super.onRequestPermissionsResult(requestCode, permissions, grantResults);
-    //    }
-
-
     @Override
     protected int getLayoutId() {
         return R.layout.main_activity;
@@ -170,7 +160,7 @@ public class MainActivity extends BaseActivity {
         findViewById(R.id.img_share).setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                Intent i=new  Intent(MainActivity.this,AskFriendActivity.class) ;
+                Intent i = new Intent(MainActivity.this, AskFriendActivity.class);
                 startActivity(i);
             }
         });
@@ -205,13 +195,26 @@ public class MainActivity extends BaseActivity {
                 .placeholder(R.drawable.icon)
                 .dontAnimate()
                 .into((CircleImageView) findViewById(R.id.img_user));
+
+        HashMap<String, String> map = new HashMap<>();
+        map.put("open_id", SpUtils.getOpenId(this));
+        NetManager.get(Url.USER_ISFINISH_NEW_TASK, map, getApplicationContext(), new SheepCallback<Boolean>(this) {
+            @Override
+            public void success(Boolean aBoolean) {
+                if (aBoolean) {
+                    mImgBag.clearAnimation();
+                    mImgBag.setVisibility(View.GONE);
+                }
+            }
+
+            @Override
+            public void failure(IOException e) {
+            }
+        });
     }
 
     private void showNewDialog() {
         if (mDialog == null) {
-            Intent intent = getIntent();
-            String tag = intent.getStringExtra("tag");
-            //        if (TextUtils.equals(tag, "once")) {
             AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this, R.style.Theme_Transparent);
             View view = View.inflate(this, R.layout.new_user_dialog, null);
             builder.setView(view);
@@ -225,12 +228,9 @@ public class MainActivity extends BaseActivity {
             view.findViewById(R.id.img_begin_new).setOnClickListener(new View.OnClickListener() {
                 @Override
                 public void onClick(View v) {
-                    Intent intent = new Intent(MainActivity.this, WebActivity.class);
-                    intent.putExtra(WebActivity.INTENT_URL, "http://10.8.210.190:8080/rookie_guide.html");
-                    intent.putExtra(WebActivity.INTENT_TITLE, "新手引导");
-                    intent.putExtra(WebActivity.INTENT_NEW_USER, "1");
-                    intent.putExtra(WebActivity.TASK_COUNT, "1");
+                    Intent intent = new Intent(MainActivity.this, NewUserGuideActivity.class);
                     startActivity(intent);
+                    mDialog.dismiss();
                 }
             });
             mDialog.setCanceledOnTouchOutside(false);
@@ -242,13 +242,12 @@ public class MainActivity extends BaseActivity {
             });
         }
         mDialog.show();
-        //        }
     }
 
     @Override
     public void initView() {
         ((TextView) findViewById(R.id.txt_baseactivity_title)).setText("我的奖金");
-        btn= (ImageButton) findViewById(R.id.ibtn_baseactivity_right);
+        btn = (ImageButton) findViewById(R.id.ibtn_baseactivity_right);
         btn.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
@@ -280,12 +279,6 @@ public class MainActivity extends BaseActivity {
                 .setLineColor(getResources().getColor(R.color.black_text_deep))
                 .setupWithViewPager(mViewPager, R.layout.tab_ripple);
         TitleBarUtils.getInstance().setTitleFinish(this);
-        //                .setRightImgBotton(this, R.drawable.set, new View.OnClickListener() {
-        //                    @Override
-        //                    public void onClick(View view) {
-        //                        G.showToast("点设置");
-        //                    }
-        //                });
     }
 
     private void startAnimation(View view) {
@@ -299,15 +292,12 @@ public class MainActivity extends BaseActivity {
 
     @Override
     protected void onResume() {
-      /*  FloatMsg floatMsg = new FloatMsg();
-        floatMsg.shouldShow = false;
-        EventBus.getDefault().post(floatMsg);*/
         super.onResume();
 
-        if(DownloadManager.getInstance().getDownloadListCount()>0){
+        if (DownloadManager.getInstance().getDownloadListCount() > 0) {
             btn.setImageResource(R.drawable.icon_download_red);
 
-        }else{
+        } else {
             btn.setImageResource(R.drawable.icon_download);
         }
 
@@ -330,12 +320,50 @@ public class MainActivity extends BaseActivity {
     @Subscribe(threadMode = ThreadMode.MAIN)
     public void onMessageEvent(NewUserDialog done) {
         if (done.isDoneNewTask) {
-            showRedbagDialog();
+            HashMap<String, String> map = new HashMap<>();
+            map.put("open_id", SpUtils.getOpenId(this));
+            NetManager.postForm(Url.GET_NEW_TASK_RED, map, getApplicationContext(), new SheepCallback<String>(this) {
+                @Override
+                public void success(String o) {
+                    showRedbagDialog();
+                }
+
+                @Override
+                public void failure(IOException e) {
+                    super.failure(e);
+                }
+            });
+
         }
     }
 
+    @Subscribe(threadMode = ThreadMode.MAIN)
+    public void onMessageEvent(MainTab tab) {
+        mRappTabLayout.selectTab(tab.index);
+    }
+
     private void showRedbagDialog() {
-        Toast.makeText(this, "抽奖!!!", Toast.LENGTH_SHORT).show();
+        if (mRedDialog == null) {
+            AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this, R.style.Theme_Transparent);
+            View view = View.inflate(this, R.layout.new_user_red_dialog, null);
+            builder.setView(view);
+            mRedDialog = builder.create();
+            view.findViewById(R.id.img_close).setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    mRedDialog.dismiss();
+                }
+            });
+            view.findViewById(R.id.img_begin_new).setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    mRedDialog.dismiss();
+                }
+            });
+            TextView tvRedMoney = (TextView) view.findViewById(R.id.tv_money);
+            mRedDialog.setCanceledOnTouchOutside(false);
+        }
+        mRedDialog.show();
     }
 
 }

+ 144 - 0
app/src/main/java/com/sheep/jiuyan/samllsheep/page/NewUserGuideActivity.java

@@ -0,0 +1,144 @@
+package com.sheep.jiuyan.samllsheep.page;
+
+import android.content.Intent;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.text.TextUtils;
+import android.view.View;
+import android.widget.TextView;
+
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.base.BaseActivity;
+import com.sheep.jiuyan.samllsheep.event.MainTab;
+import com.sheep.jiuyan.samllsheep.event.NewUserDialog;
+import com.sheep.jiuyan.samllsheep.net.NetManager;
+import com.sheep.jiuyan.samllsheep.net.SheepCallback;
+import com.sheep.jiuyan.samllsheep.net.Url;
+import com.sheep.jiuyan.samllsheep.page.adapter.AdpMainActivity;
+import com.sheep.jiuyan.samllsheep.page.adapter.AdpNewUserTask;
+import com.sheep.jiuyan.samllsheep.page.entry.NewUserTask;
+import com.sheep.jiuyan.samllsheep.page.entry.TaskPublish;
+import com.sheep.jiuyan.samllsheep.utils.SpUtils;
+import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
+
+import org.greenrobot.eventbus.EventBus;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * Created by kemllor on 2018/1/25.
+ */
+
+public class NewUserGuideActivity extends BaseActivity {
+
+    private RecyclerView mRecyclerView;
+    private AdpNewUserTask mAdapter;
+    private NewUserTask mClickItem;
+    private View mBtnRed;
+
+    @Override
+    protected int getLayoutId() {
+        return R.layout.new_user_guide_activity;
+    }
+
+    @Override
+    public void initView() {
+        mBtnRed = findViewById(R.id.btn_get_red);
+        mAdapter = new AdpNewUserTask(this);
+        mAdapter.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                mClickItem = (NewUserTask) view.getTag(AdpNewUserTask.TAG_TASK);
+                if (!TextUtils.isEmpty(mClickItem.getUrl())) {
+                    Intent intent = new Intent(NewUserGuideActivity.this, WebActivity.class);
+                    intent.putExtra(WebActivity.INTENT_LOAD_JS, "1");
+                    intent.putExtra(WebActivity.INTENT_URL, mClickItem.getUrl());
+                    intent.putExtra(WebActivity.INTENT_TITLE, mClickItem.getTaskname());
+                    startActivity(intent);
+                    if (mClickItem.getFlag() == 0) {
+                        getMoney(mClickItem.getId());
+                    }
+                } else {
+                    if (mClickItem.getFlag() == 1) {
+                        getMoney(mClickItem.getId());
+                    } else if (mClickItem.getFlag() == 0) {
+                        MainTab tab = new MainTab();
+                        tab.index = 0;
+                        EventBus.getDefault().post(tab);
+                        finish();
+                    }
+                }
+            }
+        });
+        mRecyclerView = (RecyclerView) findViewById(R.id.rv_task);
+        mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
+        mRecyclerView.setAdapter(mAdapter);
+        TitleBarUtils.getInstance().setTitle(this, "新手引导").setTitleFinish(this);
+    }
+
+    //领取奖金;
+    private void getMoney(int id) {
+        HashMap<String, String> map = new HashMap<>();
+        map.put("open_id", SpUtils.getOpenId(this));
+        map.put("task_id", "" + id);
+        NetManager.get(Url.GET_NEW_TASK_MONEY, map, getApplicationContext(), new SheepCallback<String>(this) {
+            @Override
+            public void success(String s) {
+                if (TextUtils.equals(s, "OK")) {
+                    initData();
+                }
+            }
+
+            @Override
+            public void failure(IOException e) {
+            }
+        });
+    }
+
+    @Override
+    public void initListener() {
+        mBtnRed.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                NewUserDialog dialog = new NewUserDialog();
+                dialog.isDoneNewTask = true;
+                EventBus.getDefault().post(dialog);
+                finish();
+            }
+        });
+    }
+
+    @Override
+    public void initData() {
+        HashMap<String, String> map = new HashMap<>();
+        map.put("open_id", SpUtils.getOpenId(this));
+        NetManager.get(Url.NEW_USER_TASK_LIST, map, getApplicationContext(), new SheepCallback<List<NewUserTask>>(this) {
+
+            @Override
+            public void success(List<NewUserTask> newUserTasks) {
+                mAdapter.clear();
+                mAdapter.addAll(newUserTasks);
+                mAdapter.notifyDataSetChanged();
+            }
+
+            @Override
+            public void failure(IOException e) {
+            }
+        });
+
+        NetManager.get(Url.USER_ISFINISH_NEW_TASK, map, getApplicationContext(), new SheepCallback<Boolean>(this) {
+
+            @Override
+            public void success(Boolean aBoolean) {
+                mBtnRed.setEnabled(true);
+            }
+
+            @Override
+            public void failure(IOException e) {
+            }
+        });
+
+    }
+}

+ 28 - 2
app/src/main/java/com/sheep/jiuyan/samllsheep/page/RegisterActivity.java

@@ -1,6 +1,7 @@
 package com.sheep.jiuyan.samllsheep.page;
 
 import android.content.Intent;
+import android.os.Handler;
 import android.text.TextUtils;
 import android.view.View;
 import android.widget.EditText;
@@ -43,8 +44,6 @@ public class RegisterActivity extends BaseActivity {
     @Override
     public void initView() {
         findViews();
-        TitleBarUtils.getInstance().setTitle(this, "注 册")
-                .setTitleFinish(this);
     }
 
 
@@ -74,6 +73,14 @@ public class RegisterActivity extends BaseActivity {
                 getCode();
             }
         });
+        findViewById(R.id.tv_login).setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                Intent intent = new Intent(RegisterActivity.this, LoginActivity.class);
+                startActivity(intent);
+                finish();
+            }
+        });
     }
 
     private void getCode() {
@@ -90,6 +97,7 @@ public class RegisterActivity extends BaseActivity {
             @Override
             public void success(String o) {
                 Toast.makeText(RegisterActivity.this, "验证码已发送", Toast.LENGTH_SHORT).show();
+                handler.postDelayed(runnable, 1000);
             }
 
             @Override
@@ -100,6 +108,24 @@ public class RegisterActivity extends BaseActivity {
         });
     }
 
+    int mTime = 60;
+    Handler handler = new Handler();
+    Runnable runnable = new Runnable() {
+        @Override
+        public void run() {
+            mTime--;
+            if (mTime <= 0) {
+                mBtnCode.setText("重新发送");
+                mBtnCode.setEnabled(true);
+            } else {
+                mBtnCode.setText("重新发送(" + mTime + ")");
+                handler.postDelayed(this, 1000);
+            }
+
+        }
+    };
+
+
     private void register() {
         String moble = mEtAccount.getText().toString().trim();
         String psw = mEtPsw.getText().toString().trim();

+ 1 - 6
app/src/main/java/com/sheep/jiuyan/samllsheep/page/ShotScreenActivity.java

@@ -86,13 +86,8 @@ public class ShotScreenActivity extends Activity {
             }
 
             @Override
-            public void otherCode(int code, String string) {
-                super.otherCode(code, string);
-                finish();
-            }
-
-            @Override
             public void failure(IOException e) {
+                Toast.makeText(ShotScreenActivity.this, e.getMessage(), Toast.LENGTH_SHORT).show();
                 finish();
             }
         });

+ 6 - 60
app/src/main/java/com/sheep/jiuyan/samllsheep/page/WebActivity.java

@@ -4,10 +4,9 @@ import android.content.Intent;
 import android.text.TextUtils;
 import android.view.View;
 import android.webkit.JavascriptInterface;
+import android.webkit.JsResult;
 import android.webkit.WebChromeClient;
 import android.webkit.WebResourceRequest;
-import android.webkit.WebResourceResponse;
-import android.webkit.WebSettings;
 import android.webkit.WebView;
 import android.webkit.WebViewClient;
 import android.widget.LinearLayout;
@@ -58,24 +57,20 @@ public class WebActivity extends BaseActivity {
         }
         mWeb = (WebView) findViewById(R.id.web);
         mWeb.setWebChromeClient(new WebChromeClient() {
-
+            @Override
+            public boolean onJsAlert(WebView view, String url, String message, JsResult result) {
+                Toast.makeText(WebActivity.this, message, Toast.LENGTH_SHORT).show();
+                return super.onJsAlert(view, url, message, result);
+            }
         });
         mWeb.getSettings().setJavaScriptEnabled(true);
-        mWeb.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
         mWeb.setWebViewClient(new WebViewClient() {
-
             @Override
             public boolean shouldOverrideUrlLoading(WebView view, String url) {
-                if (url.contains("rookie_guide")) {
-                    url = url + "?count=" + getIntent().getStringExtra(TASK_COUNT);
-                }
                 view.loadUrl(url);
                 return true;
             }
         });
-        mWeb.setWebChromeClient(new WebChromeClient() {
-
-        });
         TitleBarUtils.getInstance()
                 .setTitle(this, getIntent().hasExtra(INTENT_TITLE) ?
                         getIntent().getStringExtra(INTENT_TITLE) : "任务攻略")
@@ -84,9 +79,6 @@ public class WebActivity extends BaseActivity {
         if (getIntent().hasExtra(INTENT_LOAD_JS)) {
             mWeb.addJavascriptInterface(new PublicJavaScript(), "PublicJavaScript");
         }
-        if (getIntent().hasExtra(INTENT_NEW_USER)) {
-            mWeb.addJavascriptInterface(new NewUserGuide(), "NewUserGuide");
-        }
     }
 
 
@@ -123,48 +115,6 @@ public class WebActivity extends BaseActivity {
     }
 
 
-    /**
-     * JS调用方法
-     */
-    public class NewUserGuide {
-        @JavascriptInterface
-        public void gotoTaskList(int code) {
-            NewUserDialog userDialog = new NewUserDialog();
-            if (code == 1) {
-                userDialog.isDoneNewTask = true;
-            } else {
-                userDialog.isDoneNewTask = false;
-            }
-            EventBus.getDefault().post(userDialog);
-            finish();
-        }
-
-        @JavascriptInterface
-        public void finish() {
-            WebActivity.this.finish();
-        }
-
-        @JavascriptInterface
-        public void setTitle(String title) {
-            TitleBarUtils.getInstance().setTitle(WebActivity.this, title);
-        }
-
-        @JavascriptInterface
-        public void getMoney(int code) {
-            if (code == 1) {
-                Toast.makeText(WebActivity.this, "领取第一奖励", Toast.LENGTH_SHORT).show();
-            }
-            mWeb.post(new Runnable() {
-                @Override
-                public void run() {
-                    mWeb.loadUrl("javascript:getM('1')");
-                }
-            });
-
-        }
-    }
-
-
     @Override
     public void initListener() {
     }
@@ -172,16 +122,12 @@ public class WebActivity extends BaseActivity {
     @Override
     public void initData() {
         String url = getIntent().getStringExtra(INTENT_URL);
-        if (getIntent().hasExtra(INTENT_NEW_USER)) {
-            url += "?count=" + getIntent().getStringExtra(TASK_COUNT);
-        }
         mWeb.loadUrl(url);
     }
 
     @Override
     protected void onDestroy() {
         super.onDestroy();
-        mWeb.clearCache(true);
         LinearLayout parent = (LinearLayout) mWeb.getParent();
         parent.removeView(mWeb);
         mWeb.destroy();

+ 85 - 0
app/src/main/java/com/sheep/jiuyan/samllsheep/page/adapter/AdpNewUserTask.java

@@ -0,0 +1,85 @@
+package com.sheep.jiuyan.samllsheep.page.adapter;
+
+import android.content.Context;
+import android.content.Intent;
+import android.text.Html;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.bumptech.glide.Glide;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.page.GameDetailActivity;
+import com.sheep.jiuyan.samllsheep.page.XDownLoadActivity;
+import com.sheep.jiuyan.samllsheep.page.entry.NewUserTask;
+import com.sheep.jiuyan.samllsheep.page.entry.TaskPublish;
+import com.sheep.jiuyan.samllsheep.utils.PackageUtil;
+
+/**
+ * @ Created by Dlg
+ * @ <p>TiTle:  AdpMainActivity</p>
+ * @ <p>Description:</p>
+ * @ date:  2018/1/16 13:29
+ * @ QQ:    315096953
+ */
+
+public class AdpNewUserTask extends AdpCommonRecy<NewUserTask> {
+
+    public final static int TAG_TASK = R.id.tagid1;
+
+    /**
+     * 点击后的监听处理,一定要先设置再setAdapter
+     */
+    private View.OnClickListener onClickListener;
+
+    public AdpNewUserTask(Context context) {
+        super(context);
+    }
+
+    public void setOnClickListener(View.OnClickListener onClickListener) {
+        this.onClickListener = onClickListener;
+    }
+
+    @Override
+    public int getViewIdByType(int viewType) {
+        return R.layout.new_user_item;
+    }
+
+    @Override
+    public void convert(ViewHolder holder, final NewUserTask newTask) {
+        holder.itemView.setTag(TAG_TASK, newTask);
+        holder.getView(R.id.tv_task_title, TextView.class)
+                .setText(newTask.getTaskname());
+        holder.getView(R.id.tv_task_desc, TextView.class)
+                .setText(newTask.getDesc());
+        TextView money = holder.getView(R.id.tv_money, TextView.class);
+        money.setText("+" + newTask.getMoney());
+
+        TextView status = holder.getView(R.id.tv_status, TextView.class);
+        if (newTask.getFlag() == 2) {
+            status.setText("已领取");
+            money.setVisibility(View.GONE);
+            status.setVisibility(View.VISIBLE);
+            status.setBackgroundResource(R.drawable.sp_btn_common_green);
+        } else if (newTask.getFlag() == 1) {
+            status.setText("去领奖");
+            money.setVisibility(View.GONE);
+            status.setVisibility(View.VISIBLE);
+            status.setBackgroundResource(R.drawable.sp_btn_common_orange);
+        } else {
+            status.setVisibility(View.GONE);
+            money.setVisibility(View.VISIBLE);
+        }
+
+
+    }
+
+    @Override
+    public void onCreated(ViewHolder holder, int viewType) {
+        if (onClickListener != null) {
+            holder.itemView.setOnClickListener(onClickListener);
+        }
+    }
+
+}

+ 88 - 0
app/src/main/java/com/sheep/jiuyan/samllsheep/page/entry/NewUserTask.java

@@ -0,0 +1,88 @@
+package com.sheep.jiuyan.samllsheep.page.entry;
+
+/**
+ * Created by kemllor on 2018/1/25.
+ */
+
+public class NewUserTask {
+    /**
+     * Id : 1
+     * Taskname : 认识小绵羊
+     * Money : 0.1
+     * Type : 1
+     * IsDelete : 0
+     */
+
+    private int Id;
+    private String Taskname;
+    private String Desc;
+    private String url;
+    private double Money;
+    private int Type;
+    private int IsDelete;
+    private int Flag;  //0为完成,1完成未领取,2已领取
+
+    public int getFlag() {
+        return Flag;
+    }
+
+    public void setFlag(int flag) {
+        Flag = flag;
+    }
+
+    public String getDesc() {
+        return Desc;
+    }
+
+    public String getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    public void setDesc(String desc) {
+        Desc = desc;
+    }
+
+    public int getId() {
+        return Id;
+    }
+
+    public void setId(int Id) {
+        this.Id = Id;
+    }
+
+    public String getTaskname() {
+        return Taskname;
+    }
+
+    public void setTaskname(String Taskname) {
+        this.Taskname = Taskname;
+    }
+
+    public double getMoney() {
+        return Money;
+    }
+
+    public void setMoney(double Money) {
+        this.Money = Money;
+    }
+
+    public int getType() {
+        return Type;
+    }
+
+    public void setType(int Type) {
+        this.Type = Type;
+    }
+
+    public int getIsDelete() {
+        return IsDelete;
+    }
+
+    public void setIsDelete(int IsDelete) {
+        this.IsDelete = IsDelete;
+    }
+}

+ 108 - 0
app/src/main/java/com/sheep/jiuyan/samllsheep/page/entry/UerInviteInfo.java

@@ -0,0 +1,108 @@
+package com.sheep.jiuyan.samllsheep.page.entry;
+
+/**
+ * Created by kemllor on 2018/1/25.
+ */
+
+public class UerInviteInfo {
+
+    /**
+     * User : {"Id":"66","NickName":"howie","InvitationCode":"109432","InviteNum":"12","TodayNum":"0","LastNum":"0","Commission":"0.66","Proportion":"%"}
+     */
+
+    private UserBean User;
+
+    public UserBean getUser() {
+        return User;
+    }
+
+    public void setUser(UserBean User) {
+        this.User = User;
+    }
+
+    public static class UserBean {
+        /**
+         * Id : 66
+         * NickName : howie
+         * InvitationCode : 109432
+         * InviteNum : 12
+         * TodayNum : 0
+         * LastNum : 0
+         * Commission : 0.66
+         * Proportion : %
+         */
+
+        private String Id;
+        private String NickName;
+        private String InvitationCode;
+        private String InviteNum;
+        private String TodayNum;
+        private String LastNum;
+        private String Commission;
+        private String Proportion;
+
+        public String getId() {
+            return Id;
+        }
+
+        public void setId(String Id) {
+            this.Id = Id;
+        }
+
+        public String getNickName() {
+            return NickName;
+        }
+
+        public void setNickName(String NickName) {
+            this.NickName = NickName;
+        }
+
+        public String getInvitationCode() {
+            return InvitationCode;
+        }
+
+        public void setInvitationCode(String InvitationCode) {
+            this.InvitationCode = InvitationCode;
+        }
+
+        public String getInviteNum() {
+            return InviteNum==""||InviteNum==null?"0":InviteNum;
+        }
+
+        public void setInviteNum(String InviteNum) {
+            this.InviteNum = InviteNum;
+        }
+
+        public String getTodayNum() {
+            return TodayNum==""||TodayNum==null?"0":TodayNum;
+        }
+
+        public void setTodayNum(String TodayNum) {
+            this.TodayNum = TodayNum;
+        }
+
+        public String getLastNum() {
+            return LastNum;
+        }
+
+        public void setLastNum(String LastNum) {
+            this.LastNum = LastNum;
+        }
+
+        public String getCommission() {
+            return Commission==""||Commission==null?"0":Commission;
+        }
+
+        public void setCommission(String Commission) {
+            this.Commission = Commission;
+        }
+
+        public String getProportion() {
+            return Proportion;
+        }
+
+        public void setProportion(String Proportion) {
+            this.Proportion = Proportion;
+        }
+    }
+}

+ 7 - 0
app/src/main/java/com/sheep/jiuyan/samllsheep/page/view/RappTabLayout.java

@@ -110,6 +110,13 @@ public class RappTabLayout extends RelativeLayout {
     }
 
 
+    public void selectTab(int postion) {
+        mScrollerLine.moveDegree(mLayoutLine, 0.001f, postion, mCount);
+        mLayoutMain.getChildAt(postion).setSelected(true);
+        mViewPager.setCurrentItem(postion, false);
+    }
+
+
     /**
      * 顶部Tab的监听
      */

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


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


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


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


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


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


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


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


BIN
app/src/main/res/drawable-xxhdpi/banner.png


BIN
app/src/main/res/drawable-xxhdpi/hongb.png


BIN
app/src/main/res/drawable-xxhdpi/icon_jl.png


BIN
app/src/main/res/drawable-xxhdpi/jux.png


BIN
app/src/main/res/drawable-xxhdpi/today.png


+ 9 - 0
app/src/main/res/drawable/sp_edt_background_login.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <solid android:color="@color/white" />
+    <corners android:radius="100dp" />
+    <stroke android:width="1dp"
+        android:color="@color/yellow_text_light"
+        />
+</shape>

+ 9 - 0
app/src/main/res/drawable/texe_background_new_user_normal.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <corners android:radius="10dp"/>
+    <solid
+        android:color="@color/new_user_red"/>
+
+</shape>
+

+ 8 - 0
app/src/main/res/drawable/texe_background_new_user_unable.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <corners android:radius="10dp"/>
+    <solid
+        android:color="@color/black_text_gray"/>
+
+</shape>

+ 2 - 2
app/src/main/res/drawable/texe_background_normal.xml

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
-<shape xmlns:android="http://schemas.android.com/apk/res/android">
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
 
     <corners android:radius="10dp"/>
     <stroke
         android:width="1dp"
         android:color="@color/orange_text_light"/>
-</shape>
+</selector>

+ 6 - 0
app/src/main/res/drawable/text_background_new_user.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+<item android:drawable="@drawable/texe_background_new_user_normal" android:state_enabled="true"/>
+<item android:drawable="@drawable/texe_background_new_user_unable" android:state_enabled="false"/>
+
+</selector>

+ 394 - 360
app/src/main/res/layout/activity_ask_friend.xml

@@ -1,400 +1,434 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="vertical" android:layout_width="match_parent"
-    android:layout_height="match_parent">
-
-
-   <include layout="@layout/title"></include>
-
-   <LinearLayout
-       android:layout_width="match_parent"
-       android:layout_height="70dp"
-       android:background="@color/colorPrimary"
-       android:orientation="vertical"
-
-       >
-       <LinearLayout
-           android:layout_width="match_parent"
-           android:layout_height="match_parent"
-           android:orientation="vertical"
-           android:layout_margin="20dp"
-           >
-
-       <LinearLayout
-           android:layout_width="match_parent"
-           android:layout_height="wrap_content"
-           android:orientation="horizontal"
-           android:gravity="center_vertical"
-           >
-       <TextView
-           android:layout_width="0dp"
-           android:layout_weight="1"
-           android:layout_height="wrap_content"
-           android:text="1.邀请好友"
-           android:textColor="@color/black_dark"
-           android:textSize="15sp"
-           android:gravity="center"
-           />
-       <TextView
-           android:layout_width="0dp"
-           android:layout_height="wrap_content"
-           android:text="2.好友做任务"
-           android:textColor="@color/black_dark"
-           android:textSize="15sp"
-           android:layout_weight="1"
-           android:gravity="center"
-           />
-
-       <TextView
-           android:layout_width="0dp"
-           android:layout_height="wrap_content"
-           android:text="3.拿我奖励"
-           android:textSize="15sp"
-           android:textColor="@color/black_dark"
-           android:layout_weight="1"
-           android:gravity="center"
-           />
-       </LinearLayout>
-       <LinearLayout
-           android:layout_width="match_parent"
-           android:layout_height="1px"
-           android:orientation="horizontal"
-           android:background="@color/black_dark"
-           android:layout_marginLeft="5dp"
-           android:layout_marginRight="5dp"
-           android:layout_marginTop="5dp"
-
-           >
-           <TextView
-               android:layout_width="0dp"
-               android:layout_weight="1"
-               android:layout_height="match_parent"
-               android:text="."
-               android:textColor="@color/black_dark"
-               android:textSize="20sp"
-               android:layout_gravity="center"
-               />
-           <TextView
-               android:layout_width="wrap_content"
-               android:layout_height="match_parent"
-               android:textColor="@color/black_dark"
-               android:textSize="20sp"
-               android:layout_weight="1"
-               android:layout_gravity="center"
-               />
-
-           <TextView
-               android:layout_width="wrap_content"
-               android:layout_height="match_parent"
-               android:text="."
-               android:textColor="@color/black_dark"
-               android:layout_weight="1"
-               android:gravity="center_vertical"
-               android:layout_gravity="center"
-               />
-
-       </LinearLayout>
-</LinearLayout>
-
-   </LinearLayout>
-
-   <RelativeLayout
-       android:layout_width="match_parent"
-       android:layout_height="wrap_content"
-       android:orientation="vertical"
-
-       >
-
-       <View
-           android:layout_width="match_parent"
-           android:layout_height="40dp"
-           android:background="@color/colorPrimary"
-
-           ></View>
+              android:layout_width="match_parent"
+              android:layout_height="match_parent"
+              android:orientation="vertical">
 
 
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="horizontal"
-        android:layout_marginLeft="18dp"
-        android:layout_marginRight="18dp"
-        android:id="@+id/content"
-        android:layout_alignParentTop="true"
-        >
+    <include layout="@layout/title"></include>
 
     <LinearLayout
-        android:layout_width="0dp"
-        android:layout_height="wrap_content"
+        android:layout_width="match_parent"
+        android:layout_height="70dp"
+        android:background="@color/colorPrimary"
         android:orientation="vertical"
-        android:background="@drawable/icon_jl"
-        android:padding="20dp"
-        android:layout_weight="1"
-        android:layout_marginTop="5dp"
-        android:layout_marginRight="5dp"
-        >
-
-        <TextView
-            android:id="@+id/tv_reward_size"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="256"
-            android:textColor="@color/sheep_red"
-            android:textSize="25sp"
-            android:layout_gravity="center"
-
-            />
-
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="奖励"
-            android:textSize="12sp"
-            android:layout_marginTop="10dp"
-            android:textColor="@color/black_light"
-            android:layout_gravity="center"
-            />
 
+        >
 
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_margin="20dp"
+            android:orientation="vertical"
+            >
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:gravity="center_vertical"
+                android:orientation="horizontal"
+                >
+
+                <TextView
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:gravity="center"
+                    android:text="1.邀请好友"
+                    android:textColor="@color/black_dark"
+                    android:textSize="15sp"
+                    />
+
+                <TextView
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:gravity="center"
+                    android:text="2.好友做任务"
+                    android:textColor="@color/black_dark"
+                    android:textSize="15sp"
+                    />
+
+                <TextView
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:gravity="center"
+                    android:text="3.拿我奖励"
+                    android:textColor="@color/black_dark"
+                    android:textSize="15sp"
+                    />
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="1px"
+                android:layout_marginLeft="5dp"
+                android:layout_marginRight="5dp"
+                android:layout_marginTop="5dp"
+                android:background="@color/black_dark"
+                android:orientation="horizontal"
+
+                >
+
+                <TextView
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_gravity="center"
+                    android:layout_weight="1"
+                    android:text="."
+                    android:textColor="@color/black_dark"
+                    android:textSize="20sp"
+                    />
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:layout_gravity="center"
+                    android:layout_weight="1"
+                    android:textColor="@color/black_dark"
+                    android:textSize="20sp"
+                    />
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:layout_gravity="center"
+                    android:layout_weight="1"
+                    android:gravity="center_vertical"
+                    android:text="."
+                    android:textColor="@color/black_dark"
+                    />
+
+            </LinearLayout>
+        </LinearLayout>
 
     </LinearLayout>
 
-
-
-    <LinearLayout
-        android:layout_width="0dp"
+    <RelativeLayout
+        android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:orientation="vertical"
-        android:background="@drawable/icon_hy"
-        android:padding="20dp"
-        android:layout_weight="1"
-        android:layout_marginLeft="5dp"
-        >
 
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="256"
-            android:textColor="@color/sheep_red"
-            android:textSize="25sp"
-            android:layout_gravity="center"
-            android:id="@+id/tv_friend_size"
-            />
+        >
 
-        <TextView
-            android:layout_width="wrap_content"
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="40dp"
+            android:background="@color/colorPrimary"
+
+            ></View>
+
+
+        <LinearLayout
+            android:id="@+id/content"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/layout_heigh_large_x2"
+            android:layout_alignParentTop="true"
+            android:layout_marginLeft="18dp"
+            android:layout_marginRight="18dp"
+            android:orientation="horizontal"
+            >
+
+            <LinearLayout
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_margin="@dimen/content_padding_small"
+                android:layout_weight="1"
+                android:background="@drawable/icon_jl"
+                android:orientation="vertical"
+                >
+
+                <TextView
+                    android:layout_marginTop="@dimen/content_padding_big"
+                    android:id="@+id/tv_reward_size"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center"
+                    android:textColor="@color/sheep_red"
+                    android:textSize="25sp"
+                    />
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center"
+                    android:layout_marginTop="10dp"
+                    android:text="奖励"
+                    android:textColor="@color/black_light"
+                    android:textSize="12sp"
+                    />
+
+
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_margin="@dimen/content_padding_small"
+                android:layout_weight="1"
+                android:background="@drawable/icon_hy"
+                android:orientation="vertical"
+                >
+
+                <TextView
+                    android:layout_marginTop="@dimen/content_padding_big"
+                    android:id="@+id/tv_friend_size"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center"
+                    android:textColor="@color/sheep_red"
+                    android:textSize="25sp"
+                    />
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center"
+                    android:layout_marginTop="10dp"
+                    android:text="好友"
+                    android:textColor="@color/black_light"
+                    android:textSize="12sp"
+                    />
+
+
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_margin="@dimen/content_padding_small"
+                android:layout_weight="1"
+                android:background="@drawable/today"
+                android:orientation="vertical"
+                >
+
+                <TextView
+                    android:layout_marginTop="@dimen/content_padding_big"
+                    android:id="@+id/tv_today_size"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center"
+                    android:textColor="@color/sheep_red"
+                    android:textSize="25sp"
+                    />
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center"
+                    android:layout_marginTop="10dp"
+                    android:text="今日邀请"
+                    android:textColor="@color/black_light"
+                    android:textSize="12sp"
+                    />
+
+
+            </LinearLayout>
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:text="好友"
-            android:textSize="12sp"
-            android:layout_marginTop="10dp"
-            android:textColor="@color/black_light"
-            android:layout_gravity="center"
-            />
-
-
-    </LinearLayout>
-
-    </LinearLayout>
-      <LinearLayout
-          android:layout_width="match_parent"
-          android:layout_height="wrap_content"
-          android:orientation="vertical"
-          android:layout_below="@id/content"
-          >
-
-       <TextView
-           android:layout_width="match_parent"
-           android:layout_height="wrap_content"
-           android:layout_gravity="center_vertical"
-           android:text="*好友首次完成后,我获得额外随机奖励"
-           android:layout_marginLeft="25dp"
-           android:layout_marginRight="20dp"
-           android:layout_marginTop="5dp"
-           android:textSize="12sp"
-           />
-
-       <LinearLayout
-           android:layout_width="wrap_content"
-           android:layout_height="wrap_content"
-           android:orientation="horizontal"
-           android:layout_marginLeft="25dp"
-           android:layout_marginRight="20dp"
-           android:layout_marginTop="5dp"
-           >
-       <TextView
-           android:layout_width="match_parent"
-           android:layout_height="wrap_content"
-           android:layout_gravity="center_vertical"
-           android:text="*好友完成任务后,我获得"
-           android:textSize="12sp"
-           />
-
-           <TextView
-               android:id="@+id/tv_proportion_size"
-               android:layout_width="match_parent"
-               android:layout_height="wrap_content"
-               android:layout_gravity="center_vertical"
-               android:text="20%"
-               android:textSize="12sp"
-               android:textColor="@color/sheep_red"
-               />
-
-           <TextView
-               android:layout_width="match_parent"
-               android:layout_height="wrap_content"
-               android:layout_gravity="center_vertical"
-               android:text="提成奖励"
-               android:textSize="12sp"
-               />
-
-       </LinearLayout>
-
-</LinearLayout>
-   </RelativeLayout>
+            android:layout_below="@id/content"
+            android:orientation="vertical"
+            >
+
+            <TextView
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center_vertical"
+                android:layout_marginLeft="25dp"
+                android:layout_marginRight="20dp"
+                android:layout_marginTop="5dp"
+                android:text="*好友首次完成后,我获得额外随机奖励"
+                android:textSize="12sp"
+                />
+
+            <LinearLayout
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="25dp"
+                android:layout_marginRight="20dp"
+                android:layout_marginTop="5dp"
+                android:orientation="horizontal"
+                >
+
+                <TextView
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_vertical"
+                    android:text="*好友完成任务后,我获得"
+                    android:textSize="12sp"
+                    />
+
+                <TextView
+                    android:id="@+id/tv_proportion_size"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_vertical"
+                    android:textColor="@color/sheep_red"
+                    android:textSize="@dimen/text_size_3"
+                    />
+
+                <TextView
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_vertical"
+                    android:text="提成奖励"
+                    android:textSize="12sp"
+                    />
+
+            </LinearLayout>
+
+        </LinearLayout>
+    </RelativeLayout>
 
 
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
+        android:layout_marginTop="10dp"
         android:background="@color/white"
         android:orientation="vertical"
-        android:layout_marginTop="10dp"
-        >
-
-    <TextView
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:text="好友邀请"
-        android:textSize="16sp"
-        android:drawablePadding="10dp"
-        android:textColor="@color/black_dark"
-        android:drawableLeft="@drawable/icon_yq"
-        android:layout_marginLeft="10dp"
-        android:layout_gravity="center_vertical"
-        android:layout_margin="12dp"
-        />
-
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="1px"
-        android:background="@color/black_light"
-        />
-
-
-     <RelativeLayout
-         android:layout_width="match_parent"
-         android:layout_height="80dp"
-         android:id="@+id/rl_emw"
-         >
-         <ImageView
-             android:layout_width="wrap_content"
-             android:layout_height="wrap_content"
-             android:src="@drawable/icon_ewm"
-             android:id="@+id/ic_emw"
-             android:layout_alignParentLeft="true"
-             android:layout_centerVertical="true"
-             android:layout_marginLeft="20dp"
-             />
-
-         <TextView
-             android:id="@+id/tv_ask"
-             android:layout_width="wrap_content"
-             android:layout_height="wrap_content"
-             android:text="二维码邀请"
-             android:textSize="16sp"
-             android:textColor="@color/black_light"
-             android:layout_toRightOf="@id/ic_emw"
-             android:layout_marginLeft="12dp"
-             android:layout_marginTop="20dp"
-             />
-
-         <TextView
-             android:layout_width="wrap_content"
-             android:layout_height="wrap_content"
-             android:text="特别适合当面邀请,简单明了"
-             android:textSize="12sp"
-             android:textColor="@color/black_light"
-             android:layout_below="@id/tv_ask"
-             android:layout_toRightOf="@id/ic_emw"
-             android:layout_marginTop="5dp"
-             android:layout_marginLeft="12dp"
-
-             />
-
-        <ImageView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-             android:src="@drawable/icon_jiantou3"
-            android:layout_alignParentRight="true"
-            android:layout_centerVertical="true"
-            android:layout_marginRight="15dp"
-
-            />
-         
-         
-     </RelativeLayout>
-
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="1px"
-        android:background="@color/line"
-        android:layout_marginLeft="15dp"
-        android:layout_marginRight="15dp"
-        />
-
-    <RelativeLayout
-        android:layout_width="match_parent"
-        android:layout_height="80dp"
-        android:id="@+id/rl_link"
-
         >
-        <ImageView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:src="@drawable/icon_ewm"
-            android:id="@+id/ic_lj"
-            android:layout_alignParentLeft="true"
-            android:layout_centerVertical="true"
-            android:layout_marginLeft="20dp"
-            />
 
         <TextView
-            android:id="@+id/tv_link"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:text="链接邀请"
+            android:layout_gravity="center_vertical"
+            android:layout_margin="12dp"
+            android:layout_marginLeft="10dp"
+            android:drawableLeft="@drawable/icon_yq"
+            android:drawablePadding="10dp"
+            android:text="好友邀请"
+            android:textColor="@color/black_dark"
             android:textSize="16sp"
-            android:textColor="@color/black_light"
-            android:layout_toRightOf="@id/ic_lj"
-            android:layout_marginLeft="12dp"
-            android:layout_marginTop="20dp"
             />
 
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="最经典最万能,哪里都能发"
-            android:textSize="12sp"
-            android:textColor="@color/black_light"
-            android:layout_below="@id/tv_link"
-            android:layout_toRightOf="@id/ic_lj"
-            android:layout_marginTop="5dp"
-            android:layout_marginLeft="12dp"
-
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="1px"
+            android:background="@color/black_light"
             />
 
-        <ImageView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:src="@drawable/icon_jiantou3"
-            android:layout_alignParentRight="true"
-            android:layout_centerVertical="true"
-            android:layout_marginRight="15dp"
 
+        <RelativeLayout
+            android:id="@+id/rl_emw"
+            android:layout_width="match_parent"
+            android:layout_height="80dp"
+            >
+
+            <ImageView
+                android:id="@+id/ic_emw"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentLeft="true"
+                android:layout_centerVertical="true"
+                android:layout_marginLeft="20dp"
+                android:src="@drawable/icon_ewm"
+                />
+
+            <TextView
+                android:id="@+id/tv_ask"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="12dp"
+                android:layout_marginTop="20dp"
+                android:layout_toRightOf="@id/ic_emw"
+                android:text="二维码邀请"
+                android:textColor="@color/black_light"
+                android:textSize="16sp"
+                />
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_below="@id/tv_ask"
+                android:layout_marginLeft="12dp"
+                android:layout_marginTop="5dp"
+                android:layout_toRightOf="@id/ic_emw"
+                android:text="特别适合当面邀请,简单明了"
+                android:textColor="@color/black_light"
+                android:textSize="12sp"
+
+                />
+
+            <ImageView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentRight="true"
+                android:layout_centerVertical="true"
+                android:layout_marginRight="15dp"
+                android:src="@drawable/icon_jiantou3"
+
+                />
+
+
+        </RelativeLayout>
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="1px"
+            android:layout_marginLeft="15dp"
+            android:layout_marginRight="15dp"
+            android:background="@color/line"
             />
 
-
-    </RelativeLayout>
+        <RelativeLayout
+            android:id="@+id/rl_link"
+            android:layout_width="match_parent"
+            android:layout_height="80dp"
+
+            >
+
+            <ImageView
+                android:id="@+id/ic_lj"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentLeft="true"
+                android:layout_centerVertical="true"
+                android:layout_marginLeft="20dp"
+                android:src="@drawable/icon_ewm"
+                />
+
+            <TextView
+                android:id="@+id/tv_link"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="12dp"
+                android:layout_marginTop="20dp"
+                android:layout_toRightOf="@id/ic_lj"
+                android:text="链接邀请"
+                android:textColor="@color/black_light"
+                android:textSize="16sp"
+                />
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_below="@id/tv_link"
+                android:layout_marginLeft="12dp"
+                android:layout_marginTop="5dp"
+                android:layout_toRightOf="@id/ic_lj"
+                android:text="最经典最万能,哪里都能发"
+                android:textColor="@color/black_light"
+                android:textSize="12sp"
+
+                />
+
+            <ImageView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentRight="true"
+                android:layout_centerVertical="true"
+                android:layout_marginRight="15dp"
+                android:src="@drawable/icon_jiantou3"
+
+                />
+
+
+        </RelativeLayout>
     </LinearLayout>
 
 

+ 77 - 58
app/src/main/res/layout/login_actvity.xml

@@ -1,70 +1,89 @@
 <?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:focusableInTouchMode="true"
-              android:orientation="vertical">
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+             android:layout_width="match_parent"
+             android:layout_height="match_parent"
+             android:focusableInTouchMode="true"
+             android:orientation="vertical">
 
-
-    <include
-        layout="@layout/title"/>
-
-    <View
+    <ImageView
         android:layout_width="match_parent"
-        android:layout_height="50dp"/>
+        android:layout_height="match_parent"
+        android:scaleType="centerCrop"
+        android:src="@drawable/login_bg"/>
 
-    <EditText
-        android:id="@+id/et_account"
-        style="style_edt"
+    <LinearLayout
+        android:paddingLeft="@dimen/content_padding"
+        android:paddingRight="@dimen/content_padding"
         android:layout_width="match_parent"
-        android:layout_height="@dimen/layout_heigh_default"
-        android:layout_margin="@dimen/content_padding"
-        android:hint="请输入帐号"
-        android:textSize="@dimen/text_size_3"/>
+        android:layout_height="match_parent"
+        android:orientation="vertical">
 
-    <EditText
-        android:id="@+id/et_psw"
-        style="style_edt"
-        android:layout_width="match_parent"
-        android:layout_height="@dimen/layout_heigh_default"
-        android:layout_margin="@dimen/content_padding"
-        android:hint="请输入密码"
-        android:inputType="textPassword"
-        android:textSize="@dimen/text_size_3"/>
 
-    <TextView
-        android:id="@+id/tv_register"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:padding="@dimen/content_padding"
-        android:gravity="right"
-        android:text="注册新用户"
-        android:textColor="@color/orange_text_light"/>
+        <TextView
+            android:id="@+id/tv_register"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:gravity="right"
+            android:padding="@dimen/content_padding_big"
+            android:text="注册"
+            android:textColor="@color/orange_text_light"
+            android:textSize="@dimen/text_size_4"/>
 
-    <ImageView
-        android:id="@+id/img_login"
-        android:layout_width="50dp"
-        android:layout_height="50dp"
-        android:layout_centerInParent="true"
-        android:layout_gravity="center"
-        android:src="@drawable/wx_logo"/>
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="230dp"/>
 
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="0dp"
-        android:layout_weight="1"/>
+        <EditText
+            android:id="@+id/et_account"
+            style="style_edt"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/edt_heigh_default"
+            android:layout_margin="@dimen/content_padding_small"
+            android:background="@drawable/sp_edt_background_login"
+            android:hint="请输入帐号"
+            android:paddingLeft="20dp"
+            android:textColor="@color/black_text_deep"
+            android:textSize="@dimen/text_size_3"/>
 
+        <EditText
+            android:id="@+id/et_psw"
+            style="style_edt"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/edt_heigh_default"
+            android:layout_margin="@dimen/content_padding_small"
+            android:background="@drawable/sp_edt_background_login"
+            android:hint="请输入密码"
+            android:inputType="textPassword"
+            android:paddingLeft="20dp"
+            android:textColor="@color/black_text_deep"
+            android:textSize="@dimen/text_size_3"/>
 
-    <TextView
-        android:id="@+id/tv_wx"
-        style="@style/style_btn"
-        android:layout_width="match_parent"
-        android:layout_height="35dp"
-        android:layout_marginBottom="@dimen/content_padding"
-        android:layout_marginLeft="@dimen/content_padding_big"
-        android:layout_marginRight="@dimen/content_padding_big"
-        android:gravity="center"
-        android:text="登 录"
-        android:textSize="@dimen/text_size_3"/>
 
-</LinearLayout>
+        <ImageView
+            android:id="@+id/img_login"
+            android:layout_width="50dp"
+            android:layout_height="50dp"
+            android:layout_centerInParent="true"
+            android:layout_gravity="center"
+            android:src="@drawable/wx_logo"
+            android:visibility="gone"/>
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="30dp"
+            />
+        <TextView
+            android:id="@+id/tv_wx"
+            style="@style/style_btn"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/edt_heigh_default"
+            android:layout_margin="@dimen/content_padding_small"
+            android:gravity="center"
+            android:text="登 录"
+            android:textSize="@dimen/text_size_4"/>
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="0dp"
+            android:layout_weight="1"/>
+    </LinearLayout>
+</FrameLayout>

+ 47 - 0
app/src/main/res/layout/new_user_guide_activity.xml

@@ -0,0 +1,47 @@
+<?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">
+
+    <include
+        layout="@layout/title"/>
+
+    <android.support.v4.widget.NestedScrollView
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        android:layout_weight="1">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:orientation="vertical">
+
+            <ImageView
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:scaleType="centerCrop"
+                android:src="@drawable/banner"/>
+
+            <android.support.v7.widget.RecyclerView
+                android:id="@+id/rv_task"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                >
+
+            </android.support.v7.widget.RecyclerView>
+        </LinearLayout>
+    </android.support.v4.widget.NestedScrollView>
+
+    <TextView
+        android:id="@+id/btn_get_red"
+        android:layout_width="match_parent"
+        android:layout_height="@dimen/layout_heigh_default"
+        android:layout_margin="@dimen/content_padding"
+        android:background="@drawable/text_background_new_user"
+        android:gravity="center"
+        android:text="领取最高10元新手礼包"
+        android:textColor="@color/white"
+        android:enabled="false"
+        android:textSize="@dimen/text_size_4"/>
+</LinearLayout>

+ 71 - 0
app/src/main/res/layout/new_user_item.xml

@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:orientation="vertical">
+
+    <RelativeLayout
+        android:layout_margin="@dimen/content_padding_small"
+        android:background="@color/background_light_gray"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content">
+
+
+        <LinearLayout
+            android:layout_width="wrap_content"
+            android:layout_height="@dimen/layout_heigh_default"
+            android:layout_margin="@dimen/content_padding"
+            android:orientation="vertical">
+
+            <TextView
+                android:id="@+id/tv_task_title"
+                android:layout_width="wrap_content"
+                android:layout_height="0dp"
+                android:layout_weight="1"
+                android:gravity="center"
+                android:textColor="@color/black_text_deep"
+                android:textSize="@dimen/text_size_4"/>
+
+            <TextView
+                android:id="@+id/tv_task_desc"
+                android:layout_width="wrap_content"
+                android:layout_height="0dp"
+                android:layout_weight="1"
+                android:gravity="center"
+                android:textColor="@color/black_text_gray"
+                android:textSize="@dimen/text_size_3"/>
+
+        </LinearLayout>
+
+        <RelativeLayout
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentRight="true"
+            android:layout_centerVertical="true"
+            android:layout_marginRight="@dimen/content_padding">
+
+            <TextView
+                android:id="@+id/tv_money"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textColor="@color/sheep_red"
+                android:textSize="@dimen/text_size_5"
+                />
+
+            <TextView
+                android:id="@+id/tv_status"
+                style="@style/style_btn"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:background="@drawable/sp_btn_common_orange"
+                android:text="已完成"
+                android:textColor="@color/white"
+                android:visibility="gone"/>
+
+        </RelativeLayout>
+
+        <include
+            layout="@layout/line_h_1px_black"/>
+    </RelativeLayout>
+
+</RelativeLayout>

+ 65 - 0
app/src/main/res/layout/new_user_red_dialog.xml

@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+
+    >
+
+<RelativeLayout
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:layout_centerInParent="true">
+
+
+    <ImageView
+        android:id="@+id/imageView"
+        android:layout_width="320dp"
+        android:layout_height="422dp"
+        android:layout_centerInParent="true"
+        android:src="@drawable/hongb"/>
+
+    <TextView
+        android:id="@+id/btn_get_money"
+        style="@style/style_btn"
+        android:layout_width="175dp"
+        android:layout_height="40dp"
+        android:layout_alignBottom="@+id/imageView"
+        android:layout_centerHorizontal="true"
+        android:src="@drawable/begin_new"
+        android:text="立即领取"
+        android:textSize="@dimen/text_size_4"/>
+
+    <TextView
+        android:id="@+id/tv_money"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_centerHorizontal="true"
+        android:textSize="@dimen/text_size_9"
+        android:textColor="@color/yellow_text_light"
+        android:layout_marginBottom="30dp"
+        android:layout_above="@id/btn_get_money"
+       />
+
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_centerHorizontal="true"
+        android:textSize="@dimen/text_size_5"
+        android:layout_toRightOf="@id/tv_money"
+        android:layout_alignBottom="@id/tv_money"
+        android:textColor="@color/yellow_text_light"
+        android:layout_marginBottom="@dimen/content_padding"
+        android:layout_marginLeft="@dimen/content_padding"
+        android:layout_above="@id/btn_get_money"
+        android:text="元"/>
+
+    <ImageView
+        android:id="@+id/img_close"
+        android:layout_width="27dp"
+        android:layout_height="27dp"
+        android:layout_below="@+id/imageView"
+        android:layout_centerHorizontal="true"
+        android:layout_marginTop="50dp"
+        android:src="@drawable/delete"/>
+</RelativeLayout>
+</RelativeLayout>

+ 106 - 74
app/src/main/res/layout/register_activity.xml

@@ -1,93 +1,125 @@
 <?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:focusableInTouchMode="true"
-              android:orientation="vertical">
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+             android:layout_width="match_parent"
+             android:layout_height="match_parent"
+             android:focusableInTouchMode="true"
+             android:orientation="vertical">
 
-    <include
-        layout="@layout/title"/>
-
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="50dp"/>
-
-    <EditText
-        android:id="@+id/et_account"
-        style="style_edt"
+    <ImageView
         android:layout_width="match_parent"
-        android:layout_height="@dimen/layout_heigh_default"
-        android:layout_margin="@dimen/content_padding"
-        android:hint="请输入手机号"
-        android:textSize="@dimen/text_size_3"/>
+        android:layout_height="match_parent"
+        android:scaleType="centerCrop"
+        android:src="@drawable/login_bg"/>
 
     <LinearLayout
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_margin="@dimen/content_padding"
-        android:orientation="horizontal"
-        >
+        android:layout_height="match_parent"
+        android:orientation="vertical"
+        android:paddingLeft="@dimen/content_padding"
+        android:paddingRight="@dimen/content_padding">
+
+        <TextView
+            android:id="@+id/tv_login"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:gravity="right"
+            android:padding="@dimen/content_padding_big"
+            android:text="登录"
+            android:textColor="@color/orange_text_light"
+            android:textSize="@dimen/text_size_4"/>
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="200dp"/>
 
         <EditText
-            android:id="@+id/et_code"
+            android:id="@+id/et_account"
             style="style_edt"
-            android:layout_width="0dp"
-            android:layout_height="@dimen/layout_heigh_default"
-            android:layout_weight="2"
-            android:hint="请输入验证码"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/edt_heigh_default"
+            android:layout_margin="@dimen/content_padding_small"
+            android:background="@drawable/sp_edt_background_login"
+            android:hint="请输入手机号"
+            android:paddingLeft="@dimen/content_padding_big"
             android:textSize="@dimen/text_size_3"/>
 
-        <TextView
-            android:id="@+id/btn_code"
-            android:layout_width="0dp"
+        <LinearLayout
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_gravity="center|center_vertical"
-            android:layout_weight="1"
-            android:background="@drawable/sp_btn_common"
-            android:gravity="center"
-            android:padding="@dimen/content_padding_small"
-            android:text="获取验证码"
-            android:textColor="@color/black_text_deep"
-            />
+            android:layout_margin="@dimen/content_padding_small"
+            android:orientation="horizontal"
+            >
 
-    </LinearLayout>
+            <EditText
+                android:id="@+id/et_code"
+                style="style_edt"
+                android:layout_width="0dp"
+                android:layout_height="@dimen/edt_heigh_default"
+                android:layout_weight="2"
+                android:background="@drawable/sp_edt_background_login"
+                android:hint="请输入验证码"
+                android:paddingLeft="@dimen/content_padding_big"
+                android:textSize="@dimen/text_size_3"/>
 
+            <TextView
+                android:id="@+id/btn_code"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center|center_vertical"
+                android:layout_marginLeft="@dimen/content_padding"
+                android:layout_weight="1"
+                android:background="@drawable/sp_btn_common"
+                android:gravity="center"
+                android:padding="@dimen/content_padding_small"
+                android:text="获取验证码"
+                android:textColor="@color/black_text_deep"
+                />
 
-    <EditText
-        android:id="@+id/et_psw"
-        style="style_edt"
-        android:layout_width="match_parent"
-        android:layout_height="@dimen/layout_heigh_default"
-        android:layout_margin="@dimen/content_padding"
-        android:hint="请输入密码"
-        android:inputType="textPassword"
-        android:textSize="@dimen/text_size_3"/>
+        </LinearLayout>
 
-    <EditText
-        android:id="@+id/et_invite"
-        style="style_edt"
-        android:layout_width="match_parent"
-        android:layout_height="@dimen/layout_heigh_default"
-        android:layout_margin="@dimen/content_padding"
-        android:hint="请输入邀请码(选填)"
-        android:inputType="textPassword"
-        android:textSize="@dimen/text_size_3"/>
 
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="0dp"
-        android:layout_weight="1"/>
+        <EditText
+            android:id="@+id/et_psw"
+            style="style_edt"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/edt_heigh_default"
+            android:layout_margin="@dimen/content_padding_small"
+            android:background="@drawable/sp_edt_background_login"
+            android:hint="请输入密码"
+            android:inputType="textPassword"
+            android:paddingLeft="@dimen/content_padding_big"
+            android:textSize="@dimen/text_size_3"/>
 
-    <TextView
-        android:id="@+id/tv_wx"
-        style="@style/style_btn"
-        android:layout_width="match_parent"
-        android:layout_height="35dp"
-        android:layout_marginBottom="@dimen/content_padding"
-        android:layout_marginLeft="@dimen/content_padding_big"
-        android:layout_marginRight="@dimen/content_padding_big"
-        android:gravity="center"
-        android:text="注 册"
-        android:textSize="@dimen/text_size_3"/>
+        <EditText
+            android:id="@+id/et_invite"
+            style="style_edt"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/edt_heigh_default"
+            android:layout_margin="@dimen/content_padding_small"
+            android:background="@drawable/sp_edt_background_login"
+            android:hint="请输入邀请码(选填)"
+            android:inputType="textPassword"
+            android:paddingLeft="@dimen/content_padding_big"
+            android:textSize="@dimen/text_size_3"/>
 
-</LinearLayout>
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="30dp"
+            />
+
+        <TextView
+            android:id="@+id/tv_wx"
+            style="@style/style_btn"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/edt_heigh_default"
+            android:layout_margin="@dimen/content_padding_small"
+            android:gravity="center"
+            android:text="注 册"
+            android:textSize="@dimen/text_size_4"/>
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="0dp"
+            android:layout_weight="1"/>
+    </LinearLayout>
+</FrameLayout>

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

@@ -14,6 +14,7 @@
     <color name="backgroud">#f4f4f9</color>
     <color name="green">#4cd117</color>
     <color name="sheep_red">#f00</color>
+    <color name="new_user_red">#e84737</color>
     <color name="blue">@color/theme_bule</color>
     <color name="colorControlHighlight">@color/theme_bule</color>
 

+ 3 - 0
app/src/main/res/values/common.xml

@@ -26,12 +26,15 @@
     <dimen name="text_size_6">22sp</dimen>
     <dimen name="text_size_7">26sp</dimen>
     <dimen name="text_size_8">30sp</dimen>
+    <dimen name="text_size_9">50sp</dimen>
 
     <!--一般layout的高度-->
     <dimen name="layout_heigh_default">48dp</dimen>
     <dimen name="layout_heigh_large">60dp</dimen>
+    <dimen name="layout_heigh_large_x2">120dp</dimen>
     <dimen name="layout_heigh_small">32dp</dimen>
     <dimen name="image_item">50dp</dimen>
+    <dimen name="edt_heigh_default">40dp</dimen>
 
     <!--下载按钮的style-->
     <style name="style_btn" parent="android:Widget.Material.Light.Button.Borderless.Small">