瀏覽代碼

register & ui

hanjing 7 年之前
父節點
當前提交
631d247bfc

+ 20 - 5
app/src/main/java/com/sheep/gamegroup/module/game/util/FocusGameHelper.java

@@ -62,10 +62,10 @@ public class FocusGameHelper {
                     @Override
                     public void onNext(BaseMessage baseMessage) {
                         apps = baseMessage.getData(Applications.class);
-                        if (apps!=null) {
+                        if (apps != null) {
                             bindData();
                             rootView.setVisibility(View.VISIBLE);
-                        } else{
+                        } else {
                             rootView.setVisibility(View.GONE);
                         }
                     }
@@ -81,9 +81,24 @@ public class FocusGameHelper {
     private void bindData() {
         ViewUtil.setText(titleView, apps.getName());
         ViewUtil.setText(sizeView, apps.getPackage_size() + "M");
-        tagView1.setText("赏金¥" + apps.getRewardSum());
-        tagView2.setText("福利" + apps.getWelfareNum());
-        tagView3.setText("礼包" + apps.getGiftNum());
+        if (apps.getRewardSum() > 0) {
+            tagView1.setText("赏金¥" + apps.getRewardSum());
+            tagView1.setVisibility(View.VISIBLE);
+        } else {
+            tagView1.setVisibility(View.GONE);
+        }
+        if (apps.getWelfareNum() > 0) {
+            tagView2.setText("福利" + apps.getWelfareNum());
+            tagView2.setVisibility(View.VISIBLE);
+        } else {
+            tagView2.setVisibility(View.GONE);
+        }
+        if (apps.getGiftNum() > 0) {
+            tagView3.setText("礼包" + apps.getGiftNum());
+            tagView3.setVisibility(View.VISIBLE);
+        } else {
+            tagView3.setVisibility(View.GONE);
+        }
 
         ViewUtil.setGameImage(iconView, apps.getIcon());
         rootView.setOnClickListener(v -> {

+ 13 - 5
app/src/main/java/com/sheep/gamegroup/module/login/LoginAct.java

@@ -5,6 +5,7 @@ import android.content.SharedPreferences;
 import android.os.Bundle;
 import android.support.annotation.Nullable;
 import android.support.v4.app.Fragment;
+import android.support.v4.app.FragmentManager;
 import android.support.v4.app.FragmentTransaction;
 import android.text.TextUtils;
 import android.util.Log;
@@ -36,11 +37,14 @@ import com.umeng.socialize.bean.SHARE_MEDIA;
 
 import java.util.List;
 import java.util.Map;
+import java.util.Stack;
 
 public class LoginAct extends BaseUMActivity implements LoginController {
 
     private boolean isLogined = false;
 
+    private Stack<String> titleStack = new Stack<>();
+
     @Override
     protected void onCreate(@Nullable Bundle savedInstanceState) {
         StatusBarUtils.setTranslucent(this);
@@ -64,16 +68,17 @@ public class LoginAct extends BaseUMActivity implements LoginController {
     }
 
     @Override
-    protected void initSlidr(){
+    protected void initSlidr() {
         // doNothing
     }
+
     @Override
     public void initView() {
         TitleBarUtils.getInstance().setTitleBack(this);
 //        if (DDProviderHelper.getInstance().getAccountList().size() == 0) {
         WelcomeFgt welcomeFragment = WelcomeFgt.newInstance(this);
         showFragment("welcome", welcomeFragment);
-        if(getIntent().getStringExtra("where_from") != null)//为空时代表没有登录的情况下直接进入小绵羊
+        if (getIntent().getStringExtra("where_from") != null)//为空时代表没有登录的情况下直接进入小绵羊
             whenToLogin(LoginController.PLATFORM_PHONE);
 //        } else {
 //            SignInFgt signInFragment = SignInFgt.newInstance(this);
@@ -90,18 +95,20 @@ public class LoginAct extends BaseUMActivity implements LoginController {
         if (isLogined) {
             return;
         }
+        int stackCount = getSupportFragmentManager().getBackStackEntryCount();
         super.onBackPressed();
-        if (getSupportFragmentManager().getBackStackEntryCount() == 1) {
+        if (stackCount == 2) {
             TitleBarUtils.getInstance().setShowOrHide(this, false);
         }
         if (getSupportActionBar() != null) {
-            if (getSupportFragmentManager().getBackStackEntryCount() == 1) {
+            if (stackCount == 2) {
                 getSupportActionBar().hide();
             } else {
                 getSupportActionBar().show();
             }
         }
-        TitleBarUtils.getInstance().setTitle(this, getLastFragment().getTag());
+        titleStack.pop();
+        TitleBarUtils.getInstance().setTitle(this, titleStack.peek());
     }
 
     @Override
@@ -216,6 +223,7 @@ public class LoginAct extends BaseUMActivity implements LoginController {
         transaction.show(fragment);
         transaction.addToBackStack(null);
         transaction.commitAllowingStateLoss();
+        titleStack.push(tag);
     }
 
     private Fragment getLastFragment() {

+ 136 - 6
app/src/main/java/com/sheep/gamegroup/module/login/fragments/SignUpFgt.java

@@ -1,6 +1,7 @@
 package com.sheep.gamegroup.module.login.fragments;
 
 
+import android.support.design.widget.Snackbar;
 import android.support.v4.app.Fragment;
 import android.text.TextUtils;
 import android.text.method.HideReturnsTransformationMethod;
@@ -9,6 +10,7 @@ import android.view.View;
 import android.widget.CheckBox;
 import android.widget.EditText;
 import android.widget.ImageView;
+import android.widget.TextView;
 
 import com.alibaba.fastjson.JSONObject;
 import com.sheep.gamegroup.model.entity.BaseMessage;
@@ -26,6 +28,7 @@ import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.base.BaseFragment;
 import com.sheep.jiuyan.samllsheep.utils.G;
 import com.sheep.jiuyan.samllsheep.utils.SpUtils;
+import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
 
 import butterknife.BindView;
 import butterknife.OnClick;
@@ -39,6 +42,14 @@ public class SignUpFgt extends BaseFragment {
 
     private LoginController mController;
 
+    @BindView(R.id.for_phone_container)
+    View forPhoneContainer;
+    @BindView(R.id.for_account_container)
+    View forAccountContainer;
+    @BindView(R.id.phone_number_box)
+    EditText phoneNumberBox;
+    @BindView(R.id.captcha_box)
+    EditText captchaBox;
     @BindView(R.id.user_name_box)
     EditText userNameBox;
     @BindView(R.id.password_box)
@@ -49,11 +60,17 @@ public class SignUpFgt extends BaseFragment {
     EditText passwordBox2;
     @BindView(R.id.show_hide_pwd_btn2)
     ImageView showHidePwdBtn2;
+    @BindView(R.id.register_type_toggle_icon)
+    ImageView registerToggleIcon;
+    @BindView(R.id.register_type_toggle_text)
+    TextView registerToggleText;
 
     //用户协议
     @BindView(R.id.tel_agreement_cb)
     CheckBox tel_agreement_cb;
 
+    private int registerType = LoginController.PLATFORM_PHONE;
+
     public SignUpFgt() {
         // Required empty public constructor
     }
@@ -71,7 +88,19 @@ public class SignUpFgt extends BaseFragment {
 
     @Override
     public void onViewCreated() {
-
+        if (registerType == LoginController.PLATFORM_ACCOUNT) {
+            TitleBarUtils.getInstance().setTitle(getActivity(), "账号注册");
+            forAccountContainer.setVisibility(View.VISIBLE);
+            forPhoneContainer.setVisibility(View.GONE);
+            registerToggleText.setText("手机注册");
+            registerToggleIcon.setImageResource(R.mipmap.login_phone);
+        } else {
+            TitleBarUtils.getInstance().setTitle(getActivity(), "手机注册");
+            forAccountContainer.setVisibility(View.GONE);
+            forPhoneContainer.setVisibility(View.VISIBLE);
+            registerToggleText.setText("账号注册");
+            registerToggleIcon.setImageResource(R.mipmap.login_account);
+        }
     }
 
     @OnClick(R.id.show_hide_pwd_btn)
@@ -87,6 +116,7 @@ public class SignUpFgt extends BaseFragment {
         }
         passwordBox.setSelection(passwordBox.getText().toString().length());
     }
+
     @OnClick(R.id.show_hide_pwd_btn2)
     public void doShowHidePwd2(View v) {
         showHidePwdBtn2.setSelected(!showHidePwdBtn2.isSelected());
@@ -101,10 +131,106 @@ public class SignUpFgt extends BaseFragment {
         passwordBox2.setSelection(passwordBox2.getText().toString().length());
     }
 
+    @OnClick(R.id.send_captcha_btn)
+    public void doSendCaptcha(View v) {
+        String phoneNum = phoneNumberBox.getText().toString().trim();
+        if (TextUtils.isEmpty(phoneNum)) {
+            G.shortToast("请输入手机号");
+            return;
+        }
+        if (!StringUtils.isMobile(phoneNum)) {
+            G.shortToast("手机号有误");
+            return;
+        }
+        JSONObject jsonObject = new JSONObject();
+        jsonObject.put("account", phoneNum);
+        SheepApp.getInstance().getNetComponent().getApiService().getCaptcha(jsonObject)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        Snackbar.make(v, "验证码已发送", Snackbar.LENGTH_SHORT).show();
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        Snackbar.make(v, "发生错误", Snackbar.LENGTH_SHORT).show();
+                    }
+                });
+    }
+
+    @OnClick(R.id.register_type_toggle)
+    public void doToggleLoginType(View view) {
+        registerType = registerType == LoginController.PLATFORM_ACCOUNT ? LoginController.PLATFORM_PHONE : LoginController.PLATFORM_ACCOUNT;
+        onViewCreated();
+    }
+
     @OnClick(R.id.register_btn)
     public void doRegister(View v) {
-        if(checkAgreement()) return;
-        if (!validate()) return;
+        if (registerType == LoginController.PLATFORM_ACCOUNT) {
+            registerAccount();
+        } else if (registerType == LoginController.PLATFORM_ACCOUNT) {
+            registerPhone();
+        }
+    }
+
+    private void registerPhone() {
+        if (checkAgreement()) return;
+        if (!validatePhone()) return;
+        JSONObject jsonObject = new JSONObject();
+        jsonObject.put("account", phoneNumberBox.getText().toString().trim());
+        jsonObject.put("sec_code", captchaBox.getText().toString().trim());
+        jsonObject.put("invitation_code", ChannelContent.getInstance().getChannel_name());
+        PreferenceUtils.setPrefString(SheepApp.getInstance(), UMConfigUtils.LOGIN_TYPE, UMConfigUtils.Source.SHEEP);
+        SheepApp.getInstance().getNetComponent().getApiService().loginByCaptcha(jsonObject)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        hideProgress();
+                        G.shortToast(baseMessage);
+                    }
+
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        hideProgress();
+                        if (baseMessage == null) {
+                            return;
+                        }
+                        LoginEntity loginEty = null;
+                        try {
+                            loginEty = JSONObject.parseObject(JSONObject.toJSONString(baseMessage.getData()), LoginEntity.class);
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                        if (loginEty != null) {
+                            SpUtils.saveToken(getActivity(), loginEty.getToken());
+                            DataUtil.getInstance().initUserEntity(loginEty.getUser());
+                            mController.whenLoginSuccess(LoginController.PLATFORM_PHONE, loginEty);
+                        }
+                    }
+                });
+    }
+
+    private boolean validatePhone() {
+        String etCode = captchaBox.getText().toString().trim();
+        if (TextUtils.isEmpty(etCode)) {
+            G.shortToast(getString(R.string.input_your_captcha));
+            return false;
+        }
+        if (etCode.length() != 6) {
+            G.shortToast(getString(R.string.toast_warning_phone_captcha_image_code_size));
+            return false;
+        }
+        return true;
+    }
+
+    private void registerAccount() {
+        if (checkAgreement()) return;
+        if (!validateAccount()) return;
         JSONObject jsonObject = new JSONObject();
         jsonObject.put("user_name", userNameBox.getText().toString().trim());
         jsonObject.put("password", passwordBox.getText().toString().trim());
@@ -141,7 +267,7 @@ public class SignUpFgt extends BaseFragment {
                 });
     }
 
-    private boolean validate() {
+    private boolean validateAccount() {
         String username = userNameBox.getText().toString().trim();
         String password = passwordBox.getText().toString().trim();
         String password2 = passwordBox2.getText().toString().trim();
@@ -158,7 +284,11 @@ public class SignUpFgt extends BaseFragment {
             return false;
         }
         if (!StringUtils.isUserName(username)) {
-            G.shortToast("用户名只能包含英文、数字、._-@符号,长度4-20");
+            G.shortToast("用户名只能包含英文、数字、._-@符号,且至少包含一个字母,长度4-20");
+            return false;
+        }
+        if (!StringUtils.containLetter(username)) {
+            G.shortToast("用户名至少包含一个字母");
             return false;
         }
         if (!StringUtils.isPassword(password)) {
@@ -179,7 +309,7 @@ public class SignUpFgt extends BaseFragment {
 
     //检查是否同意用户协议
     protected boolean checkAgreement() {
-        if(tel_agreement_cb.isChecked()){
+        if (tel_agreement_cb.isChecked()) {
             return false;
         }
         G.showToast("温馨提示:您必须同意用户协议才能继续体验小绵羊APP!");

+ 14 - 4
app/src/main/java/com/sheep/gamegroup/util/StringUtils.java

@@ -38,6 +38,7 @@ public class StringUtils {
     public static boolean CopyText(String text) {
         return CopyText("sheep text copy", text);
     }
+
     public static boolean CopyText(String label, String text) {
         ClipboardManager clipboardManager = (ClipboardManager) SheepApp.getInstance().getSystemService(Context.CLIPBOARD_SERVICE);
         if (clipboardManager != null && !TextUtils.isEmpty(text)) {
@@ -281,9 +282,10 @@ public class StringUtils {
         Matcher m = p.matcher(name);
         return m.matches();
     }
+
     // 校验中文姓名
     public static boolean isChineseName(String name) {
-        if(name.contains("·")){
+        if (name.contains("·")) {
             return isChinese(name.replaceAll("·", ""));
         }
         return isChinese(name);
@@ -295,6 +297,12 @@ public class StringUtils {
         return m.matches();
     }
 
+    public static boolean containLetter(String name) {
+        String regex = ".*[a-zA-Z]+.*";
+        Matcher m = Pattern.compile(regex).matcher(name);
+        return m.matches();
+    }
+
     public static boolean isPassword(String name) {
         Pattern p = Pattern.compile("^[a-zA-Z0-9_.\\-@$!*%]{6,16}$");
         Matcher m = p.matcher(name);
@@ -335,10 +343,11 @@ public class StringUtils {
         }
         return stringBuilder.toString();
     }
+
     //组装参数
-    public static String addParams(String baseUrl, Object...params) {
+    public static String addParams(String baseUrl, Object... params) {
         StringBuilder stringBuilder = new StringBuilder(baseUrl);
-        for (int i = 0; i + 1 < params.length;) {
+        for (int i = 0; i + 1 < params.length; ) {
             stringBuilder.append(i == 0 && !baseUrl.contains("?") ? "?" : "&");
             stringBuilder.append(params[i++]);
             stringBuilder.append("=");
@@ -414,6 +423,7 @@ public class StringUtils {
         Uri uri = Uri.parse(url);
         return uri.getQueryParameter(key);
     }
+
     //获取url中指定参数
     public static List<String> getPathSegments(String url) {
         Uri uri = Uri.parse(url);
@@ -450,7 +460,7 @@ public class StringUtils {
         Matcher matcher = Patterns.WEB_URL.matcher(text);
         while (matcher.find()) {
             String item = matcher.group();
-            if(item.contains("://")){
+            if (item.contains("://")) {
                 return item;
             }
         }

+ 4 - 0
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtFindChild.java

@@ -355,6 +355,8 @@ public class FgtFindChild extends BaseListFragment5<Article> {
             TextView find_item_des = (TextView) rootConvertView.findViewById(R.id.find_item_des);
             TextView find_item_download = (TextView) rootConvertView.findViewById(R.id.find_item_download);
             TagFlowLayout find_item_tags = (TagFlowLayout) rootConvertView.findViewById(R.id.find_item_tags);
+            View find_item_placement = rootConvertView.findViewById(R.id.find_item_placement);
+            ViewUtil.setVisibility(find_item_placement, item.getIs_placement() == 1);
 
             if (item.isGame()) {
                 find_item_download.setVisibility(View.VISIBLE);
@@ -394,6 +396,8 @@ public class FgtFindChild extends BaseListFragment5<Article> {
             TextView find_item_name = rootConvertView.findViewById(R.id.find_item_name);
             TextView find_item_time = rootConvertView.findViewById(R.id.find_item_time);
             ImageView find_item_iv = rootConvertView.findViewById(R.id.find_item_iv);
+            View find_item_placement = rootConvertView.findViewById(R.id.find_item_placement);
+            ViewUtil.setVisibility(find_item_placement, item.getIs_placement() == 1);
             ViewUtil.setText(find_item_name, item.getTitle());
             ViewUtil.setTextTime(find_item_time, item.getCreated_at(), "yyyy-MM-dd");
             ViewUtil.setImage(find_item_iv, item.getPictures());

+ 37 - 16
app/src/main/res/layout/find_item_game_news.xml

@@ -4,8 +4,8 @@
     android:id="@+id/find_item_container"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:orientation="vertical"
     android:layout_marginBottom="12dp"
+    android:orientation="vertical"
     android:paddingTop="16dp">
 
     <TextView
@@ -19,13 +19,14 @@
         android:text="abcab"
         android:textColor="@color/black_6_3"
         android:textSize="15sp" />
+
     <TextView
         android:id="@+id/find_item_des"
-        android:layout_marginTop="6dp"
-        android:layout_marginLeft="16dp"
-        android:layout_marginRight="16dp"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
+        android:layout_marginLeft="16dp"
+        android:layout_marginTop="6dp"
+        android:layout_marginRight="16dp"
         android:textColor="#9B9B9B"
         android:textSize="12sp" />
 
@@ -34,26 +35,46 @@
         android:layout_width="match_parent"
         android:layout_height="120dp"
         android:layout_marginLeft="16dp"
+        android:layout_marginTop="4dp"
         android:layout_marginRight="16dp"
         android:adjustViewBounds="true"
-        android:layout_marginTop="4dp"
         android:scaleType="centerCrop"
-        app:riv_corner_radius="5dp"/>
+        app:riv_corner_radius="5dp" />
 
-    <TextView
-        android:id="@+id/find_item_time"
+    <LinearLayout
+        android:layout_marginLeft="16dp"
         android:layout_marginTop="4dp"
+        android:layout_marginRight="16dp"
+        android:layout_marginBottom="8dp"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_marginLeft="16dp"
-        android:layout_marginRight="16dp"
-        android:layout_marginBottom="16dp"
-        android:text="@string/app_name"
-        android:textColor="#9B9B9B"
-        android:textSize="11sp" />
+        android:gravity="center_vertical"
+        android:orientation="horizontal">
+        <TextView
+            android:id="@+id/find_item_time"
+            android:layout_width="match_parent"
+            android:layout_weight="1"
+            android:layout_height="wrap_content"
+            android:text="@string/app_name"
+            android:textColor="#9B9B9B"
+            android:textSize="11sp" />
+
+        <TextView
+            android:id="@+id/find_item_placement"
+            android:text="置顶"
+            android:textSize="10sp"
+            android:paddingLeft="4dp"
+            android:paddingRight="4dp"
+            android:paddingTop="2dp"
+            android:paddingBottom="2dp"
+            android:textColor="@color/red_FD2D54"
+            android:background="@drawable/shape_red_stroke_rectangle_3_radius"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content" />
+    </LinearLayout>
 
     <View
-        android:background="@color/gray_F0F0F0"
         android:layout_width="match_parent"
-        android:layout_height="8dp"/>
+        android:layout_height="8dp"
+        android:background="@color/gray_F0F0F0" />
 </LinearLayout>

+ 4 - 18
app/src/main/res/layout/fragment_sign_in.xml

@@ -4,25 +4,12 @@
     android:layout_height="match_parent"
     android:padding="@dimen/content_padding_24">
 
-    <TextView
-        android:id="@+id/top_bar"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginLeft="30dp"
-        android:layout_marginRight="30dp"
-        android:layout_marginBottom="30dp"
-        android:layout_marginTop="80dp"
-        android:gravity="center_horizontal"
-        android:text="登录小绵羊"
-        android:textColor="@color/black_6_3"
-        android:textSize="@dimen/text_size_25"
-        android:textStyle="bold" />
 
     <RelativeLayout
         android:id="@+id/for_account_pwd_container"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_below="@+id/top_bar"
+        android:layout_marginTop="20dp"
         android:visibility="gone">
 
         <EditText
@@ -63,9 +50,9 @@
 
     <RelativeLayout
         android:id="@+id/for_phone_container"
+        android:layout_marginTop="20dp"
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_below="@+id/top_bar">
+        android:layout_height="wrap_content">
 
         <EditText
             android:id="@+id/phone_number_box"
@@ -118,8 +105,7 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_alignParentRight="true"
-        android:layout_below="@id/top_bar"
-        android:layout_marginTop="130dp"
+        android:layout_marginTop="145dp"
         android:text="登录遇到问题?"
         android:textColor="@color/blue_34a6e7"
         android:textSize="12sp" />

+ 96 - 1
app/src/main/res/layout/fragment_sign_up.xml

@@ -5,9 +5,11 @@
     android:padding="@dimen/content_padding_24">
 
     <LinearLayout
+        android:id="@+id/for_account_container"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_marginTop="60dp"
+        android:layout_marginTop="20dp"
+        android:visibility="gone"
         android:orientation="vertical">
 
         <EditText
@@ -68,6 +70,49 @@
         <View style="@style/login_separetor_line_style" />
     </LinearLayout>
 
+    <RelativeLayout
+        android:id="@+id/for_phone_container"
+        android:layout_marginTop="20dp"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_below="@+id/top_bar">
+
+        <EditText
+            android:id="@+id/phone_number_box"
+            style="@style/login_edit_style"
+            android:hint="请输入手机号"
+            android:inputType="phone"
+            android:maxLength="11" />
+
+        <View
+            style="@style/login_separetor_line_style"
+            android:layout_below="@+id/phone_number_box" />
+
+        <EditText
+            android:id="@+id/captcha_box"
+            style="@style/login_edit_style"
+            android:layout_below="@+id/phone_number_box"
+            android:hint="输入验证码"
+            android:inputType="phone"
+            android:maxLength="6" />
+
+        <View
+            style="@style/login_separetor_line_style"
+            android:layout_below="@+id/captcha_box" />
+
+        <com.sheep.gamegroup.view.customview.CountDownButton
+            android:id="@+id/send_captcha_btn"
+            android:layout_width="wrap_content"
+            android:layout_height="25dp"
+            android:layout_alignParentRight="true"
+            android:layout_below="@+id/phone_number_box"
+            android:layout_marginTop="28dp"
+            android:background="@drawable/round_main_r25"
+            android:text="获取验证码"
+            android:textColor="@android:color/white"
+            android:textSize="12sp" />
+    </RelativeLayout>
+
     <Button
         android:id="@+id/register_btn"
         style="@style/login_theme_round_button"
@@ -95,4 +140,54 @@
             android:textColor="@color/G"
             android:textSize="12sp"/>
     </LinearLayout>
+    <View
+        android:layout_weight="1"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"/>
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:gravity="center"
+        android:layout_marginBottom="16dp"
+        android:layout_above="@+id/thirdpart_login_container"
+        android:orientation="horizontal">
+
+        <View
+            android:background="@color/G"
+            style="@style/login_separetor_line_style"
+            android:layout_width="20dp"/>
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:gravity="center"
+            android:layout_marginLeft="10dp"
+            android:layout_marginRight="10dp"
+            android:layout_marginBottom="2dp"
+            android:textSize="13sp"
+            android:text="or"
+            android:textColor="@color/G" />
+
+        <View
+            style="@style/login_separetor_line_style"
+            android:background="@color/G"
+            android:layout_width="20dp"/>
+
+    </LinearLayout>
+
+    <LinearLayout
+        android:id="@+id/register_type_toggle"
+        style="@style/register_type_btn">
+
+        <ImageView
+            android:id="@+id/register_type_toggle_icon"
+            style="@style/login_type_icon"
+            android:src="@mipmap/login_account" />
+
+        <TextView
+            android:id="@+id/register_type_toggle_text"
+            style="@style/login_type_text"
+            android:text="账号登录" />
+    </LinearLayout>
+
 </LinearLayout>

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

@@ -78,6 +78,7 @@
                 android:paddingRight="5dp"
                 android:paddingLeft="5dp"
                 android:textColor="@color/red_FD2D54"
+                android:visibility="gone"
                 android:textSize="9sp" />
 
             <TextView

+ 7 - 0
app/src/main/res/values/styles.xml

@@ -105,4 +105,11 @@
         <item name="android:textSize">12sp</item>
         <item name="android:textColor">@color/G</item>
     </style>
+
+    <style name="register_type_btn">
+        <item name="android:layout_width">match_parent</item>
+        <item name="android:layout_height">wrap_content</item>
+        <item name="android:gravity">center</item>
+        <item name="android:orientation">vertical</item>
+    </style>
 </resources>