短信验证功能添加

This commit is contained in:
Long-PC\Long 2018-03-13 17:24:22 +08:00
parent 45531e5e4e
commit bba6d24298
3 changed files with 841 additions and 710 deletions

View File

@ -1,7 +1,9 @@
package com.ifish.activity; package com.ifish.activity;
import android.app.Activity;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.os.CountDownTimer;
import android.os.Handler; import android.os.Handler;
import android.os.Message; import android.os.Message;
import android.text.TextUtils; import android.text.TextUtils;
@ -63,21 +65,20 @@ import cn.smssdk.SMSSDK;
import de.greenrobot.event.EventBus; import de.greenrobot.event.EventBus;
/** /**
* * @author Jacky dada
* @ClassName: RegisteredActivity * @ClassName: RegisteredActivity
* @Description: 注册界面 * @Description: 注册界面
* @author Jacky dada
* @date 2015-9-2 下午6:45:16 * @date 2015-9-2 下午6:45:16
*/ */
public class RegisteredActivity extends BaseActivityNotAnim { public class RegisteredActivity extends BaseActivityNotAnim {
long waitTime = 2000;//2秒退出时间 long waitTime = 2000;//2秒退出时间
long touchTime = 0; long touchTime = 0;
private ImageView title_img; private ImageView title_img;
private TextView title_text,title_text_right,tv_country; private TextView title_text, title_text_right, tv_country, tv_changesmscode;
private CheckBox ct_check; private CheckBox ct_check;
private Toast toast; private Toast toast;
private EditText et_phone, et_messge, et_psw; private EditText et_phone, et_messge, et_psw;
private TextView tv_code; private TextView tv_code, tv_msgcode;
private HttpManager hm = HttpManager.getInstance(); private HttpManager hm = HttpManager.getInstance();
private int CURRENTDELAYTIME; private int CURRENTDELAYTIME;
private final int DELAYTIME = 60;//60S倒数 private final int DELAYTIME = 60;//60S倒数
@ -94,6 +95,11 @@ public class RegisteredActivity extends BaseActivityNotAnim{
EventHandler eh = null; EventHandler eh = null;
private final String UnknownHostException = "UnknownHostException"; private final String UnknownHostException = "UnknownHostException";
private CountryCode countryCode; private CountryCode countryCode;
private TimeCount time;
private String smsCode;
private Activity act;
private boolean isShowSmsCode = false;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
@ -104,6 +110,7 @@ public class RegisteredActivity extends BaseActivityNotAnim{
initListener(); initListener();
initLocation();//百度定位 initLocation();//百度定位
} }
private void test() { private void test() {
findViewById(R.id.iv_test).setOnClickListener(new View.OnClickListener() { findViewById(R.id.iv_test).setOnClickListener(new View.OnClickListener() {
@Override @Override
@ -114,6 +121,7 @@ public class RegisteredActivity extends BaseActivityNotAnim{
}); });
} }
private void initLocation() { private void initLocation() {
LocationClientOption option = new LocationClientOption(); LocationClientOption option = new LocationClientOption();
option.setLocationMode(LocationMode.Hight_Accuracy);//可选默认高精度设置定位模式高精度低功耗仅设备 option.setLocationMode(LocationMode.Hight_Accuracy);//可选默认高精度设置定位模式高精度低功耗仅设备
@ -125,14 +133,20 @@ public class RegisteredActivity extends BaseActivityNotAnim{
option.setIgnoreKillProcess(false);//可选默认true定位SDK内部是一个SERVICE并放到了独立进程设置是否在stop的时候杀死这个进程默认不杀死 option.setIgnoreKillProcess(false);//可选默认true定位SDK内部是一个SERVICE并放到了独立进程设置是否在stop的时候杀死这个进程默认不杀死
mLocationClient.setLocOption(option); mLocationClient.setLocOption(option);
} }
private void initView() { private void initView() {
act = this;
ct_check = (CheckBox) findViewById(R.id.ct_check); ct_check = (CheckBox) findViewById(R.id.ct_check);
tv_code = (TextView) findViewById(R.id.tv_code); tv_code = (TextView) findViewById(R.id.tv_code);
tv_msgcode = (TextView) findViewById(R.id.tv_msgcode);
et_phone = (EditText) findViewById(R.id.et_phone); et_phone = (EditText) findViewById(R.id.et_phone);
et_messge = (EditText) findViewById(R.id.et_messge); et_messge = (EditText) findViewById(R.id.et_messge);
et_psw = (EditText) findViewById(R.id.et_psw); et_psw = (EditText) findViewById(R.id.et_psw);
tv_changesmscode = (TextView) findViewById(R.id.tv_changesmscode);
tv_country = findMyViewById(R.id.tv_country); tv_country = findMyViewById(R.id.tv_country);
time = new TimeCount(60000, 1000);
} }
private void initTitle(String title, String right) { private void initTitle(String title, String right) {
title_img = (ImageView) findViewById(R.id.title_img); title_img = (ImageView) findViewById(R.id.title_img);
title_img.setVisibility(View.GONE); title_img.setVisibility(View.GONE);
@ -142,6 +156,7 @@ public class RegisteredActivity extends BaseActivityNotAnim{
title_text_right.setText(right); title_text_right.setText(right);
title_text_right.setOnClickListener(this); title_text_right.setOnClickListener(this);
} }
public void init() { public void init() {
cp = ConfigUtil.getInstance(RegisteredActivity.this); cp = ConfigUtil.getInstance(RegisteredActivity.this);
toast = Toast.makeText(this, "", Toast.LENGTH_SHORT); toast = Toast.makeText(this, "", Toast.LENGTH_SHORT);
@ -159,9 +174,9 @@ public class RegisteredActivity extends BaseActivityNotAnim{
}; };
SMSSDK.registerEventHandler(eh); SMSSDK.registerEventHandler(eh);
EventBus.getDefault().register(this); EventBus.getDefault().register(this);
showSmsCode();
} }
Handler mHandler = new Handler() { Handler mHandler = new Handler() {
public void handleMessage(Message msg) { public void handleMessage(Message msg) {
super.handleMessage(msg); super.handleMessage(msg);
@ -240,28 +255,26 @@ public class RegisteredActivity extends BaseActivityNotAnim{
}; };
@Override @Override
protected void onStop() { protected void onStop() {
mLocationClient.stop(); mLocationClient.stop();
super.onStop(); super.onStop();
} }
public void initListener() { public void initListener() {
findViewById(R.id.tv_code).setOnClickListener(this); findViewById(R.id.tv_code).setOnClickListener(this);
findViewById(R.id.tv_msgcode).setOnClickListener(this);
findViewById(R.id.bt_submit).setOnClickListener(this); findViewById(R.id.bt_submit).setOnClickListener(this);
findViewById(R.id.tv_check).setOnClickListener(this); findViewById(R.id.tv_check).setOnClickListener(this);
findViewById(R.id.rl_bg).setOnClickListener(this); findViewById(R.id.rl_bg).setOnClickListener(this);
findViewById(R.id.rl_country).setOnClickListener(this); findViewById(R.id.rl_country).setOnClickListener(this);
tv_changesmscode.setOnClickListener(this);
} }
/** /**
* * @param
* @Description: 60S短信倒数 * @Description: 60S短信倒数
* @author Jacky dada * @author Jacky dada
* @param
* @date 2015-9-6 下午8:15:45 * @date 2015-9-6 下午8:15:45
*/ */
private void startTime() { private void startTime() {
@ -275,6 +288,7 @@ public class RegisteredActivity extends BaseActivityNotAnim{
}; };
timer.schedule(task, 0, 1000); timer.schedule(task, 0, 1000);
} }
Handler UIHandler = new Handler() { Handler UIHandler = new Handler() {
public void handleMessage(android.os.Message msg) { public void handleMessage(android.os.Message msg) {
switch (msg.what) { switch (msg.what) {
@ -295,7 +309,9 @@ public class RegisteredActivity extends BaseActivityNotAnim{
default: default:
break; break;
} }
}; }
;
}; };
Handler loginHandler = new Handler() { Handler loginHandler = new Handler() {
public void handleMessage(android.os.Message msg) { public void handleMessage(android.os.Message msg) {
@ -317,6 +333,7 @@ public class RegisteredActivity extends BaseActivityNotAnim{
} }
} }
}; };
private void saveInfo() { private void saveInfo() {
//登录成功保存个人信息 //登录成功保存个人信息
Commons.USER = loginUser; Commons.USER = loginUser;
@ -335,6 +352,7 @@ public class RegisteredActivity extends BaseActivityNotAnim{
sp.putString(LoginSPKey.P2PVerifyCode2, loginUser.P2PVerifyCode2); sp.putString(LoginSPKey.P2PVerifyCode2, loginUser.P2PVerifyCode2);
sp.putString(LoginSPKey.GeeWeUserId, loginUser.gwellUserID); sp.putString(LoginSPKey.GeeWeUserId, loginUser.gwellUserID);
} }
Handler regeditHandler = new Handler() { Handler regeditHandler = new Handler() {
public void handleMessage(android.os.Message msg) { public void handleMessage(android.os.Message msg) {
/** /**
@ -372,6 +390,7 @@ public class RegisteredActivity extends BaseActivityNotAnim{
} }
} }
}; };
@Override @Override
protected void onDestroy() { protected void onDestroy() {
SMSSDK.unregisterEventHandler(eh); SMSSDK.unregisterEventHandler(eh);
@ -384,6 +403,7 @@ public class RegisteredActivity extends BaseActivityNotAnim{
EventBus.getDefault().unregister(this); EventBus.getDefault().unregister(this);
super.onDestroy(); super.onDestroy();
} }
@Override @Override
public void onBackPressed() { public void onBackPressed() {
long currentTime = System.currentTimeMillis(); long currentTime = System.currentTimeMillis();
@ -394,6 +414,7 @@ public class RegisteredActivity extends BaseActivityNotAnim{
ActivityManager.getInstance().exit(); ActivityManager.getInstance().exit();
} }
} }
@Override @Override
public void onClick(View v) { public void onClick(View v) {
// 点击事件 // 点击事件
@ -433,11 +454,24 @@ public class RegisteredActivity extends BaseActivityNotAnim{
return; return;
} }
hideKeyboard(); hideKeyboard();
if (isShowSmsCode) {
if (smsCode == null) {
ToastUtil.show(getApplicationContext(), "请先获取短信码");
return;
}
if (et_messge.getText().toString().equals(smsCode)) {
showProgressDialog();
doRegistered();
} else {
ToastUtil.show(getApplicationContext(), "请输入正确的短信验证码");
}
} else {
showProgressDialog(); showProgressDialog();
if (countryCode == null) { if (countryCode == null) {
countryCode = new CountryCode("86", "中国"); countryCode = new CountryCode("86", "中国");
} }
SMSSDK.submitVerificationCode(countryCode.countryCode, et_phone.getText().toString(), et_messge.getText().toString()); SMSSDK.submitVerificationCode(countryCode.countryCode, et_phone.getText().toString(), et_messge.getText().toString());
}
break; break;
} }
case R.id.tv_code: {//注册验证码 case R.id.tv_code: {//注册验证码
@ -458,20 +492,60 @@ public class RegisteredActivity extends BaseActivityNotAnim{
startTime(); startTime();
break; break;
} }
case R.id.tv_msgcode: {
hm.getSecurityCode(new HttpListener<BaseBean<String>>() {
@Override
public void success(BaseBean<String> baseBean) {
if (baseBean.result == 201) {
act.runOnUiThread(new Runnable() {
@Override
public void run() {
ToastUtil.show(getApplicationContext(), "手机号已被注册 请直接登录");
}
});
} else if (baseBean.result == 100) {
smsCode = baseBean.data;
time.start();
} else {
act.runOnUiThread(new Runnable() {
@Override
public void run() {
ToastUtil.show(getApplicationContext(), "发送短信失败 请重新获取");
}
});
}
}
@Override
public void error(Exception e, String msg) {
}
@Override
public void finish() {
}
}, et_phone.getText().toString());
break;
}
case R.id.rl_country: {//国家代码 case R.id.rl_country: {//国家代码
startActivity(CountryListActivity.class); startActivity(CountryListActivity.class);
AnimationUtil.startAnimation(RegisteredActivity.this); AnimationUtil.startAnimation(RegisteredActivity.this);
break; break;
} }
case R.id.tv_changesmscode: {
isShowSmsCode = !isShowSmsCode;
showSmsCode();
break;
}
default: default:
break; break;
} }
} }
/** /**
* 国家/地区发生改变 * 国家/地区发生改变
*
* @param event * @param event
*/ */
public void onEventMainThread(CountryCode event) { public void onEventMainThread(CountryCode event) {
@ -480,11 +554,11 @@ public class RegisteredActivity extends BaseActivityNotAnim{
} }
countryCode = event; countryCode = event;
} }
/** /**
* * @param
* @Description: 注册成功就接着发登录的请求 * @Description: 注册成功就接着发登录的请求
* @author Jacky dada * @author Jacky dada
* @param
* @date 2015-9-6 下午7:20:42 * @date 2015-9-6 下午7:20:42
*/ */
private void doRegistered() { private void doRegistered() {
@ -505,11 +579,11 @@ public class RegisteredActivity extends BaseActivityNotAnim{
} }
}, et_phone.getText().toString(), et_psw.getText().toString()); }, et_phone.getText().toString(), et_psw.getText().toString());
} }
/** /**
* * @param
* @Description: 登录 * @Description: 登录
* @author Jacky dada * @author Jacky dada
* @param
* @date 2015-9-8 下午2:33:05 * @date 2015-9-8 下午2:33:05
*/ */
private void userLogin() { private void userLogin() {
@ -606,5 +680,40 @@ public class RegisteredActivity extends BaseActivityNotAnim{
} }
}, et_phone.getText().toString(), MD5Util.GetMD5(et_psw.getText().toString())); }, et_phone.getText().toString(), MD5Util.GetMD5(et_psw.getText().toString()));
} }
class TimeCount extends CountDownTimer {
public TimeCount(long millisInFuture, long countDownInterval) {
super(millisInFuture, countDownInterval);
}
@Override
public void onTick(long millisUntilFinished) {
tv_msgcode.setClickable(false);
tv_msgcode.setText(millisUntilFinished / 1000 + "\"");
tv_msgcode.setBackgroundDrawable(tv_msgcode
.isClickable() ? getResources().getDrawable(ebleColor) : getResources().getDrawable(disableColor));
}
@Override
public void onFinish() {
tv_msgcode.setText("短信验证码");
tv_msgcode.setClickable(true);
tv_msgcode.setBackgroundDrawable(tv_msgcode
.isClickable() ? getResources().getDrawable(ebleColor) : getResources().getDrawable(disableColor));
}
}
private void showSmsCode() {
if (isShowSmsCode) {
tv_code.setVisibility(View.GONE);
tv_msgcode.setVisibility(View.VISIBLE);
tv_changesmscode.setText("语音验证码");
} else {
tv_code.setVisibility(View.VISIBLE);
tv_msgcode.setVisibility(View.GONE);
tv_changesmscode.setText("短信验证码");
}
}
} }

View File

@ -1,219 +1,240 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/rl_bg" android:id="@+id/rl_bg"
android:focusable="true"
android:focusableInTouchMode="true"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
> android:focusable="true"
android:focusableInTouchMode="true">
<include <include
android:id="@+id/in_daohang" android:id="@+id/in_daohang"
layout="@layout/title_layout_haveimg" /> layout="@layout/title_layout_haveimg" />
<ImageView <ImageView
android:layout_below="@+id/in_daohang"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:src="@drawable/login_background" android:layout_below="@+id/in_daohang"
android:scaleType="fitXY" android:scaleType="fitXY"
/> android:src="@drawable/login_background" />
<LinearLayout <LinearLayout
android:layout_marginTop="@dimen/login_padding_bottom"
android:layout_marginLeft="@dimen/login_padding_left"
android:layout_marginRight="15dp"
android:orientation="vertical"
android:layout_below="@id/in_daohang"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/in_daohang"
android:layout_marginLeft="@dimen/login_padding_left"
android:layout_marginRight="15dp"
android:layout_marginTop="@dimen/login_padding_bottom"
android:background="@color/F7F7F7" android:background="@color/F7F7F7"
android:gravity="center_horizontal" android:gravity="center_horizontal"
> android:orientation="vertical">
<RelativeLayout <RelativeLayout
android:id="@+id/rl_country" android:id="@+id/rl_country"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="45dp" android:layout_height="45dp"
android:background="@drawable/login_edtext_shape_f2"
android:layout_marginTop="30dp"
android:layout_marginLeft="@dimen/new_login_bg_width" android:layout_marginLeft="@dimen/new_login_bg_width"
android:layout_marginRight="@dimen/new_login_bg_width" android:layout_marginRight="@dimen/new_login_bg_width"
> android:layout_marginTop="30dp"
android:background="@drawable/login_edtext_shape_f2">
<TextView <TextView
android:id="@+id/tv_tv" android:id="@+id/tv_tv"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="11dp"
android:text="国家/地区" android:text="国家/地区"
android:textColor="@color/galy_my" android:textColor="@color/galy_my"
android:layout_centerVertical="true" android:textSize="18sp" />
android:textSize="18sp"
android:layout_marginLeft="11dp"
/>
<TextView <TextView
android:id="@+id/tv_country" android:id="@+id/tv_country"
android:layout_toRightOf="@+id/tv_tv"
android:gravity="right"
android:ellipsize="start"
android:layout_alignParentRight="true"
android:layout_marginRight="11dp"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginLeft="11dp"
android:layout_marginRight="11dp"
android:layout_toRightOf="@+id/tv_tv"
android:ellipsize="start"
android:gravity="right"
android:singleLine="true"
android:text="中国 +86" android:text="中国 +86"
android:textColor="@color/text_black_my" android:textColor="@color/text_black_my"
android:layout_centerVertical="true" android:textSize="18sp" />
android:textSize="18sp"
android:singleLine="true"
android:layout_marginLeft="11dp"
/>
</RelativeLayout> </RelativeLayout>
<com.ifish.view.ClearEditText <com.ifish.view.ClearEditText
android:paddingRight="10dp"
android:id="@+id/et_phone" android:id="@+id/et_phone"
android:layout_below="@id/in_daohang"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="45dp" android:layout_height="45dp"
android:layout_below="@id/in_daohang"
android:layout_marginLeft="@dimen/new_login_bg_width"
android:layout_marginRight="@dimen/new_login_bg_width"
android:layout_marginTop="@dimen/login_bg_width"
android:background="@drawable/login_edtext_shape_f2"
android:hint="请输入手机号"
android:inputType="number" android:inputType="number"
android:maxLength="11" android:maxLength="11"
android:layout_marginTop="@dimen/login_bg_width"
android:layout_marginLeft="@dimen/new_login_bg_width"
android:layout_marginRight="@dimen/new_login_bg_width"
android:background="@drawable/login_edtext_shape_f2"
android:textColor="@color/text_black_my"
android:textColorHint="@color/galy_my"
android:paddingLeft="10dp" android:paddingLeft="10dp"
android:hint="请输入手机号" android:paddingRight="10dp"
android:singleLine="true" android:singleLine="true"
/> android:textColor="@color/text_black_my"
<RelativeLayout android:textColorHint="@color/galy_my" />
<LinearLayout
android:id="@+id/rl_a1" android:id="@+id/rl_a1"
android:layout_below="@id/et_phone"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="45dp" android:layout_height="45dp"
android:layout_marginTop="@dimen/login_bg_width" android:layout_below="@id/et_phone"
android:layout_marginLeft="@dimen/new_login_bg_width" android:layout_marginLeft="@dimen/new_login_bg_width"
android:layout_marginRight="@dimen/new_login_bg_width" android:layout_marginRight="@dimen/new_login_bg_width"
> android:layout_marginTop="@dimen/login_bg_width"
<TextView android:orientation="horizontal">
android:id="@+id/tv_code"
android:layout_width="80dp"
android:layout_height="fill_parent"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:padding="10dp"
android:gravity="center"
android:text="@string/voice_code"
android:textColor="@color/white"
android:textSize="12sp"
android:background="@drawable/login_button_noright_select"
/>
<EditText <EditText
android:id="@+id/et_messge" android:id="@+id/et_messge"
android:layout_toLeftOf="@id/tv_code" android:layout_width="0dp"
android:maxLength="4"
android:inputType="number"
android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:textColor="@color/text_black_my" android:layout_weight="1"
android:textColorHint="@color/galy_my"
android:paddingLeft="10dp"
android:background="@drawable/login_edtext_noright_shape_f2" android:background="@drawable/login_edtext_noright_shape_f2"
android:hint="请输入验证码" android:hint="请输入验证码"
android:inputType="number"
android:maxLength="4"
android:paddingLeft="10dp"
android:singleLine="true" android:singleLine="true"
/> android:textColor="@color/text_black_my"
android:textColorHint="@color/galy_my" />
<TextView
android:id="@+id/tv_code"
android:layout_width="90dp"
android:layout_height="fill_parent"
android:background="@drawable/login_button_noright_select"
android:gravity="center"
android:maxLines="1"
android:padding="10dp"
android:text="@string/voice_code"
android:textColor="@color/white"
android:textSize="12sp" />
<TextView
android:id="@+id/tv_msgcode"
android:layout_width="90dp"
android:layout_height="fill_parent"
android:background="@drawable/login_button_noright_select"
android:gravity="center"
android:maxLines="1"
android:padding="10dp"
android:text="@string/sms_code"
android:textColor="@color/white"
android:textSize="12sp"
android:visibility="gone" />
</LinearLayout>
</RelativeLayout>
<com.ifish.view.ClearEditText <com.ifish.view.ClearEditText
android:paddingRight="10dp"
android:id="@+id/et_psw" android:id="@+id/et_psw"
android:layout_below="@id/rl_a1"
android:layout_marginTop="@dimen/login_bg_width"
android:layout_marginLeft="@dimen/new_login_bg_width"
android:layout_marginRight="@dimen/new_login_bg_width"
android:background="@drawable/login_edtext_shape_f2"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="45dp" android:layout_height="45dp"
android:layout_below="@id/rl_a1"
android:layout_marginLeft="@dimen/new_login_bg_width"
android:layout_marginRight="@dimen/new_login_bg_width"
android:layout_marginTop="@dimen/login_bg_width"
android:background="@drawable/login_edtext_shape_f2"
android:hint="请设置您的密码"
android:inputType="textPassword" android:inputType="textPassword"
android:maxLength="16" android:maxLength="16"
android:textColor="@color/text_black_my"
android:textColorHint="@color/galy_my"
android:paddingLeft="10dp" android:paddingLeft="10dp"
android:hint="请设置您的密码" android:paddingRight="10dp"
android:singleLine="true" android:singleLine="true"
/> android:textColor="@color/text_black_my"
android:textColorHint="@color/galy_my" />
<Button <Button
android:id="@+id/bt_submit" android:id="@+id/bt_submit"
android:layout_below="@id/et_psw"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="45dp" android:layout_height="45dp"
android:textColor="@color/white" android:layout_below="@id/et_psw"
android:layout_marginTop="30dp"
android:layout_marginLeft="@dimen/new_login_bg_width" android:layout_marginLeft="@dimen/new_login_bg_width"
android:layout_marginRight="@dimen/new_login_bg_width" android:layout_marginRight="@dimen/new_login_bg_width"
android:layout_marginTop="30dp"
android:background="@drawable/login_button_select" android:background="@drawable/login_button_select"
android:text="注册" /> android:text="注册"
android:textColor="@color/white" />
<RelativeLayout <RelativeLayout
android:layout_below="@id/bt_submit"
android:layout_marginTop="12dp"
android:layout_marginBottom="30dp"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/bt_submit"
android:layout_marginBottom="30dp"
android:layout_marginLeft="@dimen/new_login_bg_width" android:layout_marginLeft="@dimen/new_login_bg_width"
android:layout_marginRight="@dimen/new_login_bg_width" android:layout_marginRight="@dimen/new_login_bg_width"
> android:layout_marginTop="12dp">
<CheckBox <CheckBox
android:id="@+id/ct_check" android:id="@+id/ct_check"
android:checked="true" style="@style/CustomCheckboxTheme"
android:layout_centerVertical="true"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
style="@style/CustomCheckboxTheme" android:layout_centerVertical="true"
/> android:checked="true" />
<TextView <TextView
android:id="@+id/tv_check" android:id="@+id/tv_check"
android:layout_toRightOf="@id/ct_check"
android:layout_marginLeft="5dp"
android:layout_centerVertical="true"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="5dp"
android:layout_toRightOf="@id/ct_check"
android:text="我已同意爱鱼奇使用协议" android:text="我已同意爱鱼奇使用协议"
android:textColor="@color/main_tab_grey" android:textColor="@color/main_tab_grey"
android:textSize="13dp" android:textSize="13dp" />
/>
<TextView
android:id="@+id/tv_changesmscode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:text="短信验证码"
android:textColor="@color/black"
android:textSize="13dp" />
</RelativeLayout> </RelativeLayout>
</LinearLayout> </LinearLayout>
<TextView <TextView
android:id="@+id/tv_website" android:id="@+id/tv_website"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:textColor="@color/main_tab_grey"
android:text="@string/app_website"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_marginBottom="@dimen/login_padding_bottom" android:layout_marginBottom="@dimen/login_padding_bottom"
android:textSize="14sp" android:text="@string/app_website"
android:layout_width="wrap_content" android:textColor="@color/main_tab_grey"
android:layout_height="wrap_content" android:textSize="14sp" />
/>
<TextView <TextView
android:id="@+id/tv_appname" android:id="@+id/tv_appname"
android:layout_above="@+id/tv_website"
android:textColor="@color/shoplist_text_galy"
android:text="@string/app_name"
android:layout_centerHorizontal="true"
android:layout_marginBottom="5dp"
android:textSize="24sp"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
/> android:layout_above="@+id/tv_website"
android:layout_centerHorizontal="true"
android:layout_marginBottom="5dp"
android:text="@string/app_name"
android:textColor="@color/shoplist_text_galy"
android:textSize="24sp" />
<ImageView <ImageView
android:id="@+id/iv_test" android:id="@+id/iv_test"
android:layout_above="@+id/tv_appname"
android:layout_marginBottom="8dp"
android:layout_centerHorizontal="true"
android:layout_width="46dp" android:layout_width="46dp"
android:layout_height="46dp" android:layout_height="46dp"
android:src="@drawable/app_icon_alpha" android:layout_above="@+id/tv_appname"
android:layout_centerHorizontal="true"
android:layout_marginBottom="8dp"
android:scaleType="fitXY" android:scaleType="fitXY"
/> android:src="@drawable/app_icon_alpha" />
</RelativeLayout> </RelativeLayout>

View File

@ -15,6 +15,7 @@
<string name="listview_nonetwork">ヾ(≧O≦)〃\n啊哦 好像没有网络了\n下拉刷新试试吧</string> <string name="listview_nonetwork">ヾ(≧O≦)〃\n啊哦 好像没有网络了\n下拉刷新试试吧</string>
<string name="app_website">www.iFish7.com</string> <string name="app_website">www.iFish7.com</string>
<string name="voice_code">语音验证码</string> <string name="voice_code">语音验证码</string>
<string name="sms_code">短信验证码</string>
<string name="iconName">按钮名称</string> <string name="iconName">按钮名称</string>