Commit e146e3ca authored by linfeng's avatar linfeng

bug修复

parent 40adde38
......@@ -178,6 +178,7 @@
<activity
android:name=".MainActivity"
android:screenOrientation="portrait"
android:launchMode="singleTask" />
<activity
android:name="com.rv.home.rv.module.ui.login.LoginRvActivity"
......
......@@ -101,7 +101,6 @@ public class RvClientApplication extends FrameApp {
ARouter.openDebug();
}
ARouter.init(RvClientApplication.this);
}
......
......@@ -2,6 +2,8 @@ package com.xxfc.rv;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.text.TextUtils;
......@@ -110,6 +112,17 @@ public class WelcomeActivity extends BaseActivity<CommonPresenter> {
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// this.getWindow().getDecorView().setBackground(null);
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN);
if (Build.VERSION.SDK_INT >= 21) {
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |View.SYSTEM_UI_FLAG_FULLSCREEN);
}
// if (Build.VERSION.SDK_INT >= 21) {
// View decorView = getWindow().getDecorView();
// int option = View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
// | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
// | View.SYSTEM_UI_FLAG_LAYOUT_STABLE;
// decorView.setSystemUiVisibility(option);
// getWindow().setNavigationBarColor(Color.TRANSPARENT);
// getWindow().setStatusBarColor(Color.TRANSPARENT);
// }
}
}
......@@ -14,7 +14,7 @@
<style name="SplashTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowBackground">@drawable/start_back_icon</item>
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="windowActionBar">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowFullscreen">true</item>
......
......@@ -121,8 +121,8 @@ public class OkHttpCreate {
});
loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
this.mHttpBuilder.addInterceptor(loggingInterceptor);
// if (BuildConfig.DEBUG)
// this.mHttpBuilder.addInterceptor(new RvLogInterceptor());
if (BuildConfig.DEBUG)
this.mHttpBuilder.addInterceptor(new RvLogInterceptor());
}
/**
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="8dp" />
<solid android:color="@color/colorAuxiliaryYellow" />
<solid android:color="@color/gray_FFB74B" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="5dp" />
<solid android:color="@color/colorAuxiliaryYellow" />
<solid android:color="@color/gray_FFB74B" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="8dp" />
<corners android:radius="50dp" />
<solid android:color="@color/colorMain" />
</shape>
\ No newline at end of file
......@@ -46,7 +46,7 @@
<TextView
android:layout_width="@dimen/size_60"
android:layout_height="@dimen/size_40"
android:background="@color/gray_FFB74B"
android:background="@drawable/shape_rv_bg_yellow"
android:layout_marginLeft="@dimen/size_15"
android:gravity="center"
android:text="评论"
......
......@@ -128,4 +128,7 @@ public class ApiConfig {
//我的发布
public static String RVENTHUSIAST_GETBYUSERID_LIST = RvFrameConfig.HOST + "/api/im/msg/getByUserId";
//会员信息
public static String RVENTHUSIAST_GETUSERMEMBER = RvFrameConfig.HOST + "/api/admin/baseUserMember/app/getUserMember";
}
......@@ -263,13 +263,13 @@ public class CarDetailActivity extends BaseStatusActivity<CommonPresenter> {
startActivity(LoginRvActivity.getIntent(mActivity, 0));
return;
}
BeanUserInfo.UserInfo userInfo = getUserInfo();
if (userInfo != null) {
if (userInfo.getCertificationStatus() == 0) {
ARouter.getInstance().build(Constance.ACTIVITY_URL_IDCARDCERTIFICATION).navigation();
return;
}
}
// BeanUserInfo.UserInfo userInfo = getUserInfo();
// if (userInfo != null) {
// if (userInfo.getCertificationStatus() == 0) {
// ARouter.getInstance().build(Constance.ACTIVITY_URL_IDCARDCERTIFICATION).navigation();
// return;
// }
// }
startActivity(ConfirmOrderActivity.getIntent(mActivity, dataBean, mCarBean, getIntent().getStringExtra("startTime"), getIntent().getStringExtra("endTime")));
}
}
......
......@@ -12,6 +12,7 @@ import android.text.TextUtils;
import android.util.Log;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
......@@ -58,6 +59,7 @@ import com.rv.home.rv.module.ui.main.home.bean.ConfirmOrderBean;
import com.rv.home.rv.module.ui.main.home.bean.DrivingListBean;
import com.rv.home.rv.module.ui.main.home.bean.OrderAliPayBean;
import com.rv.home.rv.module.ui.main.home.bean.OrderDataBean;
import com.rv.home.rv.module.ui.main.home.bean.OrderMemberBean;
import com.rv.home.rv.module.ui.main.home.bean.OrderPayBean;
import com.rv.home.rv.module.ui.main.home.bean.OrderPriceBean;
import com.rv.home.rv.module.ui.main.home.bean.SelectItemBean;
......@@ -169,7 +171,7 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
private IWXAPI api;
private int payType = 1;//选择支付类型
private OrderPriceBean priceBean;
BeanUserInfo.UserInfo info = null;
// BeanUserInfo.UserInfo info = null;
private int deductiblePriceType;
private int isMemberType;
private double carAmount; //请求优惠券金额
......@@ -186,6 +188,7 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
private List<SelectItemBean.DataBean> selectItem;
private List<CarCouponBean.DataBean.CarCouponTypeDataBean.CarCouponDataBean> selectCouponList = null;
private OrderMemberBean.DataBean memberData;
public static Intent getIntent(Context context, OrderDataBean bean, CarTypeListBean.DataBeanX.DataBean carBean, String startTime, String endTime) {
return new Intent(context, ConfirmOrderActivity.class)
......@@ -258,24 +261,24 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
.subscribe(new Observer<LoginUserInfoEvent>(disposable) {
@Override
public void onNext(LoginUserInfoEvent event) {
tvPrice.setText(String.format("¥%1$s%2$s", mCarBean.getVehicleModel().getSum(), mActivity.getString(R.string.rv_day)));
if (info != null) {
if (0 == info.getIsMember()) {
tvLayoutMemberHint.setVisibility(View.GONE);
llLayoutMemberHint.setVisibility(View.GONE);
} else if (1 == info.getIsMember()) {
tvLayoutMemberHint.setVisibility(View.VISIBLE);
llLayoutMemberHint.setVisibility(View.VISIBLE);
tvFreeCarDays.setText("(剩余" + info.getRentFreeDays() + "天)");
}
}
// tvPrice.setText(String.format("¥%1$s%2$s", mCarBean.getVehicleModel().getSum(), mActivity.getString(R.string.rv_day)));
// if (info != null) {
// if (0 == info.getIsMember()) {
// tvLayoutMemberHint.setVisibility(View.GONE);
// llLayoutMemberHint.setVisibility(View.GONE);
// } else if (1 == info.getIsMember()) {
// tvLayoutMemberHint.setVisibility(View.VISIBLE);
// llLayoutMemberHint.setVisibility(View.VISIBLE);
// tvFreeCarDays.setText("(剩余" + info.getRentFreeDays() + "天)");
// }
// }
}
});
}
@Override
protected void loadData(Bundle savedInstanceState, Intent intent) {
getOrderPrice();
getMember();
}
@Override
......@@ -306,6 +309,15 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
CarCouponBean couponBean = (CarCouponBean) result;
couponData(couponBean);
break;
case 6:
OrderMemberBean orderMemberBean = (OrderMemberBean) result;
if (orderMemberBean != null) {
memberData = orderMemberBean.getData();
mCarBean.getVehicleModel().setMember(orderMemberBean.getData());
}
intiView();
getOrderPrice();
break;
}
}
......@@ -566,6 +578,17 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
mPresenter.getData(RvFrameConfig.VEHICLE_ORDER, 0, ApiConfig.HTTP_URL_GET_ORDER_PRICE, OrderPriceBean.class, map, headMap, true);
}
/**
* 获取会员信息
*/
private void getMember() {
Map<String, Object> headMap = new LinkedHashMap<>();
if (OkGoUtil.getToken() != null) {
headMap.put("Authorization", OkGoUtil.getToken());
mPresenter.getDataHead(RvFrameConfig.HOST, 6, ApiConfig.RVENTHUSIAST_GETUSERMEMBER, OrderMemberBean.class, headMap, true);
}
}
/**
* 订单支付
*/
......@@ -630,21 +653,33 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
tvGetCarAddress.setText(dataBean.getStartAddr());
tvOutCarAddress.setText(dataBean.getEndAddr());
String spStringCode = UtilsManager.getInstance(OkGoUtil.application).getSPStringCode(SPConstance.USER_JSON, SPConstance.USER_JSON_USERINFO);
if (!TextUtil.isEmpty(spStringCode)) {
info = JSON.parseObject(spStringCode, BeanUserInfo.UserInfo.class);
// String spStringCode = UtilsManager.getInstance(OkGoUtil.application).getSPStringCode(SPConstance.USER_JSON, SPConstance.USER_JSON_USERINFO);
// if (!TextUtil.isEmpty(spStringCode)) {
// info = JSON.parseObject(spStringCode, BeanUserInfo.UserInfo.class);
// }
if (memberData == null) {
tvLayoutMemberHint.setVisibility(View.GONE);
llLayoutMemberHint.setVisibility(View.GONE);
} else {
tvLayoutMemberHint.setVisibility(View.VISIBLE);
llLayoutMemberHint.setVisibility(View.VISIBLE);
tvFreeCarDays.setText("(剩余" + memberData.getRentFreeDays() + "天)");
}
if (info != null) {
if (0 == info.getIsMember()) {
tvLayoutMemberHint.setVisibility(View.GONE);
llLayoutMemberHint.setVisibility(View.GONE);
} else if (1 == info.getIsMember()) {
tvLayoutMemberHint.setVisibility(View.VISIBLE);
llLayoutMemberHint.setVisibility(View.VISIBLE);
tvFreeCarDays.setText("(剩余" + info.getRentFreeDays() + "天)");
swbtnMember.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
if (memberData != null) {
if (memberData.getRentFreeDays() == 0) {
swbtnMember.setChecked(false);
showToast("免费用车天数0");
return true;
}
}
return false;
}
}
});
swbtnMember.setOnCheckedChangeListener(new SwitchButton.OnCheckedChangeListener() {
@Override
......@@ -684,17 +719,17 @@ public class ConfirmOrderActivity extends BaseStatusActivity<CommonPresenter> {
childrenBean2.setVal("¥" + dayPrice * dayNum);
childrenBeanList.add(childrenBean2);
} else {
if (info != null) {
if (dayNum > info.getRentFreeDays()) {
payMoney = dayPrice * (dayNum - info.getRentFreeDays()) + priceBean.getData().getDeposit();
if (memberData != null) {
if (dayNum > memberData.getRentFreeDays()) {
payMoney = dayPrice * (dayNum - memberData.getRentFreeDays()) + priceBean.getData().getDeposit();
carAmount = dayPrice * (dayNum - info.getRentFreeDays());
carAmount = dayPrice * (dayNum - memberData.getRentFreeDays());
OrderPriceDetailBean.ChildrenBean childrenBean1 = new OrderPriceDetailBean.ChildrenBean();
childrenBean1.setKey("车辆租赁费");
childrenBean1.setDetail("¥" + dayPrice + "/天 *" + (dayNum - info.getRentFreeDays()) + "天");
childrenBean1.setVal("¥" + dayPrice * (dayNum - info.getRentFreeDays()));
childrenBean1.setDetail("¥" + dayPrice + "/天 *" + (dayNum - memberData.getRentFreeDays()) + "天");
childrenBean1.setVal("¥" + dayPrice * (dayNum - memberData.getRentFreeDays()));
childrenBeanList.add(childrenBean1);
} else if (dayNum <= info.getRentFreeDays()) {
} else if (dayNum <= memberData.getRentFreeDays()) {
payMoney = priceBean.getData().getDeposit();
carAmount = 0;
}
......
......@@ -26,7 +26,7 @@ public class OrderMenuAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
helper.setText(R.id.tv_title, item);
if (selectPosition == getPosition(item)) {
helper.setTextColor(R.id.tv_title, ContextCompat.getColor(mContext, R.color.colorAuxiliaryYellow));
helper.setTextColor(R.id.tv_title, ContextCompat.getColor(mContext, R.color.gray_FFB74B));
helper.setGone(R.id.view_line, true);
} else {
helper.setTextColor(R.id.tv_title, ContextCompat.getColor(mContext, R.color.textMain));
......
......@@ -169,43 +169,47 @@ public class CarTypeListBean extends BaseBean implements Serializable {
private int score;
private String coverPic;
private String posterBackground;
private OrderMemberBean.DataBean member;
public void setMember(OrderMemberBean.DataBean member) {
this.member = member;
}
public double getSum() {
BeanUserInfo.UserInfo info = null;
String spStringCode = UtilsManager.getInstance(OkGoUtil.application).getSPStringCode(SPConstance.USER_JSON, SPConstance.USER_JSON_USERINFO);
if (!TextUtil.isEmpty(spStringCode)) {
info = JSON.parseObject(spStringCode, BeanUserInfo.UserInfo.class);
}
// BeanUserInfo.UserInfo info = null;
// String spStringCode = UtilsManager.getInstance(OkGoUtil.application).getSPStringCode(SPConstance.USER_JSON, SPConstance.USER_JSON_USERINFO);
// if (!TextUtil.isEmpty(spStringCode)) {
// info = JSON.parseObject(spStringCode, BeanUserInfo.UserInfo.class);
// }
double amount = price;
if (info == null) {
if (member == null) {
return price;
}
if (0 == info.getIsMember()) { //不是会员
// if (0 == member.getIsMember()) { //不是会员
// amount = price;
// } else if (1 == info.getIsMember()) { //会员
if (0 == rentDiscountStatus) {
amount = price;
} else if (1 == info.getIsMember()) { //会员
if (0 == rentDiscountStatus) {
amount = price;
} else if (1 == rentDiscountStatus) {
double discount = info.getDiscount() * 0.01;
amount = price * discount;
} else if (2 == rentDiscountStatus) {
if (!TextUtil.isEmpty(rentDiscountPrice)){
String[] list = rentDiscountPrice.split(",");
int memberLevel = info.getMemberLevel();//1 普通会员 2 黄金会员 3 钻石会员
if (list !=null && list.length >1){
if (1==memberLevel){
amount = Integer.valueOf(list[0]);
}else if (2==memberLevel){
amount = Integer.valueOf(list[1]);
}else if (3==memberLevel){
amount = Integer.valueOf(list[2]);
}
} else if (1 == rentDiscountStatus) {
double discount = member.getDiscount() * 0.01;
amount = price * discount;
} else if (2 == rentDiscountStatus) {
if (!TextUtil.isEmpty(rentDiscountPrice)) {
String[] list = rentDiscountPrice.split(",");
int memberLevel = member.getMemberLevel();//1 普通会员 2 黄金会员 3 钻石会员
if (list != null && list.length > 1) {
if (1 == memberLevel) {
amount = Integer.valueOf(list[0]);
} else if (2 == memberLevel) {
amount = Integer.valueOf(list[1]);
} else if (3 == memberLevel) {
amount = Integer.valueOf(list[2]);
}
}
}
}
// }
return new BigDecimal(amount).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
}
......
package com.rv.home.rv.module.ui.main.home.bean;
import com.ruiwenliu.wrapper.base.BaseBean;
/**
* 会员信息
*/
public class OrderMemberBean extends BaseBean {
private DataBean data;
private boolean rel;
public DataBean getData() {
return data;
}
public void setData(DataBean data) {
this.data = data;
}
public boolean isRel() {
return rel;
}
public void setRel(boolean rel) {
this.rel = rel;
}
public static class DataBean {
private String id;//": 97,
private String userId;//": 284,
private int memberLevel;//": 3 , 会员等级
private int totalNumber;//": 40, 总天数
private int rentFreeDays;//": 35, 剩余天数
private int buyCount;//": 4, 购买次数
private String validTime;//": 0,
private String name;//": "钻石会员",
private int discount;//":"8" 折扣
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public int getMemberLevel() {
return memberLevel;
}
public void setMemberLevel(int memberLevel) {
this.memberLevel = memberLevel;
}
public int getTotalNumber() {
return totalNumber;
}
public void setTotalNumber(int totalNumber) {
this.totalNumber = totalNumber;
}
public int getRentFreeDays() {
return rentFreeDays;
}
public void setRentFreeDays(int rentFreeDays) {
this.rentFreeDays = rentFreeDays;
}
public int getBuyCount() {
return buyCount;
}
public void setBuyCount(int buyCount) {
this.buyCount = buyCount;
}
public String getValidTime() {
return validTime;
}
public void setValidTime(String validTime) {
this.validTime = validTime;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getDiscount() {
return discount;
}
public void setDiscount(int discount) {
this.discount = discount;
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="8dp" />
<corners android:radius="50dp" />
<solid android:color="@color/textLightGrey" />
</shape>
\ No newline at end of file
......@@ -8,7 +8,7 @@
<com.ruiwenliu.wrapper.statusbar.StatusBarHeightView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorAuxiliaryYellow"
android:background="@color/gray_FFB74B"
android:orientation="vertical"
app:use_type="use_padding_top">
......@@ -16,7 +16,7 @@
android:id="@+id/lay_title"
android:layout_width="match_parent"
android:layout_height="@dimen/size_55"
android:background="@color/colorAuxiliaryYellow">
android:background="@color/gray_FFB74B">
<ImageView
android:id="@+id/iv_back"
......
......@@ -6,7 +6,7 @@
android:orientation="vertical">
<com.ruiwenliu.wrapper.statusbar.StatusBarHeightView
android:background="@color/colorAuxiliaryYellow"
android:background="@color/gray_FFB74B"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
......@@ -16,7 +16,7 @@
android:id="@+id/lay_title"
android:layout_width="match_parent"
android:layout_height="@dimen/size_55"
android:background="@color/colorAuxiliaryYellow">
android:background="@color/gray_FFB74B">
<ImageView
android:id="@+id/iv_back"
......
......@@ -846,7 +846,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/rv_contract_agreement"
android:textColor="@color/colorAuxiliaryYellow"
android:textColor="@color/gray_FFB74B"
android:textSize="@dimen/text_16" />
</LinearLayout>
</LinearLayout>
......
......@@ -184,7 +184,7 @@
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/colorAuxiliaryYellow"
android:textColor="@color/gray_FFB74B"
android:id="@+id/tv_agreement"
android:textSize="@dimen/text_16"
android:text="@string/rv_registered_agreement"
......
......@@ -16,7 +16,7 @@
/>
<View
android:background="@color/colorAuxiliaryYellow"
android:background="@color/gray_FFB74B"
android:layout_marginTop="@dimen/size_15"
android:id="@+id/view_line"
android:layout_width="@dimen/size_60"
......
......@@ -3,9 +3,15 @@
package="com.rv.rvmine">
<application>
<activity android:name=".personal.IDCardCertificationShowActivity"></activity>
<activity android:name=".traveler.TravelSettingsActivity" />
<activity android:name=".traveler.MyReleaseActivity" />
<activity
android:name=".personal.IDCardCertificationShowActivity"
android:screenOrientation="portrait" />
<activity
android:name=".traveler.TravelSettingsActivity"
android:screenOrientation="portrait" />
<activity
android:name=".traveler.MyReleaseActivity"
android:screenOrientation="portrait" />
<activity android:name="com.rv.version.activity.UpdateAppActivity" />
</application>
......
......@@ -11,6 +11,7 @@ import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.base.utils.ui.datetime.selector.util.TextUtil;
......@@ -20,14 +21,15 @@ import com.frame.base.bus.RxBus;
import com.frame.rv.config.RvFrameConfig;
import com.ruiwenliu.wrapper.base.BaseBean;
import com.ruiwenliu.wrapper.base.BaseStatusActivity;
import com.ruiwenliu.wrapper.base.presenter.PickerPresenter;
import com.ruiwenliu.wrapper.bean.UserInfoBean;
import com.ruiwenliu.wrapper.util.ViewHolder;
import com.ruiwenliu.wrapper.util.glide.GlideManager;
import com.ruiwenliu.wrapper.util.permission.RxPermission;
import com.ruiwenliu.wrapper.weight.TitleView;
import com.rv.home.rv.module.ApiConfig;
import com.rv.component.dialog.PickerDialog;
import com.ruiwenliu.wrapper.base.presenter.PickerPresenter;
import com.rv.component.utils.IsAppInstall;
import com.rv.home.rv.module.ApiConfig;
import com.rv.home.rv.module.ui.main.home.bean.ImageUploadBean;
import com.rv.rvmine.R;
import com.rv.rvmine.R2;
......@@ -47,6 +49,7 @@ import java.util.LinkedHashMap;
import java.util.Map;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import io.reactivex.functions.Consumer;
import okhttp3.MediaType;
......@@ -76,6 +79,10 @@ public class PersonalInformationActivity extends BaseStatusActivity<PickerPresen
TextView tvBindingQq;
@BindView(R2.id.tv_binding_wx)
TextView tvBindingWx;
@BindView(R2.id.ll_item_binding_qq)
LinearLayout llItemBindingQq;
@BindView(R2.id.ll_item_binding_wechat)
LinearLayout llItemBindingWechat;
private UserInfoBean.UserInfo info;
private String ivAvatarUrl;
public ProgressDialog dialog;
......@@ -152,14 +159,18 @@ public class PersonalInformationActivity extends BaseStatusActivity<PickerPresen
if (TextUtils.isEmpty(info.getWxOpenid())) {
tvBindingWx.setText("去授权绑定微信");
llItemBindingWechat.setEnabled(true);
} else {
tvBindingWx.setText("已绑定");
llItemBindingWechat.setEnabled(false);
}
if (TextUtils.isEmpty(info.getOpenid())) {
tvBindingQq.setText("去授权绑定QQ");
llItemBindingQq.setEnabled(true);
} else {
tvBindingQq.setText("已绑定");
llItemBindingQq.setEnabled(false);
}
}
}
......@@ -192,7 +203,7 @@ public class PersonalInformationActivity extends BaseStatusActivity<PickerPresen
String url = mPresenter.gerCameraStoreUrl();
GlideManager.getInstance(mActivity).loadImage(url, ivAvatar);
uploadFile(new File(mPresenter.gerCameraStoreUrl()), "camera");
}else {
} else {
UMShareAPI.get(mActivity).onActivityResult(requestCode, resultCode, data);
}
......@@ -214,10 +225,18 @@ public class PersonalInformationActivity extends BaseStatusActivity<PickerPresen
} else if (id == R.id.ll_item_binding_qq) {
//绑定qq
if (!IsAppInstall.isQQClientAvailable(mActivity)) {
showToast("亲,您QQ还没有安装呢");
return;
}
bindThirdParty(SHARE_MEDIA.QQ);
} else if (id == R.id.ll_item_binding_wechat) {
//绑定微信
if (!IsAppInstall.isWeixinAvilible(mActivity)) {
showToast("亲,您微信还没有安装呢");
return;
}
bindThirdParty(SHARE_MEDIA.WEIXIN);
}
}
......@@ -425,6 +444,13 @@ public class PersonalInformationActivity extends BaseStatusActivity<PickerPresen
UMShareAPI.get(mActivity).onSaveInstanceState(outState);
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// TODO: add setContentView(...) invocation
ButterKnife.bind(this);
}
private class UserInfo {
private String id;//":23,
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="8dp" />
<corners android:radius="50dp" />
<solid android:color="@color/colorGray" />
</shape>
\ No newline at end of file
......@@ -61,6 +61,7 @@
android:hint="请输入昵称"
android:maxLength="10"
android:maxLines="1"
android:textColor="@color/colorMain"
android:textColorHint="@color/colorGray"
android:textSize="@dimen/text_16" />
</LinearLayout>
......@@ -128,8 +129,10 @@
android:layout_marginLeft="@dimen/size_15"
android:layout_weight="1"
android:gravity="right|center_vertical"
android:text="请选择出生年月"
android:textColor="@color/colorGray"
android:hint="请选择出生年月"
android:text=""
android:textColor="@color/colorMain"
android:textColorHint="@color/colorGray"
android:textSize="@dimen/text_16" />
<ImageView
......@@ -162,8 +165,10 @@
android:layout_marginLeft="@dimen/size_15"
android:layout_weight="1"
android:gravity="right|center_vertical"
android:text="请选择性别"
android:textColor="@color/colorGray"
android:hint="请选择性别"
android:text=""
android:textColor="@color/colorMain"
android:textColorHint="@color/colorGray"
android:textSize="@dimen/text_16" />
<ImageView
......@@ -201,6 +206,7 @@
android:inputType="phone|number"
android:maxLength="11"
android:maxLines="1"
android:textColor="@color/colorMain"
android:textColorHint="@color/colorGray"
android:textSize="@dimen/text_16" />
</LinearLayout>
......@@ -268,8 +274,10 @@
android:layout_marginLeft="@dimen/size_15"
android:layout_weight="1"
android:gravity="right|center_vertical"
android:text="去授权绑定QQ"
android:textColor="@color/colorGray"
android:hint="去授权绑定QQ"
android:text=""
android:textColor="@color/colorMain"
android:textColorHint="@color/colorGray"
android:textSize="@dimen/text_16" />
<ImageView
......@@ -302,8 +310,10 @@
android:layout_marginLeft="@dimen/size_15"
android:layout_weight="1"
android:gravity="right|center_vertical"
android:text="去授权绑定微信"
android:textColor="@color/colorGray"
android:hint="去授权绑定微信"
android:text=""
android:textColor="@color/colorMain"
android:textColorHint="@color/colorGray"
android:textSize="@dimen/text_16" />
<ImageView
......
......@@ -154,9 +154,9 @@
android:id="@+id/tv_out_sign"
android:layout_width="match_parent"
android:layout_height="@dimen/size_50"
android:layout_marginLeft="@dimen/size_40"
android:layout_marginLeft="@dimen/size_20"
android:layout_marginTop="@dimen/size_70"
android:layout_marginRight="@dimen/size_40"
android:layout_marginRight="@dimen/size_20"
android:background="@drawable/shape_rv_button_light_gray"
android:gravity="center"
android:text="退出登录"
......
......@@ -545,7 +545,7 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/colorYellow"
android:background="@color/gray_FFB74B"
android:gravity="center"
android:text="确认订单"
android:textColor="@color/colorWrite"
......
......@@ -113,10 +113,9 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/colorAuxiliaryYellow"
android:background="@color/gray_FFB74B"
android:gravity="center"
android:text="立即预订"
android:textColor="@color/colorWrite"
android:textSize="@dimen/text_14" />
......
......@@ -23,7 +23,7 @@ public class CouponMenuAdapter extends BaseQuickAdapter<String, BaseViewHolder>
helper.setText(R.id.tv_title, item);
if (selectPosition == getPosition(item)) {
helper.setTextColor(R.id.tv_title, ContextCompat.getColor(mContext, R.color.colorAuxiliaryYellow));
helper.setTextColor(R.id.tv_title, ContextCompat.getColor(mContext, R.color.gray_FFB74B));
helper.setGone(R.id.view_line, true);
} else {
helper.setTextColor(R.id.tv_title, ContextCompat.getColor(mContext, R.color.textMain));
......
......@@ -16,7 +16,7 @@
/>
<View
android:background="@color/colorAuxiliaryYellow"
android:background="@color/gray_FFB74B"
android:layout_marginTop="@dimen/size_15"
android:id="@+id/view_line"
android:layout_width="@dimen/size_60"
......
......@@ -56,7 +56,6 @@ import butterknife.OnClick;
@Route(path = Constance.ACTIVITY_URL_POSTERACTIVITY)
public class PosterActivity extends BaseStatusActivity<CommonPresenter> {
@BindView(R2.id.img_bill_top)
ImageView imgBillTop;
@BindView(R2.id.ring_header)
......
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 to comment