Commit 8c56bbef authored by jianglx's avatar jianglx

Merge branch 'dev_im' into 'master'

版本1.5.1代码合并到主分支

See merge request !2
parents 25d2cdd5 4ce18513
...@@ -8,8 +8,8 @@ android { ...@@ -8,8 +8,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion
flavorDimensions "default" flavorDimensions "default"
versionCode 154 versionCode 151
versionName "1.5.4" versionName "1.5.1"
multiDexEnabled true multiDexEnabled true
......
...@@ -69,8 +69,10 @@ public class RvClientApplication extends FrameApp { ...@@ -69,8 +69,10 @@ public class RvClientApplication extends FrameApp {
ShareInstall.getInstance().init(this); ShareInstall.getInstance().init(this);
ShareInstall.getInstance().reportRegister(); ShareInstall.getInstance().reportRegister();
} }
LogUtil.setLogEnable(true, getApplicationContext()); LogUtil.setLogEnable(BuildConfig.DEBUG, getApplicationContext());
CrashHandler.getInstance().init(getApplicationContext()); if(BuildConfig.DEBUG){
CrashHandler.getInstance().init(getApplicationContext());
}
// 在使用 SDK 各组间之前初始化 context 信息,传入 ApplicationContext // 在使用 SDK 各组间之前初始化 context 信息,传入 ApplicationContext
SDKInitializer.initialize(this); SDKInitializer.initialize(this);
//自4.3.0起,百度地图SDK所有接口均支持百度坐标和国测局坐标,用此方法设置您使用的坐标类型. //自4.3.0起,百度地图SDK所有接口均支持百度坐标和国测局坐标,用此方法设置您使用的坐标类型.
......
...@@ -1077,15 +1077,16 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements Observa ...@@ -1077,15 +1077,16 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements Observa
case 3: case 3:
rvTourLatitude = lat; rvTourLatitude = lat;
rvTourLongitude = lon; rvTourLongitude = lon;
if (tvRvCity != null) { if (tvRvCity != null && !TextUtils.isEmpty(data)) {
tvRvCity.setText(data); tvRvCity.setText(data);
} }
break; break;
case 4: case 4:
if(travelCityText != null && !TextUtils.isEmpty(data))
travelCityText.setText(data); travelCityText.setText(data);
// headTvGetCity.setText(data); // headTvGetCity.setText(data);
// headTvOutCity.setText(data); // headTvOutCity.setText(data);
if (tvRvCity != null) { if (tvRvCity != null && !TextUtils.isEmpty(data)) {
tvRvCity.setText(data); tvRvCity.setText(data);
} }
getShopList(false); getShopList(false);
......
...@@ -550,7 +550,11 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl ...@@ -550,7 +550,11 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl
if (info != null) { if (info != null) {
GlideManager.getInstance(_mActivity).loadImage(info.getHeadimgurl(), ivAvatar); GlideManager.getInstance(_mActivity).loadImage(info.getHeadimgurl(), ivAvatar);
tvNickname.setText(info.getNickname()); tvNickname.setText(info.getNickname());
tvCapacity.setText(info.getPositionName()); if(!TextUtils.isEmpty(info.getPositionName())){
tvCapacity.setText(info.getPositionName());
tvCapacity.setVisibility(View.VISIBLE);
}
//更新实名信息 //更新实名信息
UtilsManager.getInstance(OkGoUtil.application).setSharePreferencesSave(SPConstance.USER_JSON).putString(SPConstance.USER_JSON_USERINFO, JSON.toJSONString(info)).commit(); UtilsManager.getInstance(OkGoUtil.application).setSharePreferencesSave(SPConstance.USER_JSON).putString(SPConstance.USER_JSON_USERINFO, JSON.toJSONString(info)).commit();
if (info.getCertificationStatus() == 0) { //实名认证状态:0-未认证,1-已认证 if (info.getCertificationStatus() == 0) { //实名认证状态:0-未认证,1-已认证
......
...@@ -192,8 +192,8 @@ public class BindPhoneSecondFragment extends BaseFragment<CommonPresenter> { ...@@ -192,8 +192,8 @@ public class BindPhoneSecondFragment extends BaseFragment<CommonPresenter> {
} }
@Override @Override
public void onStop() { public void onDestroyView() {
super.onStop(); super.onDestroyView();
stopCarousel(); stopCarousel();
} }
......
...@@ -205,8 +205,8 @@ public class BindPhoneThirdFragment extends BaseFragment<CommonPresenter> { ...@@ -205,8 +205,8 @@ public class BindPhoneThirdFragment extends BaseFragment<CommonPresenter> {
} }
@Override @Override
public void onStop() { public void onDestroyView() {
super.onStop(); super.onDestroyView();
stopCarousel(); stopCarousel();
} }
......
...@@ -42,7 +42,6 @@ import com.yuyife.okgo.OkGoUtil; ...@@ -42,7 +42,6 @@ import com.yuyife.okgo.OkGoUtil;
import java.util.HashMap; import java.util.HashMap;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;
import java.util.Set;
import butterknife.BindView; import butterknife.BindView;
import butterknife.OnClick; import butterknife.OnClick;
...@@ -224,18 +223,6 @@ public class AccountSafeActivity extends BaseStatusActivity<CommonPresenter> imp ...@@ -224,18 +223,6 @@ public class AccountSafeActivity extends BaseStatusActivity<CommonPresenter> imp
} }
private void setQqInfo() { private void setQqInfo() {
hasBindWX = bean.getData().isBindWx();
if (hasBindWX) {
String wx = bean.getData().getWxNickname();
tvWx.setTextColor(Color.parseColor("#171413"));
tvWx.setText(!TextUtils.isEmpty(wx) ? wx : "已绑定");
} else {
tvWx.setTextColor(Color.parseColor("#cccccc"));
tvWx.setText("去授权绑定QQ");
}
}
private void setWxInfo() {
hasBindQQ = bean.getData().isBindQQ(); hasBindQQ = bean.getData().isBindQQ();
if (hasBindQQ) { if (hasBindQQ) {
String qq = bean.getData().getQqNickname(); String qq = bean.getData().getQqNickname();
...@@ -243,7 +230,19 @@ public class AccountSafeActivity extends BaseStatusActivity<CommonPresenter> imp ...@@ -243,7 +230,19 @@ public class AccountSafeActivity extends BaseStatusActivity<CommonPresenter> imp
tvQQ.setText(!TextUtils.isEmpty(qq) ? qq : "已绑定"); tvQQ.setText(!TextUtils.isEmpty(qq) ? qq : "已绑定");
} else { } else {
tvQQ.setTextColor(Color.parseColor("#cccccc")); tvQQ.setTextColor(Color.parseColor("#cccccc"));
tvQQ.setText("去授权绑定微信"); tvQQ.setText("去授权绑定QQ");
}
}
private void setWxInfo() {
hasBindWX = bean.getData().isBindWx();
if (hasBindWX) {
String wx = bean.getData().getWxNickname();
tvWx.setTextColor(Color.parseColor("#171413"));
tvWx.setText(!TextUtils.isEmpty(wx) ? wx : "已绑定");
} else {
tvWx.setTextColor(Color.parseColor("#cccccc"));
tvWx.setText("去授权绑定微信");
} }
} }
......
...@@ -53,6 +53,7 @@ public class AlterNickNameActivity extends BaseStatusActivity<CommonPresenter> { ...@@ -53,6 +53,7 @@ public class AlterNickNameActivity extends BaseStatusActivity<CommonPresenter> {
private void upUserinfo() { private void upUserinfo() {
if (TextUtils.isEmpty(getNickName())) { if (TextUtils.isEmpty(getNickName())) {
showToast("昵称不能为空"); showToast("昵称不能为空");
return;
} }
Intent intent = new Intent(); Intent intent = new Intent();
intent.putExtra("nick", getNickName()); intent.putExtra("nick", getNickName());
......
package com.rv.rvmine.view;
import android.support.annotation.IntDef;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.Locale;
/**
* <br>Email:1006368252@qq.com
* <br>QQ:1006368252
* <br><a href="https://github.com/JustinRoom/WheelViewDemo" target="_blank">https://github.com/JustinRoom/WheelViewDemo</a>
*
* @author jiangshicheng
*/
public class DateItem implements IWheel {
public static final int TYPE_YEAR = 0;
public static final int TYPE_MONTH = 1;
public static final int TYPE_DAY = 2;
public static final int TYPE_HOUR = 3;
public static final int TYPE_MINUTE = 4;
@IntDef({TYPE_YEAR, TYPE_MONTH, TYPE_DAY, TYPE_HOUR, TYPE_MINUTE})
@Retention(RetentionPolicy.SOURCE)
public @interface DateType {
}
private int type;
private int value;
public DateItem() {
}
public DateItem(int value) {
this(TYPE_YEAR, value);
}
public DateItem(@DateType int type, int value) {
this.type = type;
this.value = value;
}
public int getValue() {
return value;
}
public void setValue(int value) {
this.value = value;
}
@Override
public String getShowText() {
return String.format(Locale.CHINA, getFormatStringByType(), (value < 10 ? "0" + value : "" + value));
}
private String getFormatStringByType() {
String result = "";
switch (type) {
case TYPE_YEAR:
result = "%s年";
break;
case TYPE_MONTH:
result = "%s月";
break;
case TYPE_DAY:
result = "%s日";
break;
case TYPE_HOUR:
result = "%s时";
break;
case TYPE_MINUTE:
result = "%s分";
break;
}
return result;
}
}
package com.rv.rvmine.view;
public interface IWheel {
String getShowText();
}
package com.rv.rvmine.view;
import android.support.annotation.ColorInt;
public interface IWheelViewSetting {
void setTextSize(float textSize);
void setTextColor(@ColorInt int textColor);
void setShowCount(int showCount);
void setTotalOffsetX(int totalOffsetX);
void setItemVerticalSpace(int itemVerticalSpace);
void setItems(IWheel[] items);
int getSelectedIndex();
void setSelectedIndex(int targetIndexPosition);
void setSelectedIndex(int targetIndexPosition, boolean withAnimation);
void setOnSelectedListener(WheelView.OnSelectedListener onSelectedListener);
boolean isScrolling();
}
package com.rv.rvmine.view;
public class WheelItem implements IWheel {
String label;
public WheelItem(String label) {
this.label = label;
}
@Override
public String getShowText() {
return label;
}
}
package com.rv.rvmine.view;
import android.content.Context;
import android.support.annotation.ColorInt;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.ViewGroup;
import android.widget.FrameLayout;
public class WheelItemView extends FrameLayout implements IWheelViewSetting {
private WheelView wheelView;
private WheelMaskView wheelMaskView;
public WheelItemView(@NonNull Context context) {
super(context);
initAttr(context, null, 0);
}
public WheelItemView(@NonNull Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
initAttr(context, attrs, 0);
}
public WheelItemView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
initAttr(context, attrs, defStyleAttr);
}
private void initAttr(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
wheelView = new WheelView(context);
wheelView.initAttr(context, attrs, defStyleAttr);
wheelMaskView = new WheelMaskView(context);
wheelMaskView.initAttr(context, attrs, defStyleAttr);
addView(wheelView, new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
addView(wheelMaskView, new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
ViewGroup.LayoutParams params = wheelMaskView.getLayoutParams();
params.height = wheelView.getMeasuredHeight();
wheelMaskView.setLayoutParams(params);
wheelMaskView.updateMask(wheelView.getShowCount(), wheelView.getItemHeight());
}
@Override
public void setTextSize(float textSize) {
wheelView.setTextSize(textSize);
}
@Override
public void setTextColor(@ColorInt int textColor) {
wheelView.setTextColor(textColor);
}
@Override
public void setShowCount(int showCount) {
wheelView.setShowCount(showCount);
}
@Override
public void setTotalOffsetX(int totalOffsetX) {
wheelView.setTotalOffsetX(totalOffsetX);
}
@Override
public void setItemVerticalSpace(int itemVerticalSpace) {
wheelView.setItemVerticalSpace(itemVerticalSpace);
}
@Override
public void setItems(IWheel[] items) {
wheelView.setItems(items);
}
@Override
public int getSelectedIndex() {
return wheelView.getSelectedIndex();
}
@Override
public void setSelectedIndex(int targetIndexPosition) {
setSelectedIndex(targetIndexPosition, true);
}
@Override
public void setSelectedIndex(int targetIndexPosition, boolean withAnimation) {
wheelView.setSelectedIndex(targetIndexPosition, withAnimation);
}
@Override
public void setOnSelectedListener(WheelView.OnSelectedListener onSelectedListener) {
wheelView.setOnSelectedListener(onSelectedListener);
}
public void setMaskLineColor(@ColorInt int color) {
wheelMaskView.setLineColor(color);
}
@Override
public boolean isScrolling() {
return wheelView.isScrolling();
}
public WheelView getWheelView() {
return wheelView;
}
public WheelMaskView getWheelMaskView() {
return wheelMaskView;
}
}
package com.rv.rvmine.view;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.support.annotation.ColorInt;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.View;
import com.rv.rvmine.R;
public class WheelMaskView extends View {
private Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
private int top = 0;
private int bottom = 0;
private int lineColor = 0xFFEEEEEE;
public WheelMaskView(Context context) {
super(context);
initAttr(context, null, 0);
}
public WheelMaskView(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
initAttr(context, attrs, 0);
}
public WheelMaskView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
initAttr(context, attrs, defStyleAttr);
}
public void initAttr(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.WheelMaskView, defStyleAttr, 0);
lineColor = a.getColor(R.styleable.WheelMaskView_wheelMaskLineColor, 0xFFEEEEEE);
a.recycle();
paint.setStyle(Paint.Style.STROKE);
paint.setStrokeWidth(1);
}
public void updateMask(int heightCount, int itemHeight) {
if (heightCount > 0) {
int centerIndex = heightCount / 2;
top = centerIndex * itemHeight;
bottom = top + itemHeight;
} else {
top = 0;
bottom = 0;
}
invalidate();
}
public void setLineColor(@ColorInt int lineColor) {
this.lineColor = lineColor;
invalidate();
}
@Override
protected void onDraw(Canvas canvas) {
if (top > 0 && bottom > 0) {
paint.setColor(lineColor);
canvas.drawLine(0, top, getWidth(), top, paint);
canvas.drawLine(0, bottom, getWidth(), bottom, paint);
}
}
}
This diff is collapsed.
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:contentDescription="手机号" android:contentDescription="手机号"
android:textColor="@color/colorMain" android:textColor="@color/colorMain"
android:drawablePadding="3dp" android:drawablePadding="8dp"
android:drawableRight="@drawable/common_icon_rig_black_gray" android:drawableRight="@drawable/common_icon_rig_black_gray"
android:textSize="@dimen/sp_16" /> android:textSize="@dimen/sp_16" />
</RelativeLayout> </RelativeLayout>
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:drawableRight="@drawable/common_icon_rig_black_gray" android:drawableRight="@drawable/common_icon_rig_black_gray"
android:drawablePadding="@dimen/size_3" android:drawablePadding="8dp"
android:text="去授权绑定QQ" android:text="去授权绑定QQ"
android:textColor="#CCCCCC" android:textColor="#CCCCCC"
android:textSize="@dimen/sp_16" /> android:textSize="@dimen/sp_16" />
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:drawableRight="@drawable/common_icon_rig_black_gray" android:drawableRight="@drawable/common_icon_rig_black_gray"
android:drawablePadding="@dimen/size_3" android:drawablePadding="8dp"
android:text="去授权绑定微信" android:text="去授权绑定微信"
android:textColor="#CCCCCC" android:textColor="#CCCCCC"
android:textSize="@dimen/sp_16" /> android:textSize="@dimen/sp_16" />
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:drawableRight="@drawable/common_icon_rig_black_gray" android:drawableRight="@drawable/common_icon_rig_black_gray"
android:drawablePadding="@dimen/size_3" android:drawablePadding="8dp"
android:text="去授权绑定支付宝" android:text="去授权绑定支付宝"
android:textColor="#CCCCCC" android:textColor="#CCCCCC"
android:textSize="@dimen/sp_16" /> android:textSize="@dimen/sp_16" />
......
...@@ -161,6 +161,7 @@ ...@@ -161,6 +161,7 @@
</LinearLayout> </LinearLayout>
<TextView <TextView
android:visibility="gone"
android:id="@+id/tv_capacity" android:id="@+id/tv_capacity"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
......
...@@ -57,8 +57,8 @@ ...@@ -57,8 +57,8 @@
android:layout_marginLeft="@dimen/size_15" android:layout_marginLeft="@dimen/size_15"
android:layout_weight="1" android:layout_weight="1"
android:background="@null" android:background="@null"
android:drawableRight="@drawable/common_icon_rig_black" android:drawableRight="@drawable/common_icon_rig_black_gray"
android:drawablePadding="3dp" android:drawablePadding="8dp"
android:ellipsize="end" android:ellipsize="end"
android:gravity="right|center_vertical" android:gravity="right|center_vertical"
android:maxLength="32" android:maxLength="32"
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_8" android:layout_marginLeft="@dimen/size_8"
android:src="@drawable/common_icon_rig_black" /> android:src="@drawable/common_icon_rig_black_gray" />
</LinearLayout> </LinearLayout>
<include layout="@layout/common_line" /> <include layout="@layout/common_line" />
...@@ -179,7 +179,7 @@ ...@@ -179,7 +179,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_8" android:layout_marginLeft="@dimen/size_8"
android:src="@drawable/common_icon_rig_black" /> android:src="@drawable/common_icon_rig_black_gray" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
......
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:drawableRight="@drawable/common_icon_rig_black_gray" android:drawableRight="@drawable/common_icon_rig_black_gray"
android:drawablePadding="@dimen/size_3" android:drawablePadding="8dp"
android:textColor="#171413" android:textColor="#171413"
android:textSize="@dimen/sp_12" /> android:textSize="@dimen/sp_12" />
</RelativeLayout> </RelativeLayout>
......
<?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:layout_marginLeft="@dimen/size_30"
android:layout_marginRight="@dimen/size_30"
android:background="@drawable/shape_rv_bg_write"
android:orientation="vertical">
<TextView
android:textStyle="bold"
android:layout_width="match_parent"
android:layout_height="@dimen/size_50"
android:gravity="center"
android:text="生日"
android:textColor="@color/colorMain"
android:textSize="@dimen/text_20" />
<include layout="@layout/common_line" />
<LinearLayout
android:id="@+id/wheel_id_picker_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" />
<Button
android:id="@+id/btn_confirm"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_40"
android:layout_marginLeft="@dimen/size_20"
android:layout_marginTop="@dimen/dp_10"
android:layout_marginRight="@dimen/size_20"
android:layout_marginBottom="@dimen/size_20"
android:background="@drawable/shape_rv_bg_fdc349"
android:gravity="center"
android:text="确定"
android:textColor="@color/white"
android:textSize="@dimen/sp_16" />
</LinearLayout>
\ No newline at end of file
...@@ -8,4 +8,13 @@ ...@@ -8,4 +8,13 @@
<item name="colorAccent">@color/colorAccent</item> <item name="colorAccent">@color/colorAccent</item>
</style> </style>
<style name="WheelDialog" parent="android:style/Theme.Dialog">
<item name="android:windowFrame">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:background">@android:color/transparent</item>
<item name="android:windowIsFloating">true</item>
<item name="android:windowContentOverlay">@null</item>
</style>
</resources> </resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="WheelView">
<attr name="wheelTextColor" format="color"/>
<attr name="wheelTextSize" format="dimension"/>
<attr name="wheelShowCount" format="integer"/>
<attr name="wheelTotalOffsetX" format="dimension"/>
<attr name="wheelItemVerticalSpace" format="dimension"/>
<attr name="wheelRotationX" format="float"/>
<attr name="wheelVelocityUnits" format="integer"/>
</declare-styleable>
<declare-styleable name="WheelMaskView">
<attr name="wheelMaskLineColor" format="color"/>
</declare-styleable>
</resources>
\ No newline at end of file
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