Commit 20108deb by 罗翻

登录逻辑修改,增加忘记密码,修改密码

parent 15877b45
Showing with 280 additions and 140 deletions
......@@ -150,7 +150,7 @@ public class SettingPresenter extends SettingContract.Presenter {
public void modifyPwd() {
Bundle bundle = new Bundle();
bundle.putString(UserConstant.PHONE, UserManager.getInstance().getUserPhone());
mView.startActivityAndFinish(ModifyPwdActivity.class, bundle);
mView.startActivity(ModifyPwdActivity.class, bundle);
}
}
......@@ -319,6 +319,9 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
@Subscribe(threadMode = ThreadMode.MAIN)
public void onDownloadEvent(DownloadBean event) {
int progress = (int) Math.round(event.getBytesReaded() / (double) event.getTotal() * 100);
if (builder==null){
return;
}
builder.setContentInfo(String.valueOf(progress) + "%").setProgress(100, progress, false);
notificationManager.notify(0, builder.build());
if (progress == 100) {
......
......@@ -25,6 +25,8 @@ public class SettingActivity extends BaseActivity<SettingPresenter, ActivitySett
@Override
public void initView() {
mBind.toolbar.setNavigationOnClickListener(v->dumpBack());
mBind.tvTitle.setText(getString(R.string.setting_center));
}
@Override
......
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
......@@ -15,19 +16,18 @@
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout style="@style/title">
<ImageView
android:id="@+id/title_back"
style="@style/title_image_back"
android:onClick="@{()->presenter.dumpBack()}" />
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_marginBottom="2dp"
android:background="?attr/colorPrimary"
app:navigationIcon="@drawable/back_btn_normal">
<TextView
style="@style/text_title"
android:text="@string/setting_center" />
</RelativeLayout>
<ImageView style="@style/card_line" />
android:id="@+id/tv_title"
style="@style/toolbar_title" />
</android.support.v7.widget.Toolbar>
<LinearLayout
android:layout_width="match_parent"
......
......@@ -63,6 +63,7 @@ public class ServerException extends Exception {
message = BaseApplication.getContext().getString(R.string.sms_code_unsend_or_expire);
break;
case "USER0021":
case "USER0012":
message = BaseApplication.getContext().getString(R.string.sms_code_error);
break;
case "USER0003":
......
......@@ -152,7 +152,7 @@ public class Constants {
public static final String HX_STATE = "hx_state";
public static final String CETIFICATION_STATE = "cetificaiton_state";//1:接单跳转0:待预约,登录页跳转
public static final String CETIFICATION_STATE = "cetificaiton_state";//1:接单跳转0:待预约,登录页,个人中心跳转
/**
......
......@@ -64,9 +64,7 @@ public class AppManager {
*/
public void finishActivity(Activity activity) {
if (activity != null) {
activityStack.remove(activity);
activity.finish();
activity = null;
}
}
......
......@@ -82,13 +82,14 @@ public class UIUtils {
/**
* convert sp to its equivalent px
*
* <p>
* 将sp转换为px
*/
public static float sp2px(Context context, float spValue) {
final float fontScale = context.getResources().getDisplayMetrics().scaledDensity;
return (spValue*fontScale+0.5f);
return (spValue * fontScale + 0.5f);
}
/**
* 判断TextView的内容宽度是否超出其可用宽度
*
......@@ -139,6 +140,14 @@ public class UIUtils {
public static void showSoftInputFromWindow(Activity activity) {
activity.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
}
public static void hideSoftInputFromWindow(Activity activity) {
InputMethodManager imm = (InputMethodManager) activity
.getSystemService(Context.INPUT_METHOD_SERVICE);
if (imm != null && activity.getCurrentFocus() != null) {
imm.hideSoftInputFromWindow(activity.getCurrentFocus().getWindowToken(), 0);
}
}
}
......@@ -29,6 +29,15 @@
<item name="android:textSize">@dimen/size_text_title</item>
</style>
<style name="toolbar_title">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_gravity">center</item>
<item name="android:textStyle">bold</item>
<item name="android:textColor">@color/cl_home_title_text_color</item>
<item name="android:textSize">@dimen/size_text_title</item>
</style>
<style name="title_image_back">
<item name="android:layout_width">@dimen/dp_40</item>
<item name="android:layout_height">@dimen/dp_40</item>
......
package com.dayu.location.base;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Handler;
import android.widget.Toast;
......@@ -135,7 +137,7 @@ public class LocationUtils {
return new File("/data/data/" + "com.autonavi.minimap").exists();
}
public static void openMap(Context mContext,String address){
public static void openMap(Context mContext, String address) {
if (isInstallPackage()) {
Intent intent = new Intent("android.intent.action.VIEW"
, android.net.Uri.parse("androidamap://poi?sourceApplication=softname&keywords=" + address));
......@@ -143,7 +145,19 @@ public class LocationUtils {
intent.addCategory("android.intent.category.DEFAULT");
mContext.startActivity(intent);
} else {
Toast.makeText(mContext,R.string.install_gd_map,Toast.LENGTH_SHORT).show();
Toast.makeText(mContext, R.string.install_gd_map, Toast.LENGTH_SHORT).show();
goToMarket(mContext, "com.autonavi.minimap");
}
}
private static void goToMarket(Context context, String packageName) {
Uri uri = Uri.parse("market://details?id=" + packageName);
Intent goToMarket = new Intent(Intent.ACTION_VIEW, uri);
try {
context.startActivity(goToMarket);
} catch (ActivityNotFoundException e) {
e.printStackTrace();
}
}
}
......@@ -7,7 +7,7 @@ import android.support.v4.app.Fragment;
import com.dayu.base.ui.adapter.FragmentBaseAdapter;
import com.dayu.base.ui.fragment.DataBindingFragment;
import com.dayu.message.R;
import com.dayu.message.databinding.FragmentMessageBinding;
import com.dayu.message.databinding.FragmentMessage1Binding;
import com.dayu.utils.TabLayoutUtils;
import com.umeng.analytics.MobclickAgent;
......@@ -22,7 +22,7 @@ import io.reactivex.functions.Function;
* on 2017/11/20.
*/
public class HomeMessageFragment extends DataBindingFragment<FragmentMessageBinding> {
public class HomeMessageFragment extends DataBindingFragment<FragmentMessage1Binding> {
private int mIndex = 0;
private String mUmTag = "serverMessage";
......@@ -35,7 +35,7 @@ public class HomeMessageFragment extends DataBindingFragment<FragmentMessageBind
@Override
public int getLayoutId() {
return R.layout.fragment_message;
return R.layout.fragment_message1;
}
......
......@@ -110,4 +110,5 @@ public class ReceivingPresenter extends ReceivingContract.Presenter {
public int getmUserId() {
return mUserId;
}
}
package com.dayu.order.ui.activity;
import android.os.Bundle;
import com.alibaba.android.arouter.launcher.ARouter;
import com.dayu.base.ui.activity.BaseActivity;
import com.dayu.baselibrary.databinding.ActivityCommomRecycleBinding;
import com.dayu.common.Constants;
import com.dayu.order.R;
import com.dayu.order.api.protocol.Order;
import com.dayu.order.databinding.FragmentOrderdoingItemBinding;
......@@ -21,7 +24,6 @@ import com.umeng.analytics.MobclickAgent;
* on 2017/8/28.
* Created by yu
*/
public class ReceivingActivity extends BaseActivity<ReceivingPresenter, ActivityCommomRecycleBinding> implements
ReceivingContract.View {
private OrderAdapter mAdapter;
......@@ -71,7 +73,9 @@ public class ReceivingActivity extends BaseActivity<ReceivingPresenter, Activity
CustomDialog customDialog = new CustomDialog(mActivity, R.style.CustomDialog, getString(R.string.engineer_identity_not_audite)
, (dialog, confirm) -> {
if (confirm) {
ARouter.getInstance().build(RouterPath.PATH_CERTIFICAITON).navigation();
Bundle bundle = new Bundle();
bundle.putInt(Constants.CETIFICATION_STATE, 1);
ARouter.getInstance().build(RouterPath.PATH_CERTIFICAITON).withBundle(Constants.BUNDLE, bundle).navigation();
}
});
customDialog.setTitle(getString(R.string.identity_not_audite))
......
......@@ -13,7 +13,7 @@ import com.dayu.base.ui.adapter.FragmentAdapter;
import com.dayu.base.ui.fragment.BaseFragment;
import com.dayu.order.R;
import com.dayu.order.api.protocol.Tab;
import com.dayu.order.databinding.FragmentOrderHomeBinding;
import com.dayu.order.databinding.FragmentOrderHome1Binding;
import com.dayu.order.presenter.homeorder.HomeOrderContract;
import com.dayu.order.presenter.homeorder.HomeOrderPresenter;
import com.dayu.provider.event.RefreshTab;
......@@ -33,7 +33,7 @@ import java.util.List;
* on 2017/11/20.
*/
public class HomeOrderFragment extends BaseFragment<HomeOrderPresenter, FragmentOrderHomeBinding>
public class HomeOrderFragment extends BaseFragment<HomeOrderPresenter, FragmentOrderHome1Binding>
implements HomeOrderContract.View {
public List<Fragment> list_fragments;
private FragmentAdapter adapter;
......@@ -52,7 +52,7 @@ public class HomeOrderFragment extends BaseFragment<HomeOrderPresenter, Fragment
@Override
public int getLayoutId() {
return R.layout.fragment_order_home;
return R.layout.fragment_order_home1;
}
@Override
......
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<variable
name="presenter"
type="com.dayu.order.presenter.homeorder.HomeOrderPresenter" />
</data>
<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/cl_white">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:elevation="0dp"
>
<android.support.v7.widget.Toolbar
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_scrollFlags="scroll|enterAlways|snap">
<TextView
style="@style/text_title"
android:layout_gravity="center"
android:text="@string/order_title" />
<TextView
android:id="@+id/tv_right_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginRight="@dimen/dp_13.3"
android:onClick="@{()->presenter.dumpToOrderRecordActivity()}"
android:text="@string/history_order"
android:textColor="#3faafc"
android:textSize="@dimen/dp_13.3" />
</android.support.v7.widget.Toolbar>
<android.support.design.widget.TabLayout
android:id="@+id/tb_home"
android:layout_width="match_parent"
android:layout_height="78dp"
app:tabIndicatorColor="@color/cl_tab_line"
app:tabMaxWidth="0dp"
app:tabMode="fixed" />
</android.support.design.widget.AppBarLayout>
<android.support.v4.view.ViewPager
android:id="@+id/vp_home"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</android.support.design.widget.CoordinatorLayout>
</layout>
\ No newline at end of file
......@@ -3,6 +3,7 @@ package com.dayu.usercenter.presenter.certification;
import android.os.Bundle;
import com.dayu.base.api.BaseApiFactory;
import com.dayu.common.Constants;
import com.dayu.usercenter.common.UserConstant;
import com.dayu.usercenter.ui.activity.FaceCertificationActivity;
......@@ -19,8 +20,14 @@ import okhttp3.RequestBody;
*/
public class CertificaitonPresenter extends CertificaitonContract.Presenter {
private int mCertState;
@Override
public void onAttached() {
Bundle bundle = mView.getBundle();
if (bundle!=null){
mCertState = bundle.getInt(Constants.CETIFICATION_STATE,0);
}
}
@Override
......@@ -30,6 +37,7 @@ public class CertificaitonPresenter extends CertificaitonContract.Presenter {
Bundle bundle = new Bundle();
bundle.putString(UserConstant.FRONT_URL, list.get(0));
bundle.putString(UserConstant.BACK_URL, list.get(1));
bundle.putInt(Constants.CETIFICATION_STATE,mCertState);
mView.startActivity(FaceCertificationActivity.class, bundle);
}));
}
......
......@@ -3,6 +3,7 @@ package com.dayu.usercenter.presenter.facecertification;
import android.os.Bundle;
import com.dayu.base.api.BaseApiFactory;
import com.dayu.common.Constants;
import com.dayu.event.UserInfo;
import com.dayu.usercenter.R;
import com.dayu.usercenter.api.UserApiFactory;
......@@ -31,6 +32,7 @@ public class FaceCertificaitonPresenter extends FaceCertificaitonContract.Presen
private String mFrontCardUrl;
private String mBackCardUrl;
private int accountId;
private int mCertState;
@Override
public void onAttached() {
......@@ -38,6 +40,7 @@ public class FaceCertificaitonPresenter extends FaceCertificaitonContract.Presen
Bundle bundle = mView.getBundle();
mFrontCardUrl = bundle.getString(UserConstant.FRONT_URL);
mBackCardUrl = bundle.getString(UserConstant.BACK_URL);
mCertState = bundle.getInt(Constants.CETIFICATION_STATE, 0);
}
@Override
......@@ -83,7 +86,8 @@ public class FaceCertificaitonPresenter extends FaceCertificaitonContract.Presen
info.setDetectStatus(1);
UserManager.getInstance().saveUser(info);
bundle.putString(UserConstant.DETECT_STATE, UIUtils.getString(R.string.certification_success));
mView.startActivity(CertificationResultActivity.class, bundle);
bundle.putInt(Constants.CETIFICATION_STATE, mCertState);
mView.startActivityAndFinish(CertificationResultActivity.class, bundle);
}
}, responeThrowable -> {
if ("DETECT_ERROR00001".equals(responeThrowable.subCode)) {
......@@ -115,7 +119,7 @@ public class FaceCertificaitonPresenter extends FaceCertificaitonContract.Presen
} else {
ToastUtils.showShortToast(R.string.certification_not_pass);
}
mView.startActivity(CertificationResultActivity.class, bundle);
mView.startActivityAndFinish(CertificationResultActivity.class, bundle);
}));
}
}
......@@ -17,7 +17,8 @@ public class AgreementActivity extends DataBindingActivity<ActivityAgreementBind
@Override
public void initView() {
mBind.titleBack.setOnClickListener(o -> finish());
mBind.tvTitle.setText(getString(R.string.title_agreement));
mBind.toolbar.setNavigationOnClickListener(o -> finish());
}
}
......@@ -6,11 +6,14 @@ import android.os.Bundle;
import com.alibaba.android.arouter.launcher.ARouter;
import com.dayu.base.ui.activity.DataBindingActivity;
import com.dayu.common.Constants;
import com.dayu.event.UserInfo;
import com.dayu.provider.event.CertificationEvent;
import com.dayu.provider.router.RouterPath;
import com.dayu.usercenter.R;
import com.dayu.usercenter.common.UserConstant;
import com.dayu.usercenter.databinding.ActivityCertificationResultBinding;
import com.dayu.utils.AppManager;
import com.dayu.utils.UserManager;
import org.greenrobot.eventbus.EventBus;
......@@ -28,8 +31,10 @@ public class CertificationResultActivity extends DataBindingActivity<ActivityCer
@Override
public void initView() {
mBind.tvTitle.setText(getString(R.string.certification_title));
Bundle bundle = getIntent().getBundleExtra(Constants.BUNDLE);
String state = bundle.getString(UserConstant.DETECT_STATE);
int certState = bundle.getInt(Constants.CETIFICATION_STATE, 0);
if (!getString(R.string.certification_success).equals(state)) {
mBind.ivIcon.setImageResource(R.drawable.icon_certification_failure);
mBind.tvResult.setText(getString(R.string.certification_fail));
......@@ -48,8 +53,16 @@ public class CertificationResultActivity extends DataBindingActivity<ActivityCer
});
} else {
mBind.tvCommite.setOnClickListener(v -> {
UserInfo info = UserManager.getInstance().getUser();
info.setDetectStatus(1);
UserManager.getInstance().saveUser(info);
EventBus.getDefault().post(new CertificationEvent(1));
if (certState == 1) {
AppManager.getInstance().finishActivity(IdentityCertificationActivity.class);
finish();
} else {
ARouter.getInstance().build(RouterPath.PATH_MAIN).navigation();
}
});
}
......
......@@ -27,6 +27,7 @@ public class ForgetPwdActivity extends BaseActivity<ForgetPwdPresenter, ForgetPw
@Override
public void initView() {
mBind.tvTitle.setText(R.string.forget_passworid);
mBind.toolbar.setNavigationOnClickListener(v -> dumpBack());
mBind.mobile.addTextChangedListener(new MyTextWatcher() {
@Override
public void afterTextChanged(Editable s) {
......@@ -46,8 +47,6 @@ public class ForgetPwdActivity extends BaseActivity<ForgetPwdPresenter, ForgetPw
isMatch(mPresenter.phoneNume.get(), s.toString());
}
});
mBind.next.setOnClickListener(v -> {
});
mBind.getCode.setEnabled(false);
mBind.next.setEnabled(false);
}
......
......@@ -37,6 +37,7 @@ public class ModifyPwdActivity extends BaseActivity<ModifyPwdPresenter, Activity
@Override
public void initView() {
mBind.tvTitle.setText(UIUtils.getString(R.string.modify_pwd));
mBind.toolbar.setNavigationOnClickListener(v->dumpBack());
mBind.oldCode.addTextChangedListener(new MyTextWatcher() {
@Override
public void afterTextChanged(Editable s) {
......
......@@ -32,6 +32,7 @@ public class NewPwdActivity extends BaseActivity<NewPwdPresenter, ActivityNewPwd
@Override
public void initView() {
mBind.tvTitle.setText(getString(R.string.set_new_pwd));
mBind.toolbar.setNavigationOnClickListener(v->dumpBack());
mBind.showPwd.setOnClickListener(v -> {
if (mPwdState == 1) {
mBind.pwd.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
......
......@@ -32,6 +32,7 @@ public class PwLoginActivity extends BaseActivity<PwLoginPresenter, ActivityPwlo
@Override
public void initView() {
mBind.toolbar.setNavigationOnClickListener(v -> startActvityAndFinish(SmsLoginActivity.class));
mBind.showPwd.setOnClickListener(v -> {
if (mPwdState == 1) {
mBind.pwd.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
......
......@@ -5,6 +5,7 @@ import android.content.Intent;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextUtils;
import android.view.View;
import com.dayu.base.ui.activity.DataBindingActivity;
import com.dayu.common.BaseApplication;
......@@ -13,7 +14,9 @@ import com.dayu.common.MyTextWatcher;
import com.dayu.usercenter.R;
import com.dayu.usercenter.common.UserConstant;
import com.dayu.usercenter.databinding.ActivitySmsLoginBinding;
import com.dayu.utils.AppUtils;
import com.dayu.utils.ToastUtils;
import com.dayu.utils.UIUtils;
import com.dayu.utils.UtilsUserAccountMatcher;
import com.umeng.analytics.MobclickAgent;
......@@ -31,6 +34,17 @@ public class SmsLoginActivity extends DataBindingActivity<ActivitySmsLoginBindin
@Override
public void initView() {
String versionCode = AppUtils.getPackageNum();
if (Constants.ENVIROMENT.equals("debug")) {
mBind.environment.setText(String.format(getString(R.string.enviroment_debug),versionCode));
mBind.environment.setVisibility(View.VISIBLE);
} else if (Constants.ENVIROMENT.equals("uat")) {
mBind.environment.setVisibility(View.VISIBLE);
mBind.environment.setText(String.format(getString(R.string.enviroment_uat),versionCode));
} else if (Constants.ENVIROMENT.equals("demons")) {
mBind.environment.setVisibility(View.VISIBLE);
mBind.environment.setText(String.format(getString(R.string.enviroment_demons),versionCode));
}
mBind.tvAgreement.setOnClickListener(v -> {
Intent intent = new Intent(mActivity, AgreementActivity.class);
startActivity(intent);
......@@ -49,6 +63,7 @@ public class SmsLoginActivity extends DataBindingActivity<ActivitySmsLoginBindin
}
});
mBind.next.setOnClickListener(v -> {
UIUtils.hideSoftInputFromWindow(mActivity);
String phone = mBind.mobile.getText().toString().trim();
if (!UtilsUserAccountMatcher.isPhoneNum(phone)) {
ToastUtils.showShortToast(R.string.alipay_phone_error);
......
......@@ -95,19 +95,21 @@ public class HomePersonFragment extends BaseFragment<HomePersonPresenter, Fragme
public void getPersonalInfoSuccess(EngineerInfo info) {
mUserName = info.getRealName();
mBind.tvName.setText(mUserName);
mBind.tvAge.setText(info.getAge() + mActivity.getString(R.string.age));
if (info.getGender() == 1) {
mBind.tvSex.setText(mActivity.getString(R.string.man));
} else if (info.getGender() == 0) {
mBind.tvSex.setText(mActivity.getString(R.string.female));
} else {
} else if (TextUtils.isEmpty(info.getIdentity())) {
mBind.tvSex.setText(mActivity.getString(R.string.unknown));
mBind.tvAge.setText(mActivity.getString(R.string.unknown));
}
if (mDetectStatus == 1 && !TextUtils.isEmpty((String) SPUtils.get("USER_IDENTITY", ""))) {
SPUtils.put("USER_IDENTITY", info.getIdentity());
if (UserManager.getInstance().getUser().getDetectStatus() == 1 && !TextUtils.isEmpty((String) SPUtils.get("USER_IDENTITY", ""))) {
mBind.ivAudited.setImageResource(R.drawable.icon_authentication);
} else {
mBind.ivAudited.setImageResource(R.drawable.icon_unauthentication);
}
mBind.tvAge.setText(info.getAge() + mActivity.getString(R.string.age));
mUserPhone = info.getMobile();
mBind.tvPhone.setText(mUserPhone);
SPUtils.put("USER_PHONE", mUserPhone);
......
......@@ -60,7 +60,6 @@
android:screenOrientation="portrait" />
<activity
android:name=".ui.activity.PwLoginActivity"
android:windowSoftInputMode="stateVisible|adjustResize"
android:screenOrientation="portrait" />
<activity
android:name=".ui.activity.CertificationResultActivity"
......
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/time_title"
style="@style/title"
>
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:navigationIcon="@drawable/back_btn_normal">
<TextView
android:id="@+id/title_text"
style="@style/text_title"
android:text="@string/title_agreement"
/>
<ImageView
android:id="@+id/title_back"
style="@style/title_image_back"
/>
<ImageView
android:layout_width="match_parent"
android:layout_height="@dimen/dp_6"
android:layout_alignParentBottom="true"
android:src="@drawable/line_shape"
/>
</RelativeLayout>
android:id="@+id/tv_title"
style="@style/toolbar_title" />
</android.support.v7.widget.Toolbar>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:background="?attr/colorPrimary"
android:layout_marginTop="2dp">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:text="@string/agreement"
/>
android:textSize="16sp"
android:text="@string/agreement" />
</ScrollView>
</LinearLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
......@@ -12,20 +13,17 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/title_back"
style="@style/title">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:navigationIcon="@drawable/back_btn_normal">
<TextView
android:id="@+id/tv_title"
style="@style/text_title" />
<ImageView
android:id="@+id/receiving_back"
style="@style/title_image_back"
android:onClick="@{()->presenter.dumpBack()}" />
</RelativeLayout>
style="@style/toolbar_title" />
</android.support.v7.widget.Toolbar>
<LinearLayout
android:layout_width="match_parent"
......
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
......@@ -14,25 +15,23 @@
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/title_back"
style="@style/title">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:navigationIcon="@drawable/back_btn_normal">
<TextView
android:id="@+id/tv_title"
style="@style/text_title" />
<ImageView
android:id="@+id/receiving_back"
style="@style/title_image_back"
android:onClick="@{()->presenter.dumpBack()}" />
</RelativeLayout>
style="@style/toolbar_title" />
</android.support.v7.widget.Toolbar>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="66dp"
android:layout_marginBottom="10dp"
android:layout_marginTop="1dp"
android:layout_marginTop="2dp"
android:background="@color/white"
android:gravity="center_vertical"
android:paddingLeft="15dp"
......
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<variable
name="presenter"
type="com.dayu.usercenter.presenter.pwlogin.PwLoginPresenter"/>
type="com.dayu.usercenter.presenter.pwlogin.PwLoginPresenter" />
</data>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/receiving_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:onClick="@{()->presenter.dumpBack()}"
android:src="@drawable/back_btn_normal" />
<ScrollView
android:id="@+id/scrollView"
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/receiving_back"
android:layout_marginLeft="25dp"
android:layout_marginRight="25dp"
android:layout_marginTop="35dp"
android:scrollbars="none">
android:layout_height="?attr/actionBarSize"
app:navigationIcon="@drawable/back_btn_normal">
</android.support.v7.widget.Toolbar>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:layout_marginRight="25dp"
android:layout_marginTop="35dp"
android:orientation="vertical">
<TextView
android:id="@+id/tv_first"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="35dp"
android:text="@string/tv_dayu"
android:textColor="@color/default_text_color"
android:textSize="28sp" />
......@@ -48,20 +43,21 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/tv_first"
android:layout_marginBottom="64dp"
android:layout_marginTop="15dp"
android:text="@string/login_tip"
android:textColor="@color/default_editext_color"
android:layout_marginBottom="64dp"
android:textSize="14sp" />
<EditText
android:id="@+id/mobile"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_notice"
android:layout_below="@id/tv_notice"
android:background="@null"
android:inputType="phone"
android:hint="@string/tv_login_phone_editext_hint"
android:inputType="phone"
android:text="@={presenter.phoneNume}"
android:textColor="@color/default_text_color"
android:textSize="16sp" />
......@@ -88,9 +84,9 @@
android:layout_marginTop="32dp"
android:layout_weight="1"
android:background="@null"
android:hint="@string/input_pwd"
android:inputType="textPassword"
android:text="@={presenter.code}"
android:hint="@string/input_pwd"
android:textColor="@color/default_text_color"
android:textSize="16sp" />
......@@ -119,8 +115,8 @@
android:alpha="0.35"
android:background="@drawable/tab_blue_react"
android:gravity="center"
android:text="@string/login"
android:onClick="@{()->presenter.login()}"
android:text="@string/login"
android:textColor="@color/white"
android:textSize="16sp" />
......@@ -135,6 +131,5 @@
android:textColor="@color/bg_button"
android:textSize="15sp" />
</RelativeLayout>
</ScrollView>
</RelativeLayout>
</layout>
\ No newline at end of file
......@@ -7,6 +7,15 @@
android:orientation="vertical">
<TextView
android:id="@+id/environment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:textColor="@color/text_color"
android:visibility="gone" />
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......@@ -36,9 +45,9 @@
android:layout_toRightOf="@id/tv_86"
android:background="@null"
android:hint="@string/tv_login_phone_editext_hint"
android:textColor="@color/default_text_color"
android:maxEms="11"
android:inputType="phone"
android:maxEms="11"
android:textColor="@color/default_text_color"
android:textSize="17sp" />
<View
......
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<data>
<variable
name="presenter"
type="com.dayu.usercenter.presenter.forgetpwd.ForgetPwdPresenter"/>
</data>
type="com.dayu.usercenter.presenter.forgetpwd.ForgetPwdPresenter" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/title_back"
style="@style/title">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:navigationIcon="@drawable/back_btn_normal">
<TextView
android:id="@+id/tv_title"
style="@style/text_title" />
<ImageView
android:id="@+id/receiving_back"
style="@style/title_image_back"
android:onClick="@{()->presenter.dumpBack()}"
/>
</RelativeLayout>
style="@style/toolbar_title" />
</android.support.v7.widget.Toolbar>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:paddingLeft="15dp"
android:layout_marginTop="8dp"
android:paddingRight="15dp"
android:background="@color/white"
android:gravity="center_vertical">
android:gravity="center_vertical"
android:paddingLeft="15dp"
android:paddingRight="15dp">
<TextView
android:layout_width="wrap_content"
......@@ -48,9 +48,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@null"
android:hint="@string/tv_login_phone_editext_hint"
android:inputType="phone"
android:background="@null"
android:text="@={presenter.phoneNume}"
android:textColor="@color/default_text_color"
android:textSize="15sp" />
......@@ -65,10 +65,10 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:paddingLeft="15dp"
android:paddingRight="15dp"
android:background="@color/white"
android:gravity="center_vertical">
android:gravity="center_vertical"
android:paddingLeft="15dp"
android:paddingRight="15dp">
<TextView
android:layout_width="wrap_content"
......@@ -84,9 +84,9 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:background="@null"
android:hint="@string/input_sms_code"
android:inputType="number"
android:background="@null"
android:text="@={presenter.code}"
android:textColor="@color/default_text_color"
android:textSize="15sp" />
......@@ -101,9 +101,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="@string/tv_login_register_button_text"
android:alpha="0.35"
android:onClick="@{()->presenter.sendCode()}"
android:text="@string/tv_login_register_button_text"
android:textColor="@color/bg_button" />
</LinearLayout>
......@@ -117,8 +117,8 @@
android:alpha="0.35"
android:background="@drawable/tab_blue_react"
android:gravity="center"
android:text="@string/next_step"
android:onClick="@{()->presenter.next()}"
android:text="@string/next_step"
android:textColor="@color/white"
android:textSize="16sp" />
</LinearLayout>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment