作者 liming

修改Ui

不能预览此文件类型
... ... @@ -5,7 +5,7 @@
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
<option name="myNullables">
<value>
<list size="7">
<list size="10">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
<item index="2" class="java.lang.String" itemvalue="javax.annotation.CheckForNull" />
... ... @@ -13,25 +13,29 @@
<item index="4" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
<item index="5" class="java.lang.String" itemvalue="androidx.annotation.Nullable" />
<item index="6" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNullable" />
<item index="7" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.Nullable" />
<item index="8" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableDecl" />
<item index="9" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableType" />
</list>
</value>
</option>
<option name="myNotNulls">
<value>
<list size="6">
<list size="9">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
<item index="4" class="java.lang.String" itemvalue="androidx.annotation.NonNull" />
<item index="5" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNonNull" />
<item index="6" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.NonNull" />
<item index="7" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullDecl" />
<item index="8" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullType" />
</list>
</value>
</option>
</component>
=======
>>>>>>> liming
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
... ...
... ... @@ -95,5 +95,18 @@ dependencies {
implementation files('libs/AMap3DMap_7.1.0_AMapSearch_7.1.0_AMapLocation_4.7.2_20191030.jar')
implementation 'com.youth.banner:banner:1.4.10'
// 微信
implementation 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:+'
implementation 'com.zhy:okhttputils:2.4.1'
//ijkplayer
implementation 'com.dou361.ijkplayer:jjdxm-ijkplayer:1.0.5'
implementation 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8'
implementation 'tv.danmaku.ijk.media:ijkplayer-armv7a:0.8.8'
implementation 'tv.danmaku.ijk.media:ijkplayer-armv5:0.8.8'
implementation 'tv.danmaku.ijk.media:ijkplayer-arm64:0.8.8'
implementation 'tv.danmaku.ijk.media:ijkplayer-x86:0.8.8'
implementation 'tv.danmaku.ijk.media:ijkplayer-x86_64:0.8.8'
implementation 'tv.danmaku.ijk.media:ijkplayer-exo:0.8.8'
}
... ...
... ... @@ -48,6 +48,22 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>-->
</activity>
<!-- 绑定微信 -->
<activity
android:name=".activity.login.BdsjActivity"
android:screenOrientation="portrait" />
<!-- 机构登录 -->
<activity
android:name=".activity.login.JgdlActivity"
android:screenOrientation="portrait" />
<!-- 忘记密码 -->
<activity
android:name=".activity.login.ForgetPasActivity"
android:screenOrientation="portrait" />
<activity
android:name=".activity.personal.InfromationActivity"
android:screenOrientation="portrait" />
... ... @@ -124,6 +140,12 @@
android:name=".activity.pratice.AnswerWrongActivity"
android:screenOrientation="portrait" />
<!-- 微信 -->
<activity
android:name=".wxapi.WXEntryActivity"
android:label="WXEntryActivity"
android:exported="true" />
</application>
</manifest>
\ No newline at end of file
... ...
... ... @@ -3,6 +3,8 @@ package com.hh.xuetubao;
import android.app.Application;
import android.content.Context;
import com.hh.xuetubao.wxapi.WxLogin;
public class MyApplication extends Application {
public static MyApplication sMyApplication;
... ... @@ -12,6 +14,9 @@ public class MyApplication extends Application {
public void onCreate() {
super.onCreate();
sMyApplication = this;
WxLogin.initWx(this); // wx
}
public static MyApplication getMyApplication() {
... ...
... ... @@ -150,8 +150,6 @@ public interface MyServer {
Observable<UserBean> mobileLogin(@Query("mobileNumber") String mobileNumber, @Query("verCode") String verCode);
/**
<<<<<<< HEAD
=======
* 微信绑定手机
*
* @param OpenId
... ... @@ -165,7 +163,6 @@ public interface MyServer {
/**
>>>>>>> liming
* 微信登录接口
*
* @param wxOpenId 微信用户的OpenId
... ... @@ -195,6 +192,11 @@ public interface MyServer {
@GET("AccountLogin")
Observable<UserBean> AccountLogin(@Query("account") String account, @Query("password") String password);
@FormUrlEncoded
@POST("ResetPwd")
Observable<UserBean> Forget_Pas(@Field("mobileNumber") String num, @Field("verCode") String code, @Field("modifyPwd") String pas);
/**
* 手机号码绑定接口
*
... ...
... ... @@ -65,16 +65,24 @@ public class BdsjActivity extends BaseMvpActivity<CommonPresenter, AccountModel>
@Override
public void getData(Object o, int api, int intent) {
if (api != 1) {
return;
}
switch (intent) {
case 1: // 验证码
UserBean bean = (UserBean) o;
if (bean.getSuccess()) {
Toast.makeText(this, "验证码发送成功", Toast.LENGTH_LONG).show();
time = 60;
timer = new CountDownTimer(60000, 1000) {
@Override
public void onTick(long millisUntilFinished) {
time--;
tvYanzheng.setText(String.valueOf(time) + "s");
tvYanzheng.setFocusable(false);
tvYanzheng.setFocusableInTouchMode(false);
tvYanzheng.setClickable(false);
try {
tvYanzheng.setText(String.valueOf(time) + "s");
tvYanzheng.setFocusable(false);
... ... @@ -87,15 +95,23 @@ public class BdsjActivity extends BaseMvpActivity<CommonPresenter, AccountModel>
public void onFinish() {
tvYanzheng.setText("获取验证码");
tvYanzheng.setFocusable(true);
tvYanzheng.setFocusableInTouchMode(true);
tvYanzheng.setClickable(true);
time = 60;
}
}.start();
} else {
Toast.makeText(this, "验证码发送失败", Toast.LENGTH_LONG).show();
Toast.makeText(this, "验证码发送失败", Toast.LENGTH_SHORT).show();
}
break;
case 3: // 绑定
UserBean bean1 = (UserBean) o;
if (bean1.getSuccess()) {
Toast.makeText(this, "微信绑定成功", Toast.LENGTH_SHORT).show();
this.finish();
} else {
Toast.makeText(this, "微信绑定失败", Toast.LENGTH_SHORT).show();
}
break;
}
}
... ...
package com.hh.xuetubao.activity.login;
import android.content.Intent;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.util.Log;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import com.hh.xuetubao.R;
import com.hh.xuetubao.bean.UserBean;
import com.hh.xuetubao.model.AccountModel;
import com.hh.xuetubao.mvp.BaseMvpActivity;
import com.hh.xuetubao.mvp.CommonPresenter;
import com.hh.xuetubao.mvp.ICommonView;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
public class ForgetPasActivity extends BaseMvpActivity<CommonPresenter, AccountModel> implements ICommonView {
@BindView(R.id.for_pas_phone)
EditText forPasPhone;
@BindView(R.id.for_pas_code)
EditText forPasCode;
@BindView(R.id.tv_yanzheng)
TextView tvYanzheng;
@BindView(R.id.for_pas_pas)
EditText forPasPas;
@BindView(R.id.for_pas_pas2)
EditText forPasPas2;
@BindView(R.id.forget_pas_sure)
TextView forgetPasSure;
@BindView(R.id.forget_pas_fhdl)
TextView forgetPasFhdl;
private int time = 60;
private CountDownTimer timer;
@Override
public void initView() {
}
@Override
public int initLayout() {
return R.layout.activity_forget_pas;
}
@Override
public void initData() {
}
@Override
public CommonPresenter getPresenter() {
return new CommonPresenter();
}
@Override
public AccountModel getModel() {
return new AccountModel();
}
@Override
public void getData(Object o, int api, int intent) {
// 验证码
if (api == 1 && intent == 1) {
UserBean bean = (UserBean) o;
if (bean.getSuccess()) {
Toast.makeText(this, "验证码发送成功", Toast.LENGTH_LONG).show();
time = 60;
timer = new CountDownTimer(60000, 1000) {
@Override
public void onTick(long millisUntilFinished) {
time--;
tvYanzheng.setText(String.valueOf(time) + "s");
tvYanzheng.setFocusable(false);
tvYanzheng.setFocusableInTouchMode(false);
tvYanzheng.setClickable(false);
try {
tvYanzheng.setText(String.valueOf(time) + "s");
tvYanzheng.setFocusable(false);
} catch (Exception e) {
Log.e("zhangtao", e.toString());
}
}
@Override
public void onFinish() {
tvYanzheng.setText("获取验证码");
tvYanzheng.setFocusable(true);
tvYanzheng.setFocusableInTouchMode(true);
tvYanzheng.setClickable(true);
time = 60;
}
}.start();
} else {
Toast.makeText(this, "验证码发送失败", Toast.LENGTH_LONG).show();
}
}
// 修改密码
if (api == 1 && intent == 5) {
UserBean bean = (UserBean) o;
if (bean.getSuccess()) {
Toast.makeText(this, "修改成功", Toast.LENGTH_SHORT).show();
this.finish();
} else {
Toast.makeText(this, "修改失败", Toast.LENGTH_SHORT).show();
}
}
}
@Override
public void onComplete(int api) {
}
@Override
public void onError(Throwable e, int api) {
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// TODO: add setContentView(...) invocation
ButterKnife.bind(this);
}
@OnClick({R.id.tv_yanzheng, R.id.forget_pas_sure, R.id.forget_pas_fhdl})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.tv_yanzheng: // - > 获取验证码
if (isCellphone(forPasPhone.getText().toString()) == true)
mPresenter.getPresenter(1, 1, forPasPhone.getText().toString(), String.valueOf(2)); // 修改密码部分type == 2
else
Toast.makeText(this, "请输入正确的手机号码", Toast.LENGTH_LONG).show();
break;
case R.id.forget_pas_sure: // - > 确定修改
String pasA = forPasPas.getText().toString().trim();
String pasB = forPasPas2.getText().toString().trim();
String code = forPasCode.getText().toString().trim();
if (isCellphone(forPasPhone.getText().toString()) == false) {
Toast.makeText(this, "请输入正确的手机号码", Toast.LENGTH_SHORT).show();
return;
} else if (code.length() == 0) {
Toast.makeText(this, "验证码不可为空", Toast.LENGTH_SHORT).show();
return;
} else if (pasA.length() == 0 || pasB.length() == 0) {
Toast.makeText(this, "新密码不可为空", Toast.LENGTH_SHORT).show();
return;
} else if (!pasA.equals(pasB)) {
Toast.makeText(this, "两次密码必须保持一致", Toast.LENGTH_SHORT).show();
return;
} else { // 确定修改
mPresenter.getPresenter(1, 5, forPasPhone.getText().toString().trim(), forPasCode.getText().toString().trim(), forPasPas.getText().toString().trim());
}
break;
case R.id.forget_pas_fhdl: // - > 返回登录
startActivity(new Intent(ForgetPasActivity.this, LoginActivity.class));
break;
}
}
public static boolean isCellphone(String str) {
Pattern pattern = Pattern.compile("^((13[0-9])|(14[5,7,9])|(15[^4])|(18[0-9])|(17[0,1,3,5,6,7,8]))\\d{8}$");
Matcher matcher = pattern.matcher(str);
return matcher.matches();
}
}
... ...
package com.hh.xuetubao.activity.login;
import android.content.Intent;
import android.os.Bundle;
import android.text.method.HideReturnsTransformationMethod;
import android.text.method.PasswordTransformationMethod;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import com.hh.xuetubao.MainActivity;
import com.hh.xuetubao.R;
import com.hh.xuetubao.Utils.SharedPrefrenceUtils;
import com.hh.xuetubao.bean.PasLoginBean;
import com.hh.xuetubao.bean.UserBean;
import com.hh.xuetubao.model.AccountModel;
import com.hh.xuetubao.mvp.BaseMvpActivity;
import com.hh.xuetubao.mvp.CommonPresenter;
import com.hh.xuetubao.mvp.ICommonView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
public class JgdlActivity extends BaseMvpActivity<CommonPresenter, AccountModel> implements ICommonView {
@BindView(R.id.ed_yhm)
EditText edYhm;
@BindView(R.id.ed_pas)
EditText edPas;
@BindView(R.id.jgdl_wjmm)
TextView jgdlWjmm;
@BindView(R.id.jgdl_sure)
TextView jgdlSure;
@BindView(R.id.jgdl_fhdl)
TextView jgdlFhdl;
@BindView(R.id.jgdl_image)
ImageView jgdlImage;
private boolean isOpenEye = false;
@Override
public void initView() {
//从密码可见模式变为密码不可见模式
edPas.setTransformationMethod(PasswordTransformationMethod.getInstance());
}
@Override
public int initLayout() {
return R.layout.activity_jgdl;
}
@Override
public void initData() {
}
@Override
public CommonPresenter getPresenter() {
return new CommonPresenter();
}
@Override
public AccountModel getModel() {
return new AccountModel();
}
@Override
public void getData(Object o, int api, int intent) {
if (api == 1 && intent == 4) {
UserBean bean = (UserBean) o;
if (bean.getSuccess()) {
Toast.makeText(this, "登录成功", Toast.LENGTH_SHORT).show();
SharedPrefrenceUtils.saveString(this, "AccountOid", bean.getAccountOid());
startActivity(new Intent(this, MainActivity.class));
this.finish();
} else {
Toast.makeText(this, "登录失败", Toast.LENGTH_SHORT).show();
}
}
}
@Override
public void onComplete(int api) {
}
@Override
public void onError(Throwable e, int api) {
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// TODO: add setContentView(...) invocation
ButterKnife.bind(this);
}
@OnClick({R.id.jgdl_wjmm, R.id.jgdl_sure, R.id.jgdl_fhdl, R.id.jgdl_image})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.jgdl_wjmm: // - > 忘记密码?
startActivity(new Intent(this, ForgetPasActivity.class));
break;
case R.id.jgdl_sure: // - > 确定
if (edYhm.getText().length() == 0 || edPas.length() == 0) {
Toast.makeText(this, "用户名和密码不可为空", Toast.LENGTH_SHORT).show();
return;
} else {
mPresenter.getPresenter(1, 4, edYhm.getText().toString().trim(), edPas.getText().toString().trim());
}
break;
case R.id.jgdl_fhdl: // - > 返回登录
this.finish();
break;
case R.id.jgdl_image: // - > 登录密码可见
if (isOpenEye == false) {
//从密码不可见模式变为密码可见模式
edPas.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
isOpenEye = true;
} else {
//从密码可见模式变为密码不可见模式
edPas.setTransformationMethod(PasswordTransformationMethod.getInstance());
isOpenEye = false;
}
break;
}
}
}
... ...
... ... @@ -19,6 +19,10 @@ import com.hh.xuetubao.model.AccountModel;
import com.hh.xuetubao.mvp.BaseMvpActivity;
import com.hh.xuetubao.mvp.CommonPresenter;
import com.hh.xuetubao.mvp.ICommonView;
import com.hh.xuetubao.wxapi.WxLogin;
import com.tencent.mm.opensdk.modelmsg.SendAuth;
import com.tencent.mm.opensdk.openapi.IWXAPI;
import com.tencent.mm.opensdk.openapi.WXAPIFactory;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
... ... @@ -150,6 +154,8 @@ public class LoginActivity extends BaseMvpActivity<CommonPresenter, AccountModel
ButterKnife.bind(this);
}
IWXAPI api;
@Override
public void onClick(View v) {
switch (v.getId()) {
... ... @@ -166,9 +172,12 @@ public class LoginActivity extends BaseMvpActivity<CommonPresenter, AccountModel
else
Toast.makeText(this, "请输入正确的手机号码", Toast.LENGTH_LONG).show();
break;
case R.id.img_wechat:
case R.id.img_wechat: // 微信
WxLogin.longWx();
// startActivity(new Intent(LoginActivity.this, BdsjActivity.class));
break;
case R.id.img_jigou:
case R.id.img_jigou: // 机构登录
startActivity(new Intent(LoginActivity.this, JgdlActivity.class));
break;
}
}
... ...
... ... @@ -69,7 +69,6 @@ public class CourseDetailActivity extends BaseMvpActivity<CommonPresenter, Learn
linIntroduce.setOnClickListener(this);
linList.setOnClickListener(this);
}
... ...
... ... @@ -37,12 +37,12 @@ public class ListRecGroupAdapter extends RecyclerView.Adapter<ListRecGroupAdapte
if (list.get(position).getChapterName() != null)
holder.textView.setText(list.get(position).getChapterName());
List<ChapterLstBean.SectionLstObject> sectionLst = list.get(position).getSectionLst();
ListRecChildAdapter childAdapter = new ListRecChildAdapter(context, sectionLst);
holder.recChild.setAdapter(childAdapter);
holder.recChild.setLayoutManager(new LinearLayoutManager(context));
}
@Override
... ...
package com.hh.xuetubao.bean;
public class PasLoginBean {
/**
* IsSuccess : true
* AccountOid : 16EA2C01-20E3-420D-AB4E-4E44F0539349
* IsBindMobile : false
*/
private boolean IsSuccess;
private String AccountOid;
private boolean IsBindMobile;
public boolean isIsSuccess() {
return IsSuccess;
}
public void setIsSuccess(boolean IsSuccess) {
this.IsSuccess = IsSuccess;
}
public String getAccountOid() {
return AccountOid;
}
public void setAccountOid(String AccountOid) {
this.AccountOid = AccountOid;
}
public boolean isIsBindMobile() {
return IsBindMobile;
}
public void setIsBindMobile(boolean IsBindMobile) {
this.IsBindMobile = IsBindMobile;
}
}
... ...
... ... @@ -18,12 +18,21 @@ public class AccountModel implements ICommonModel {
public void getModel(ICommonView commonView, int api, int intent, String... params) {
mServers = HttpUtils.getInstance().getServer(NetConfig.accountUrl);
if (api == 1 && intent == 1) {
if (api == 1 && intent == 1) { // - > 验证码
sendValidateCode(commonView, api, intent, params);
}
if (api == 1 && intent == 2) {
if (api == 1 && intent == 2) { // - > 验证码登录
mobileLogin(commonView, api, intent, params);
}
if (api == 1 && intent == 3) { // - > 微信绑定手机号
bd_phone(commonView, api, intent, params);
}
if (api == 1 && intent == 4) { // - > 机构登录
jg_login(commonView, api, intent, params);
}
if(api == 1 && intent == 5){ // 忘记密码
forget_pas(commonView, api, intent, params);
}
}
... ... @@ -43,7 +52,7 @@ public class AccountModel implements ICommonModel {
});
}
/* 手机号登录 */
/* 验证码登录 */
private void mobileLogin(final ICommonView commonView, final int api, final int intent, String... params) {
if (api == 1 && intent == 2)
mServers.mobileLogin(params[0], params[1])
... ... @@ -59,8 +68,9 @@ public class AccountModel implements ICommonModel {
});
}
/* 微信绑定手机号 */
private void bd_phone(final ICommonView commonView, final int api, final int tag, String... params) {
if (api == 1 && tag == 2) {
if (api == 1 && tag == 3) {
mServers.bd_phone(params[0], params[1], params[2])
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
... ... @@ -74,5 +84,36 @@ public class AccountModel implements ICommonModel {
}
}
/* 机构登录 */
private void jg_login(final ICommonView commonView, final int api, final int tag, String... params) {
if (api == 1 && tag == 4) {
mServers.AccountLogin(params[0], params[1])
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new BaseObsever() {
@Override
public void onNext(Object value) {
super.onNext(value);
commonView.getData(value, api, tag);
}
});
}
}
/* 忘记密码 */
private void forget_pas(final ICommonView commonView, final int api, final int tag, String... params) {
if (api == 1 && tag == 5) {
mServers.Forget_Pas(params[0], params[1], params[2])
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new BaseObsever() {
@Override
public void onNext(Object value) {
super.onNext(value);
commonView.getData(value, api, tag);
}
});
}
}
}
... ...
package com.hh.xuetubao.wxapi;
import android.content.Context;
import android.widget.Toast;
/**
* Created by 14178 on 2018/1/19.
*/
public class UIUtils {
private static Context mContext;
public static void initContext(Context context) {
mContext = context;
}
public static void runOnUIToast(String str){
Toast.makeText(mContext, str, Toast.LENGTH_SHORT).show();
}
}
... ...
package com.hh.xuetubao.wxapi;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.util.Log;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import com.hh.xuetubao.R;
import com.hh.xuetubao.bean.UserBean;
import com.hh.xuetubao.model.AccountModel;
import com.hh.xuetubao.mvp.BaseMvpActivity;
import com.hh.xuetubao.mvp.CommonPresenter;
import com.hh.xuetubao.mvp.ICommonView;
import com.tencent.mm.opensdk.modelbase.BaseReq;
import com.tencent.mm.opensdk.modelbase.BaseResp;
import com.tencent.mm.opensdk.modelmsg.SendAuth;
import com.tencent.mm.opensdk.openapi.IWXAPI;
import com.tencent.mm.opensdk.openapi.IWXAPIEventHandler;
import com.tencent.mm.opensdk.openapi.WXAPIFactory;
import com.zhy.http.okhttp.OkHttpUtils;
import com.zhy.http.okhttp.callback.StringCallback;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
public class WXEntryActivity extends BaseMvpActivity<CommonPresenter, AccountModel> implements ICommonView, IWXAPIEventHandler {
private static final int RETURN_MSG_TYPE_LOGIN = 1;
private static final int RETURN_MSG_TYPE_SHARE = 2;
private IWXAPI mWeixinAPI;
@BindView(R.id.ed_phone)
EditText edPhone;
@BindView(R.id.ed_code)
EditText edCode;
@BindView(R.id.tv_yanzheng)
TextView tvYanzheng;
@BindView(R.id.bdsj_sure)
TextView bdsjSure;
@BindView(R.id.bdsj_fhdl)
TextView bdsjFhdl;
private CountDownTimer timer;
private int time = 60;
@Override
public void initView() {
ButterKnife.bind(this);
mWeixinAPI = WXAPIFactory.createWXAPI(this, WxData.WEIXIN_APP_ID, true);
mWeixinAPI.handleIntent(this.getIntent(), this);
}
@Override
public int initLayout() {
return R.layout.activity_bdsj; // R.layout.activity_wxentry
}
@Override
public void initData() {
}
@Override
public CommonPresenter getPresenter() {
return new CommonPresenter();
}
@Override
public AccountModel getModel() {
return new AccountModel();
}
@Override
public void getData(Object o, int api, int intent) {
if (api != 1) {
return;
}
switch (intent) {
case 1: // 验证码
UserBean bean = (UserBean) o;
if (bean.getSuccess()) {
Toast.makeText(this, "验证码发送成功", Toast.LENGTH_LONG).show();
time = 60;
timer = new CountDownTimer(60000, 1000) {
@Override
public void onTick(long millisUntilFinished) {
time--;
tvYanzheng.setText(String.valueOf(time) + "s");
tvYanzheng.setFocusable(false);
tvYanzheng.setFocusableInTouchMode(false);
tvYanzheng.setClickable(false);
try {
tvYanzheng.setText(String.valueOf(time) + "s");
tvYanzheng.setFocusable(false);
} catch (Exception e) {
Log.e("zhangtao", e.toString());
}
}
@Override
public void onFinish() {
tvYanzheng.setText("获取验证码");
tvYanzheng.setFocusable(true);
tvYanzheng.setFocusableInTouchMode(true);
tvYanzheng.setClickable(true);
time = 60;
}
}.start();
} else {
Toast.makeText(this, "验证码发送失败", Toast.LENGTH_SHORT).show();
}
break;
case 3: // 绑定
UserBean bean1 = (UserBean) o;
if (bean1.getSuccess()) {
Toast.makeText(this, "微信绑定成功", Toast.LENGTH_SHORT).show();
this.finish();
} else {
Toast.makeText(this, "微信绑定失败", Toast.LENGTH_SHORT).show();
}
break;
}
}
@OnClick({R.id.tv_yanzheng, R.id.bdsj_sure, R.id.bdsj_fhdl})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.tv_yanzheng: // - > 验证码
if (isCellphone(edPhone.getText().toString()))
mPresenter.getPresenter(1, 1, edPhone.getText().toString(), String.valueOf(1)); // 1 -> 微信或手机号码绑定时发送
else
Toast.makeText(this, "请输入正确的手机号码", Toast.LENGTH_LONG).show();
break;
case R.id.bdsj_sure: // - > 确定
if (isCellphone(edPhone.getText().toString())) {
Toast.makeText(this, "请输入正确的手机号码", Toast.LENGTH_LONG).show();
return;
} else if (edPhone.getText().length() > 0 && edCode.getText().length() > 0) {
Toast.makeText(this, "手机号和验证码不可为空", Toast.LENGTH_LONG).show();
return;
} else {
mPresenter.getPresenter(1, 3, edPhone.getText().toString().trim(), edCode.getText().toString().trim()); // - > 绑定
}
break;
case R.id.bdsj_fhdl: // - > 返回登录
this.finish();
break;
}
}
public static boolean isCellphone(String str) {
Pattern pattern = Pattern.compile("^((13[0-9])|(14[5,7,9])|(15[^4])|(18[0-9])|(17[0,1,3,5,6,7,8]))\\d{8}$");
Matcher matcher = pattern.matcher(str);
return matcher.matches();
}
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
setIntent(intent);
mWeixinAPI.handleIntent(intent, this);//必须调用此句话
}
@Override
public void onReq(BaseReq baseReq) {
Log.e("-----", "onReq: " + baseReq);
finish();
}
@Override
public void onResp(BaseResp baseResp) {
Log.e("-----", "errStr: " + baseResp.errStr);
Log.e("-----", "openId: " + baseResp.openId);
Log.e("-----", "transaction: " + baseResp.transaction);
Log.e("-----", "errCode: " + baseResp.errCode);
Log.e("-----", "getType: " + baseResp.getType());
Log.e("-----", "checkArgs: " + baseResp.checkArgs());
switch (baseResp.errCode) {
case BaseResp.ErrCode.ERR_AUTH_DENIED:
case BaseResp.ErrCode.ERR_USER_CANCEL:
if (RETURN_MSG_TYPE_SHARE == baseResp.getType()) UIUtils.runOnUIToast("分享失败");
else UIUtils.runOnUIToast("登录失败");
break;
case BaseResp.ErrCode.ERR_OK:
switch (baseResp.getType()) {
case RETURN_MSG_TYPE_LOGIN:
//拿到了微信返回的code,立马再去请求access_token
String code = ((SendAuth.Resp) baseResp).code;
getAccess_token(code);
//就在这个地方,用网络库什么的或者自己封的网络api,发请求去咯,注意是get请求
Log.e("--------", "code: " + code);
// id_tv.setText("code: " + code); //
break;
case RETURN_MSG_TYPE_SHARE:
UIUtils.runOnUIToast("微信分享成功");
finish();
break;
}
break;
}
}
/**
* 获取openid accessToken值用于后期操作
*
* @param code 请求码
*/
private void getAccess_token(final String code) {
String path = "https://api.weixin.qq.com/sns/oauth2/access_token?appid="
+ WxData.WEIXIN_APP_ID
+ "&secret="
+ WxData.APP_SECRET
+ "&code="
+ code
+ "&grant_type=authorization_code";
OkHttpUtils.get().url(path).build().execute(new StringCallback() {
@Override
public void onError(okhttp3.Call call, Exception e) {
}
@Override
public void onResponse(String response) {
Log.e("-----", "onResponse: " + response);
JSONObject jsonObject = null;
try {
jsonObject = new JSONObject(response);
String openid = jsonObject.getString("openid").toString().trim();
String access_token = jsonObject.getString("access_token").toString().trim();
getUserMesg(access_token, openid);
} catch (JSONException e) {
e.printStackTrace();
}
}
});
}
/**
* 获取微信的个人信息
*
* @param access_token
* @param openid
*/
private void getUserMesg(final String access_token, final String openid) {
String path = "https://api.weixin.qq.com/sns/userinfo?access_token="
+ access_token
+ "&openid="
+ openid;
OkHttpUtils.get().url(path).build().execute(new StringCallback() {
@Override
public void onError(okhttp3.Call call, Exception e) {
}
@Override
public void onResponse(String response) {
Log.e("------", "全部数据: " + response);
JSONObject jsonObject = null;
try {
jsonObject = new JSONObject(response);
String nickname = jsonObject.getString("nickname");
int sex = Integer.parseInt(jsonObject.get("sex").toString());
String headimgurl = jsonObject.getString("headimgurl");
String openid1 = jsonObject.getString("openid");
Log.e("---", "用户基本信息:");
Log.e("---", "nickname:" + nickname);
// nickname_tv.setText("nickname: " +nickname);
Log.e("---", "sex: " + sex);
// sex_tv.setText("sex: " + sex + "");
Log.e("---", "headimgurl:" + headimgurl);
// startLoca(nickname, openid1);
} catch (JSONException e) {
e.printStackTrace();
UIUtils.runOnUIToast("登陆错误,请重新再试");
}
// finish();
}
});
}
@Override
public void onComplete(int api) {
}
@Override
public void onError(Throwable e, int api) {
}
}
... ...
package com.hh.xuetubao.wxapi;
/**
* XINHAO_HAN存储信息
*/
public class WxData {
/**
* 你的AppID
*
* 在此特别注意,本Demo只适用微信的登陆功能,并不能用到微信支付功能
*
* 在此注意,必须要和微信官网签名一致,否则调用不起来微信APP,
*
* 如果在你调用出错的情况下(微信APP死活不出来的情况下),请参阅作者简书网址 : https://www.jianshu.com/p/04ed0b65f3df
*
* 微信APP掉不出来:有以下原因:
*
* 1.签名不正确(APK所使用签名的MD5码) 签名MD5码不要有 : 如A0:5B:12:63.... ,要全部是小写(推荐)a05b1263...,这种形式的
*
* 2.APP_ID不正确
*
* 3.密匙不正确
*
* 4.包名不正确
*
* 不走回调WXEntryActivity
*
* 1.AndroidManifest.xml里没有配置
*
* <activity
* android:name=".wxapi.WXEntryActivity"
* android:exported="true"
* android:label="WXEntryActivity" />
* 2.必须是 你的包名.wxapi
* 如果你的所有信息填写正确,还是掉不起来微信,那就可能是微信服务器问题,请稍等3-5分钟,在尝试调用,否则就重复以上选项
* 大兄弟,记得细心一点哟~~~
*
*
*
*
*/
public static final String WEIXIN_APP_ID = "";
public static final String APP_SECRET = "";
/**
* 固定的
*
*/
public static final String SCOPE = "snsapi_userinfo";
public static final String STATE = "wechat_sdk_demo_test_neng";
}
... ...
package com.hh.xuetubao.wxapi;
import android.content.Context;
import android.widget.Toast;
import com.tencent.mm.opensdk.modelmsg.SendAuth;
import com.tencent.mm.opensdk.openapi.IWXAPI;
import com.tencent.mm.opensdk.openapi.WXAPIFactory;
/**
* Created by 14178 on 2018/1/19.
*/
public class WxLogin {
public static IWXAPI api;
public static Context mContext;
/**
* 急的初始化
*
* @param context
*/
public static void initWx(Context context) {
UIUtils.initContext(context);
mContext = context;
api = WXAPIFactory.createWXAPI(context, WxData.WEIXIN_APP_ID, true);
api.registerApp(WxData.WEIXIN_APP_ID);
final IWXAPI msgApi = WXAPIFactory.createWXAPI(context, null);
// 将该app注册到微信
msgApi.registerApp(WxData.WEIXIN_APP_ID);
}
public static void longWx() {
if (mContext == null) {
Toast.makeText(mContext, "你没有初始化,请在Application中做初始化动作,请调用 initWx(context)方法", Toast.LENGTH_SHORT).show();
return;
}
if (!api.isWXAppInstalled()) {
Toast.makeText(mContext, "您还未安装微信客户端", Toast.LENGTH_SHORT).show();
return;
}
final SendAuth.Req req = new SendAuth.Req();
req.scope = WxData.SCOPE;
req.state = WxData.STATE;
api.sendReq(req);
}
}
... ...
... ... @@ -28,6 +28,14 @@
android:textColor="#FF5400"
android:textSize="12sp" />
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="介绍"
android:textColor="#616161"
android:textSize="@dimen/sp_15" />
</LinearLayout>
<View
android:layout_width="@dimen/dp_1"
... ... @@ -46,6 +54,14 @@
android:textColor="#616161"
android:textSize="12sp" />
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="目录"
android:textColor="#616161"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>
... ...
<?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:gravity="center_horizontal"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_60"
android:text="忘记密码"
android:textColor="@color/color_232323"
android:textSize="@dimen/sp_17" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_40"
android:layout_marginLeft="@dimen/dp_29"
android:layout_marginTop="@dimen/dp_32"
android:layout_marginRight="@dimen/dp_29"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="手机号"
android:textColor="@color/color_6666666"
android:textSize="@dimen/sp_12" />
<EditText
android:layout_width="@dimen/dp_0"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@null"
android:hint="| 请输入手机号"
android:textColor="@color/color_c7c7c7"
android:textSize="@dimen/sp_12"
android:layout_marginLeft="@dimen/dp_37"
android:id="@+id/for_pas_phone"
/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/dp_1"
android:layout_marginLeft="@dimen/dp_29"
android:layout_marginRight="@dimen/dp_29"
android:background="@color/color_333333" />
<!--<LinearLayout-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="@dimen/dp_40"-->
<!--android:layout_marginLeft="@dimen/dp_29"-->
<!--android:layout_marginTop="@dimen/dp_22"-->
<!--android:layout_marginRight="@dimen/dp_29"-->
<!--android:gravity="center_vertical"-->
<!--android:orientation="horizontal">-->
<!--<TextView-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:text="问题"-->
<!--android:textColor="@color/color_6666666"-->
<!--android:textSize="@dimen/sp_12" />-->
<!--<EditText-->
<!--android:layout_width="@dimen/dp_0"-->
<!--android:layout_height="match_parent"-->
<!--android:layout_weight="1"-->
<!--android:background="@null"-->
<!--android:hint="请输入正确答案"-->
<!--android:textColor="@color/color_c7c7c7"-->
<!--android:textSize="@dimen/sp_12"-->
<!--android:layout_marginLeft="@dimen/dp_54"-->
<!--android:id="@+id/for_pas_wt"-->
<!--/>-->
<!--</LinearLayout>-->
<!--<View-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="@dimen/dp_1"-->
<!--android:layout_marginLeft="@dimen/dp_29"-->
<!--android:layout_marginRight="@dimen/dp_29"-->
<!--android:background="@color/color_d5d5d5" />-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_40"
android:layout_marginLeft="@dimen/dp_29"
android:layout_marginTop="@dimen/dp_22"
android:layout_marginRight="@dimen/dp_29"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="验证码"
android:textColor="@color/color_6666666"
android:textSize="@dimen/sp_12" />
<EditText
android:layout_width="@dimen/dp_0"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@null"
android:hint="请输入短信验证码"
android:textColor="@color/color_c7c7c7"
android:textSize="@dimen/sp_12"
android:layout_marginLeft="@dimen/dp_43"
android:id="@+id/for_pas_code"
/>
<TextView
android:id="@+id/tv_yanzheng"
android:layout_width="@dimen/dp_75"
android:layout_height="@dimen/dp_25"
android:background="@drawable/login_circle"
android:gravity="center"
android:text="获取验证码"
android:textColor="#FFFFFF"
android:textSize="11sp" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/dp_1"
android:layout_marginLeft="@dimen/dp_29"
android:layout_marginRight="@dimen/dp_29"
android:background="@color/color_d5d5d5" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_40"
android:layout_marginLeft="@dimen/dp_29"
android:layout_marginTop="@dimen/dp_22"
android:layout_marginRight="@dimen/dp_29"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="新密码"
android:textColor="@color/color_6666666"
android:textSize="@dimen/sp_12" />
<EditText
android:layout_width="@dimen/dp_0"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@null"
android:hint="请输入新密码"
android:textColor="@color/color_c7c7c7"
android:textSize="@dimen/sp_12"
android:layout_marginLeft="@dimen/dp_43"
android:id="@+id/for_pas_pas"
/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/dp_1"
android:layout_marginLeft="@dimen/dp_29"
android:layout_marginRight="@dimen/dp_29"
android:background="@color/color_d5d5d5" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_40"
android:layout_marginLeft="@dimen/dp_29"
android:layout_marginTop="@dimen/dp_22"
android:layout_marginRight="@dimen/dp_29"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="确认新密码"
android:textColor="@color/color_6666666"
android:textSize="@dimen/sp_12" />
<EditText
android:layout_width="@dimen/dp_0"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@null"
android:hint="请再次输入新密码"
android:textColor="@color/color_c7c7c7"
android:textSize="@dimen/sp_12"
android:layout_marginLeft="@dimen/dp_19"
android:id="@+id/for_pas_pas2"
/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/dp_1"
android:layout_marginLeft="@dimen/dp_29"
android:layout_marginRight="@dimen/dp_29"
android:background="@color/color_d5d5d5" />
<TextView
android:id="@+id/forget_pas_sure"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_50"
android:layout_marginLeft="@dimen/dp_25"
android:layout_marginTop="@dimen/dp_124"
android:layout_marginRight="@dimen/dp_25"
android:background="@drawable/circle_orange"
android:gravity="center"
android:text="确定"
android:textColor="#FFFFFF"
android:textSize="16sp" />
<TextView
android:id="@+id/forget_pas_fhdl"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_50"
android:layout_marginLeft="@dimen/dp_25"
android:layout_marginTop="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_25"
android:background="@drawable/circle_grey_25"
android:gravity="center"
android:text="返回登录"
android:textColor="@color/color_6666666"
android:textSize="16sp" />
</LinearLayout>
\ No newline at end of file
... ...
<?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">
<TextView
android:id="@+id/tv_login"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/dp_60"
android:text="机构登录"
android:textColor="#232323"
android:textSize="17sp" />
<ImageView
android:id="@+id/img_phone"
android:layout_width="@dimen/dp_18"
android:layout_height="@dimen/dp_18"
android:layout_below="@+id/tv_login"
android:layout_marginLeft="@dimen/dp_25"
android:layout_marginTop="@dimen/dp_50"
android:src="@mipmap/login_phone"
android:visibility="invisible" />
<TextView
android:id="@+id/tv_phone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/img_phone"
android:layout_marginLeft="@dimen/dp_29"
android:text="用户名"
android:textColor="#666666"
android:textSize="@dimen/sp_12" />
<EditText
android:id="@+id/ed_yhm"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_18"
android:layout_alignBottom="@id/img_phone"
android:layout_marginLeft="@dimen/dp_15"
android:layout_marginRight="@dimen/dp_29"
android:layout_toRightOf="@id/tv_phone"
android:background="@null"
android:hint="|请输入登录用户名"
android:textColorHint="#C7C7C7"
android:textSize="12sp" />
<View
android:id="@+id/line2"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_1"
android:layout_below="@id/img_phone"
android:layout_marginLeft="@dimen/dp_29"
android:layout_marginTop="@dimen/dp_15"
android:layout_marginRight="@dimen/dp_29"
android:background="#333333" />
<ImageView
android:id="@+id/img_message"
android:layout_width="@dimen/dp_18"
android:layout_height="@dimen/dp_18"
android:layout_below="@id/line2"
android:layout_marginLeft="@dimen/dp_25"
android:layout_marginTop="@dimen/dp_35"
android:src="@mipmap/login_message"
android:visibility="invisible" />
<TextView
android:id="@+id/tv_message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/img_message"
android:layout_marginLeft="@dimen/dp_29"
android:text="密码"
android:textColor="#666666"
android:textSize="@dimen/sp_12" />
<LinearLayout
android:id="@+id/sss"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignBottom="@id/img_message"
android:layout_marginLeft="@dimen/dp_15"
android:layout_toRightOf="@id/tv_message"
android:gravity="center_vertical"
android:orientation="horizontal">
<EditText
android:id="@+id/ed_pas"
android:layout_width="0dp"
android:layout_height="@dimen/dp_18"
android:layout_weight="1"
android:background="@null"
android:hint="请输入登录密码"
android:textColorHint="#C7C7C7"
android:textSize="12sp" />
<ImageView
android:layout_width="@dimen/dp_12"
android:layout_height="@dimen/dp_9"
android:layout_alignTop="@+id/ed_pas"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_30"
android:layout_toRightOf="@+id/ed_pas"
android:id="@+id/jgdl_image"
android:padding="@dimen/dp_10"
/>
</LinearLayout>
<View
android:id="@+id/ling2"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_1"
android:layout_below="@+id/sss"
android:layout_marginLeft="@dimen/dp_29"
android:layout_marginTop="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_29"
android:background="#D5D5D5" />
<TextView
android:id="@+id/jgdl_wjmm"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/ling2"
android:layout_alignRight="@+id/ling2"
android:layout_marginTop="@dimen/dp_15"
android:gravity="right"
android:text="忘记密码?"
android:textColor="@color/color_ff5400"
android:textSize="@dimen/sp_12" />
<TextView
android:id="@+id/jgdl_sure"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_50"
android:layout_below="@id/jgdl_wjmm"
android:layout_marginLeft="@dimen/dp_25"
android:layout_marginTop="@dimen/dp_226"
android:layout_marginRight="@dimen/dp_25"
android:background="@drawable/circle_orange"
android:gravity="center"
android:text="确定"
android:textColor="#FFFFFF"
android:textSize="16sp" />
<TextView
android:id="@+id/jgdl_fhdl"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_50"
android:layout_below="@id/jgdl_sure"
android:layout_marginLeft="@dimen/dp_25"
android:layout_marginTop="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_25"
android:background="@drawable/circle_grey_25"
android:gravity="center"
android:text="返回登录"
android:textColor="@color/color_6666666"
android:textSize="16sp" />
</RelativeLayout>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.xinhao.xhwxlogin.wxapi.WXEntryActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/id_tv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:text="code: 由于隐私,该项不给予显示"
android:textColor="#323232"
android:textSize="14sp" />
<TextView
android:layout_width="200dp"
android:textColor="#fff"
android:textSize="14sp"
android:padding="10dp"
android:layout_alignParentRight="true"
android:background="@android:color/holo_red_dark"
android:text="涉及到隐私隐藏一部分"
android:layout_height="wrap_content" />
</RelativeLayout>
<TextView
android:id="@+id/nickname_tv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:text="nickname: 由于隐私,该项不给予显示"
android:textColor="#323232"
android:textSize="14sp" />
<TextView
android:id="@+id/sex_tv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:text="sex: 由于隐私,该项不给予显示"
android:textColor="#323232"
android:textSize="14sp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:text="头像:"
android:textColor="#323232"
android:textSize="14sp" />
<ImageView
android:id="@+id/imageView"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</RelativeLayout>
... ...
... ... @@ -26,7 +26,9 @@
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="@dimen/dp_20"
android:src="@mipmap/down" />
android:src="@mipmap/down"
android:id="@+id/rv_list_xiala"
/>
</RelativeLayout>
... ...
... ... @@ -20,5 +20,13 @@
<color name="color_575757">#575757</color>
<color name="color_333333">#333333</color>
<color name="color_e4e4e4">#E4E4E4</color>
<<<<<<< Updated upstream
<color name="color_616161">#616161</color>
=======
<color name="color_232323">#232323</color>
<color name="color_6666666">#666666</color>
<color name="color_dddddd">#dddddd</color>
<color name="color_c7c7c7">#c7c7c7</color>
<color name="color_d5d5d5">#d5d5d5</color>
>>>>>>> Stashed changes
</resources>
... ...