Commit 344b53a0 authored by linfeng's avatar linfeng

bug修复

parents ff58a37e 639d01f3
......@@ -101,6 +101,7 @@
android:allowBackup="true"
android:icon="@mipmap/logo"
android:label="@string/app_name"
android:largeHeap="true"
android:resizeableActivity="false"
android:roundIcon="@mipmap/logo"
android:supportsRtl="true"
......
......@@ -34,6 +34,7 @@ import com.rv.home.rv.module.basic.presenter.CommonPresenter;
import com.rv.home.rv.module.ui.main.home.HomeFragment;
import com.rv.home.rv.module.ui.main.home.bean.EffectiveTimeBean;
import com.rv.rvmine.MineFragment;
import com.rv.share.WebViewActivity;
import com.rv.share.view.PromotionDialog;
import com.rv.tourism.R2;
import com.rv.tourism.TourismFragment;
......@@ -52,7 +53,7 @@ import butterknife.BindView;
import butterknife.OnClick;
public class MainActivity extends BaseActivity<CommonPresenter> {
public class MainActivity extends BaseActivity<CommonPresenter>{
// @BindView(R2.id.pager_view_fragment)
CustomScrollViewPager viewPager;
......@@ -84,6 +85,8 @@ public class MainActivity extends BaseActivity<CommonPresenter> {
private final int TYPE_MINE = 4;//我的
private long exitTime = 0;
private UpdateAppUtils updateAppUtils;
private PromotionDialog promotionDialog;
......@@ -109,7 +112,7 @@ public class MainActivity extends BaseActivity<CommonPresenter> {
showTitle(false);
mAdapter = new TabAdapter(getSupportFragmentManager(), getListFragment());
viewPager.setAdapter(mAdapter);
// viewPager.setOffscreenPageLimit(3);
viewPager.setOffscreenPageLimit(5);
setCurrent(TYPE_HOME_PAGE);
SwitchFragment.setFragmentSelected(new SwitchFragment.ChangeFragment() {
......@@ -126,8 +129,6 @@ public class MainActivity extends BaseActivity<CommonPresenter> {
getEffectiveTime();
getActivityPopup();
checkVersion();
}
@Override
......@@ -166,7 +167,7 @@ public class MainActivity extends BaseActivity<CommonPresenter> {
public void onClick(View view) {
promotionDialog.dismiss();
postActivityPopup(act.getId());
startActivity(WebViewActivity.getIntent(getApplicationContext(), act.getUrl(), act.getName()));
}
}).setData(act).create();
promotionDialog.show();
......@@ -358,5 +359,4 @@ public class MainActivity extends BaseActivity<CommonPresenter> {
startActivity(in);
}
}
}
......@@ -57,7 +57,7 @@ public class RvClientApplication extends FrameApp {
ShareInstall.getInstance().reportRegister();
}
LogUtil.setLogEnable(true, getApplicationContext());
CrashHandler.getInstance().init(this);
CrashHandler.getInstance().init(getApplicationContext());
// 在使用 SDK 各组间之前初始化 context 信息,传入 ApplicationContext
SDKInitializer.initialize(this);
//自4.3.0起,百度地图SDK所有接口均支持百度坐标和国测局坐标,用此方法设置您使用的坐标类型.
......
......@@ -13,6 +13,8 @@ import com.sh.sdk.shareinstall.listener.AppGetInfoListener;
import org.json.JSONException;
import org.json.JSONObject;
import java.net.URLDecoder;
/********
* shareInstall 唤醒界面
*/
......@@ -45,7 +47,7 @@ public class WakeUpActivity extends AppCompatActivity {
}
String url = object.optString("url");
LogUtil.d("唤醒传过来的url=" + url);
String title = object.optString("title");
String title = URLDecoder.decode(object.optString("title"), "UTF-8");
LogUtil.d("唤醒传过来的tile=" + title);
if (!TextUtils.isEmpty(url) && !TextUtils.isEmpty(title)) {
Intent intent = new Intent(getApplicationContext(), MainActivity.class);
......@@ -55,7 +57,7 @@ public class WakeUpActivity extends AppCompatActivity {
startActivity(intent);
finish();
}
} catch (JSONException e) {
} catch (Exception e) {
e.printStackTrace();
}
......
......@@ -4,7 +4,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorWrite"
tools:context="com.test.rv.WelcomeActivity">
tools:context=".WakeUpActivity">
<ImageView
android:layout_width="wrap_content"
......
......@@ -91,7 +91,7 @@ public class BaseGlideHolder extends BaseViewHolder {
.load(url)
.placeholder(R.drawable.glide_icon_placeholder)
.error(R.drawable.glide_icon_error)
.apply(RequestOptions.bitmapTransform(new RoundedCorners(round)).override(50, 50))
.apply(RequestOptions.bitmapTransform(new RoundedCorners(round)).override(x, y))
.into(image);
}
......
......@@ -7,7 +7,9 @@ import android.os.SystemClock;
import android.util.Log;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.io.Writer;
......@@ -28,7 +30,7 @@ public class CrashHandler implements Thread.UncaughtExceptionHandler {
// 系统默认的UncaughtException处理类
private Thread.UncaughtExceptionHandler mDefaultHandler;
private static CrashHandler instance = new CrashHandler();
private static CrashHandler instance;
private Context mContext;
// 用来存储设备信息和异常信息
......@@ -47,6 +49,9 @@ public class CrashHandler implements Thread.UncaughtExceptionHandler {
* 获取CrashHandler实例 ,单例模式
*/
public static CrashHandler getInstance() {
if (instance == null) {
instance = new CrashHandler();
}
return instance;
}
......@@ -131,7 +136,7 @@ public class CrashHandler implements Thread.UncaughtExceptionHandler {
* @return 返回文件名称, 便于将文件传送到服务器
* @throws Exception
*/
private String saveCrashInfoFile(Throwable ex) throws Exception {
private String saveCrashInfoFile(Throwable ex) {
StringBuffer sb = new StringBuffer();
try {
SimpleDateFormat sDateFormat = new SimpleDateFormat(
......@@ -167,23 +172,33 @@ public class CrashHandler implements Thread.UncaughtExceptionHandler {
return null;
}
private String writeFile(String sb) throws Exception {
private String writeFile(String sb) {
String time = formatter.format(new Date());
String fileName = "crash-" + time + ".log";
String path = getGlobalpath();
File dir = new File(path);
if (!dir.exists())
dir.mkdirs();
FileOutputStream fos = new FileOutputStream(path + fileName, true);
fos.write(sb.getBytes());
fos.flush();
fos.close();
FileOutputStream fos = null;
try {
fos = new FileOutputStream(path + fileName, true);
fos.write(sb.getBytes());
fos.flush();
} catch (Exception e) {
e.printStackTrace();
} finally {
if (fos != null) {
try {
fos.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
return fileName;
}
public String getGlobalpath() {
// return mContext.getCacheDir().getPath() + File.separator + "crash" + File.separator;
// return Environment.getExternalStorageDirectory().getPath() + File.separator + "crash" + File.separator;
return mContext.getExternalCacheDir().getPath() + File.separator + "crash" + File.separator;
}
......
......@@ -2,6 +2,7 @@ package com.rv.home.rv.module.ui.main.home;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
......@@ -165,11 +166,11 @@ public class CarDetailActivity extends BaseStatusActivity<CommonPresenter> {
@Override
public void onShowResult(int requestType, BaseBean result) {
switch (requestType){
case 0:
userInfoData((UserInfoBean) result);
break;
}
switch (requestType) {
case 0:
userInfoData((UserInfoBean) result);
break;
}
}
private void userInfoData(UserInfoBean infoBean) {
......@@ -323,10 +324,9 @@ public class CarDetailActivity extends BaseStatusActivity<CommonPresenter> {
mWebView.setWebChromeClient(new WebChromeClient() {
@Override
public void onProgressChanged(WebView view, int newProgress) {
if(newProgress==100){
if (newProgress == 100) {
pbProgress.setVisibility(View.GONE);//加载完网页进度条消失
}
else{
} else {
pbProgress.setVisibility(View.VISIBLE);//开始加载网页时显示进度条
pbProgress.setProgress(newProgress);//设置进度值
}
......@@ -351,7 +351,7 @@ public class CarDetailActivity extends BaseStatusActivity<CommonPresenter> {
.withString("name", mCarBean.getVehicleModel().getName())
.withString("keyword", mCarBean.getVehicleModel().getKeyword())
.withDouble("price", mCarBean.getVehicleModel().getPrice())
.withString("url",url)
.withString("url", url)
.navigation();
} else if (snsPlatform.mShowWord.equals("复制链接")) {
......@@ -421,6 +421,14 @@ public class CarDetailActivity extends BaseStatusActivity<CommonPresenter> {
}
}
@JavascriptInterface
public void toMemberCenter() {
ComponentName componentName = new ComponentName(getApplicationContext(), "com.rv.member.MemberCenterActivity");
Intent in = new Intent();
in.setComponent(componentName);
startActivity(in);
}
}
/**
......
......@@ -200,6 +200,8 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements Observa
private double lonLongitude;
private LatLng mLatLng;//当前城市经纬度
private String getCompanyName;
private String outCompanyName;
private int getCompanyId; // 取车公司id
private int outCompanyId; // 取车公司id;
private double getLatitude;
......@@ -621,9 +623,9 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements Observa
}
sendData(getCityName,
headTvGetShop.getText().toString().trim(),
getCompanyName,
outCityName,
headTvOutShop.getText().toString().trim(),
outCompanyName,
begDate, endDate, copyDay,
begDate,
endDate
......@@ -789,22 +791,22 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements Observa
switch (requestCode) {
case TYPE_REQUEST_CITY://城市列表
if (type == 1) {
String companyName = data.getStringExtra("company");
getCompanyName = data.getStringExtra("company");
getCompanyId = data.getIntExtra("company_id", 1);
getCityName = requestData;
getCityId = data.getIntExtra("id", 0);
String getAddress = "%s(%s)";
headTvGetShop.setText(String.format(getAddress, new Object[]{companyName, getCityName}));
headTvGetShop.setText(String.format(getAddress, new Object[]{getCompanyName, getCityName}));
getLatitude = data.getDoubleExtra("latitude", 0);
getLongitude = data.getDoubleExtra("longitude", 0);
setRequestData(type, requestData, getLatitude, getLongitude);
} else if (type == 2) {
String companyName = data.getStringExtra("company");
outCompanyName = data.getStringExtra("company");
outCompanyId = data.getIntExtra("company_id", 1);
outCityName = requestData;
outCityId = data.getIntExtra("id", 0);
String outAddress = "%s(%s)";
headTvOutShop.setText(String.format(outAddress, new Object[]{companyName, outCityName}));
headTvOutShop.setText(String.format(outAddress, new Object[]{outCompanyName, outCityName}));
outLatitude = data.getDoubleExtra("latitude", 0);
outLongitude = data.getDoubleExtra("longitude", 0);
setRequestData(type, requestData, outLatitude, outLongitude);
......@@ -944,7 +946,8 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements Observa
if (bean.getData() != null && bean.getData().getTotalCount() > 0) {
if (headTvGetShop != null) {
String getAdress = "%s(%s)";
headTvGetShop.setText(String.format(getAdress, new Object[]{bean.getData().getData().get(0).getName(), getCityName}));
getCompanyName = bean.getData().getData().get(0).getName();
headTvGetShop.setText(String.format(getAdress, new Object[]{getCompanyName, getCityName}));
headTvGetShop.setTextColor(_mActivity.getResources().getColor(R.color.colorMain));
getLatitude = bean.getData().getData().get(0).getLatitude();
getLongitude = bean.getData().getData().get(0).getLongitude();
......@@ -953,16 +956,19 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements Observa
if (headTvOutShop != null) {
String getAdress = "%s(%s)";
headTvOutShop.setText(String.format(getAdress, new Object[]{bean.getData().getData().get(0).getName(), outCityName}));
outCompanyName = bean.getData().getData().get(0).getName();
headTvOutShop.setText(String.format(getAdress, new Object[]{outCompanyName, outCityName}));
headTvOutShop.setTextColor(_mActivity.getResources().getColor(R.color.colorMain));
outLatitude = bean.getData().getData().get(0).getLatitude();
outLongitude = bean.getData().getData().get(0).getLongitude();
}
} else {
headTvGetShop.setText("");
getCompanyName = "";
headTvGetShop.setText(getCompanyName);
getLatitude = 0;
getLongitude = 0;
headTvOutShop.setText("");
outCompanyName = "";
headTvOutShop.setText(outCompanyName);
outLatitude = 0;
outLongitude = 0;
}
......
......@@ -6,6 +6,7 @@ import android.widget.ImageView;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.frame.base.view.StarBar;
import com.ruiwenliu.wrapper.util.BaseGlideHolder;
import com.rv.component.utils.DisplayUtil;
import com.rv.home.R;
import com.rv.home.R2;
import com.rv.home.rv.module.ui.main.home.bean.CarTypeListBean;
......@@ -18,38 +19,40 @@ import com.rv.home.rv.module.ui.main.home.bean.ShopListBean;
* https://blog.csdn.net/anita9999/article/details/82346552
*/
public class CarRentalListAdapter extends BaseQuickAdapter<CarTypeListBean.DataBeanX.DataBean,BaseGlideHolder>{
public class CarRentalListAdapter extends BaseQuickAdapter<CarTypeListBean.DataBeanX.DataBean, BaseGlideHolder> {
public CarRentalListAdapter() {
super(R.layout.rv_item_car_rental_list);
}
@Override
protected void convert(BaseGlideHolder helper, CarTypeListBean.DataBeanX.DataBean item) {
if (item.getVehicleModel() !=null){
helper.setText(R.id.tv_name,item.getVehicleModel().getName());
helper.setText(R.id.tv_context,item.getVehicleModel().getKeyword());
helper.setText(R.id.tv_point,String.valueOf(item.getVehicleModel().getPoint()));
helper.loadImage(mContext,item.getVehicleModel().getIcon(), (ImageView) helper.getView(R.id.iv_goods));
if (item.getVehicleModel() != null) {
helper.setText(R.id.tv_name, item.getVehicleModel().getName());
helper.setText(R.id.tv_context, item.getVehicleModel().getKeyword());
helper.setText(R.id.tv_point, String.valueOf(item.getVehicleModel().getPoint()));
helper.loadRoundImage(mContext, item.getVehicleModel().getIcon(), (ImageView) helper.getView(R.id.iv_goods), 10, DisplayUtil.dip2px(mContext, helper.getView(R.id.iv_goods).getWidth()), DisplayUtil.dip2px(mContext, helper.getView(R.id.iv_goods).getHeight()));
// helper.setText(R.id.tv_name,item);
helper.setText(R.id.tv_price,String.format("¥%1$s%2$s",item.getVehicleModel().getPrice(),mContext.getString(R.string.rv_day)));
helper.setText(R.id.tv_price, String.format("¥%1$s%2$s", item.getVehicleModel().getPrice(), mContext.getString(R.string.rv_day)));
float score = (float) item.getVehicleModel().getScore() / 10;
StarBar starBar = helper.getView(R.id.starbar1);
starBar.setStarMark(score);
helper.setText(R.id.tv_point,score +"分");
if ("0".equals(item.getHasVehicle())){
helper.setGone(R.id.iv_sold_out,true);
helper.setGone(R.id.tv_layout_gray,true);
}else if ("1".equals(item.getHasVehicle())){
helper.setGone(R.id.iv_sold_out,false);
helper.setGone(R.id.tv_layout_gray,false);
starBar.setVisibility(View.GONE);
helper.setText(R.id.tv_point, score + "");
if ("0".equals(item.getHasVehicle())) {
helper.setGone(R.id.iv_sold_out, true);
helper.setGone(R.id.tv_layout_gray, true);
} else if ("1".equals(item.getHasVehicle())) {
helper.setGone(R.id.iv_sold_out, false);
helper.setGone(R.id.tv_layout_gray, false);
}
}
helper.setText(R.id.tv_address,item.getCompany().getName());
helper.setText(R.id.tv_address, item.getCompany().getName());
double instance=item.getDistance()/1000;
helper.setText(R.id.tv_km,String.format("%1$s%2$.3f%3$s",mContext.getString(R.string.rv_km_you),instance,mContext.getString(R.string.rv_km)));
double instance = item.getDistance() / 1000;
helper.setText(R.id.tv_km, String.format("%s%d%s", mContext.getString(R.string.rv_km_you), new Double(instance).intValue(), mContext.getString(R.string.rv_km)));
}
}
......@@ -109,15 +109,26 @@ public class EvaluationActivity extends BaseStatusActivity<PickerPresenter> {
@Override
protected void initView(Bundle savedInstanceState, TitleView titleView, Intent intent) {
titleView.setTitle(mActivity.getString(R.string.rv_to_appointment_evaluation));
titleView.setTitle(getString(R.string.rv_to_appointment_evaluation));
dataBean = (OrderListBean.DataBeanX.DataBean) intent.getSerializableExtra("dataBean");
if (dataBean != null) {
tvName.setText(dataBean.getName());
GlideManager.getInstance(mActivity).loadImage(dataBean.getIcon(), ivCar);
if (dataBean.getType() == 1) {
if (dataBean.getOrderRentVehicleDetail() != null && !TextUtils.isEmpty(dataBean.getOrderRentVehicleDetail().getCost_detail())) {
tvContent.setText(dataBean.getOrderRentVehicleDetail().getCost_detail());
}
} else if (dataBean.getType() == 2) {
if (dataBean.getOrderTourDetail() != null && !TextUtils.isEmpty(dataBean.getOrderTourDetail().getCostDetail())) {
tvContent.setText(dataBean.getOrderTourDetail().getCostDetail());
}
} else if (dataBean.getType() == 3) {
if (dataBean.getOrderMemberDetail() != null) {
tvContent.setText("永久" + (dataBean.getOrderMemberDetail().getRebate() / 10) + "折租车, 免费用车" + dataBean.getOrderMemberDetail().getRentFreeNum() + "天");
}
}
}
intiEt();
listImg = new ArrayList<>();
mAdapter = new EvaluationAdapter();
......@@ -147,7 +158,7 @@ public class EvaluationActivity extends BaseStatusActivity<PickerPresenter> {
starbar1.setOnStarChangeListener(new StarBar.OnStarChangeListener() {
@Override
public void onStarChange(float mark) {
mark1 = String.valueOf((int)(mark * 10));
mark1 = String.valueOf((int) (mark * 10));
setHint(mark, tvHint1);
}
});
......@@ -156,7 +167,7 @@ public class EvaluationActivity extends BaseStatusActivity<PickerPresenter> {
starbar2.setOnStarChangeListener(new StarBar.OnStarChangeListener() {
@Override
public void onStarChange(float mark) {
mark2 = String.valueOf((int)(mark * 10));
mark2 = String.valueOf((int) (mark * 10));
setHint(mark, tvHint2);
}
});
......@@ -165,7 +176,7 @@ public class EvaluationActivity extends BaseStatusActivity<PickerPresenter> {
starbar3.setOnStarChangeListener(new StarBar.OnStarChangeListener() {
@Override
public void onStarChange(float mark) {
mark3 = String.valueOf((int)(mark * 10));
mark3 = String.valueOf((int) (mark * 10));
setHint(mark, tvHint3);
}
});
......@@ -259,19 +270,19 @@ public class EvaluationActivity extends BaseStatusActivity<PickerPresenter> {
scoreBean3.setVehicleScoreType("EXPERIENCE");
scores.add(scoreBean3);
String id = null;
if (1==dataBean.getType()){
if (1 == dataBean.getType()) {
OrderListBean.DataBeanX.DataBean.OrderRentVehicleDetail orderRentVehicleDetail = dataBean.getOrderRentVehicleDetail();
if (orderRentVehicleDetail!=null){
if (orderRentVehicleDetail != null) {
id = String.valueOf(orderRentVehicleDetail.getId());
}
}else if (2 == dataBean.getType()){
} else if (2 == dataBean.getType()) {
OrderListBean.DataBeanX.DataBean.OrderTourDetail orderTourDetail = dataBean.getOrderTourDetail();
if (orderTourDetail!=null){
if (orderTourDetail != null) {
id = orderTourDetail.getId();
}
}
mPresenter.postBodyData(0, ApiConfig.HTTP_URL_SCORE, BaseBean.class, new Score(id,dataBean.getId(),scores), getHeadMap(), true);
mPresenter.postBodyData(0, ApiConfig.HTTP_URL_SCORE, BaseBean.class, new Score(id, dataBean.getId(), scores), getHeadMap(), true);
}
......
......@@ -7,6 +7,7 @@ import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.view.View;
import android.webkit.JavascriptInterface;
import android.webkit.WebChromeClient;
......@@ -27,6 +28,7 @@ import com.frame.base.url.Constance;
import com.frame.rv.config.RvFrameConfig;
import com.ruiwenliu.wrapper.base.BaseBean;
import com.ruiwenliu.wrapper.base.BaseStatusActivity;
import com.ruiwenliu.wrapper.statusbar.StatusBarUtil;
import com.ruiwenliu.wrapper.util.ViewHolder;
import com.ruiwenliu.wrapper.weight.TitleView;
import com.rv.component.dialog.PaymentTypeSelection;
......@@ -81,7 +83,6 @@ public class MemberOrderDetailsActivity extends BaseStatusActivity<PickerPresent
return new Intent(context, MemberOrderDetailsActivity.class)
.putExtra("dataBean", dataBean);
}
@Override
protected int setLayout() {
return R.layout.activity_travel_order_details;
......@@ -423,6 +424,7 @@ public class MemberOrderDetailsActivity extends BaseStatusActivity<PickerPresent
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
StatusBarUtil.setRootViewFitsSystemWindows(mActivity, false);
ButterKnife.bind(this);
}
......
......@@ -33,6 +33,7 @@ import com.frame.base.bus.RxBus;
import com.frame.rv.config.RvFrameConfig;
import com.frame.rv.widget.PayResult;
import com.ruiwenliu.wrapper.base.BaseBean;
import com.ruiwenliu.wrapper.statusbar.StatusBarUtil;
import com.ruiwenliu.wrapper.util.ViewHolder;
import com.ruiwenliu.wrapper.weight.TitleView;
import com.rv.component.control.ProgressWebView;
......@@ -356,6 +357,7 @@ public class OrderDetailActivity extends BaseStatusActivity<PickerPresenter> {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// TODO: add setContentView(...) invocation
StatusBarUtil.setRootViewFitsSystemWindows(mActivity, false);
ButterKnife.bind(this);
}
......
......@@ -32,6 +32,7 @@ import com.frame.rv.config.RvFrameConfig;
import com.frame.rv.widget.PayResult;
import com.ruiwenliu.wrapper.base.BaseBean;
import com.ruiwenliu.wrapper.base.BaseStatusActivity;
import com.ruiwenliu.wrapper.statusbar.StatusBarUtil;
import com.ruiwenliu.wrapper.util.ViewHolder;
import com.ruiwenliu.wrapper.weight.TitleView;
import com.rv.component.control.ProgressWebView;
......@@ -493,6 +494,7 @@ public class TravelOrderDetailsActivity extends BaseStatusActivity<PickerPresent
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
StatusBarUtil.setRootViewFitsSystemWindows(mActivity, false);
ButterKnife.bind(this);
}
......
......@@ -397,7 +397,7 @@ public class OrderListBean extends BaseBean implements Serializable {
private int orderId;
private int endCity;
private int freeDays;
private int rebate;
private double rebate;
public int getFreeDays() {
......@@ -408,11 +408,11 @@ public class OrderListBean extends BaseBean implements Serializable {
this.freeDays = freeDays;
}
public int getRebate() {
public double getRebate() {
return rebate;
}
public void setRebate(int rebate) {
public void setRebate(double rebate) {
this.rebate = rebate;
}
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/lay_title"
<com.ruiwenliu.wrapper.statusbar.StatusBarHeightView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorAuxiliaryYellow"
android:layout_height="@dimen/size_55">
android:orientation="vertical"
app:use_type="use_padding_top">
<ImageView
android:id="@+id/iv_back"
android:layout_width="@dimen/size_32"
android:layout_height="@dimen/size_32"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/size_5"
android:padding="@dimen/size_8"
android:src="@drawable/rv_common_icon_back_dark" />
<RelativeLayout
android:id="@+id/lay_title"
android:layout_width="match_parent"
android:layout_height="@dimen/size_55"
android:background="@color/colorAuxiliaryYellow">
<TextView
android:id="@+id/tv_center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:text="订单详情"
android:maxWidth="320dp"
android:textColor="@color/textMain"
android:textSize="@dimen/text_18" />
<ImageView
android:id="@+id/iv_back"
android:layout_width="@dimen/size_32"
android:layout_height="@dimen/size_32"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/size_5"
android:padding="@dimen/size_8"
android:src="@drawable/rv_common_icon_back_dark" />
<ImageView
android:id="@+id/iv_customer_service"
android:layout_width="@dimen/size_42"
android:layout_height="@dimen/size_32"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="@drawable/rv_rentingcar_icon_service_white"
android:layout_marginRight="@dimen/size_5"
android:padding="@dimen/size_8" />
<TextView
android:id="@+id/tv_center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:ellipsize="end"
android:gravity="center"
android:maxWidth="320dp"
android:maxLines="1"
android:text="订单详情"
android:textColor="@color/textMain"
android:textSize="@dimen/text_18" />
<ImageView
android:id="@+id/iv_customer_service"
android:layout_width="@dimen/size_42"
android:layout_height="@dimen/size_32"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="@dimen/size_5"
android:padding="@dimen/size_8"
android:src="@drawable/rv_rentingcar_icon_service_white" />
</RelativeLayout>
</RelativeLayout>
</com.ruiwenliu.wrapper.statusbar.StatusBarHeightView>
<ProgressBar
......@@ -52,53 +61,49 @@
android:layout_height="@dimen/size_3"
android:indeterminateOnly="false"
android:max="100"
android:visibility="gone"
android:progressDrawable="@drawable/shape_rv_bg_yellow_progress" >
</ProgressBar>
android:progressDrawable="@drawable/shape_rv_bg_yellow_progress"
android:visibility="gone"></ProgressBar>
<WebView
android:id="@+id/webView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:id="@+id/webView"
/>
android:layout_weight="1" />
<include layout="@layout/common_line"/>
<include layout="@layout/common_line" />
<LinearLayout
android:id="@+id/ll_item_bottom"
android:layout_width="match_parent"
android:layout_height="@dimen/size_70"
android:paddingLeft="@dimen/size_12"
android:paddingRight="@dimen/size_12"
android:gravity="center_vertical"
android:orientation="horizontal">
android:orientation="horizontal"
android:paddingLeft="@dimen/size_12"
android:paddingRight="@dimen/size_12">
<TextView
android:id="@+id/tv_cancel_order"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="@dimen/size_50"
android:textSize="@dimen/text_14"
android:gravity="center"
android:layout_marginRight="@dimen/size_5"
android:layout_weight="1"
android:background="@drawable/shape_rv_border_gray"
android:textColor="@color/textGray"
android:gravity="center"
android:text="@string/rv_cancel_order"
/>
android:textColor="@color/textGray"
android:textSize="@dimen/text_14" />
<TextView
android:id="@+id/tv_pick_up_the_car"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="@dimen/size_50"
android:textSize="@dimen/text_14"
android:gravity="center"
android:layout_marginLeft="@dimen/size_5"
android:layout_weight="1"
android:background="@drawable/shape_rv_bg_yellow"
android:textColor="@color/colorWrite"
android:gravity="center"
android:text="@string/rv_pick_up_the_car"
/>
android:textColor="@color/colorWrite"
android:textSize="@dimen/text_14" />
</LinearLayout>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/lay_title"
android:layout_width="match_parent"
<com.ruiwenliu.wrapper.statusbar.StatusBarHeightView
android:background="@color/colorAuxiliaryYellow"
android:layout_height="@dimen/size_55">
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:use_type="use_padding_top">
<ImageView
android:id="@+id/iv_back"
android:layout_width="@dimen/size_32"
android:layout_height="@dimen/size_32"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/size_5"
android:padding="@dimen/size_8"
android:src="@drawable/rv_common_icon_back_dark" />
<RelativeLayout
android:id="@+id/lay_title"
android:layout_width="match_parent"
android:layout_height="@dimen/size_55"
android:background="@color/colorAuxiliaryYellow">
<TextView
android:id="@+id/tv_center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:maxWidth="320dp"
android:text="订单详情"
android:textColor="@color/textMain"
android:textSize="@dimen/text_18" />
<ImageView
android:id="@+id/iv_back"
android:layout_width="@dimen/size_32"
android:layout_height="@dimen/size_32"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/size_5"
android:padding="@dimen/size_8"
android:src="@drawable/rv_common_icon_back_dark" />
<ImageView
android:id="@+id/iv_customer_service"
android:layout_width="@dimen/size_42"
android:layout_height="@dimen/size_32"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="@drawable/rv_rentingcar_icon_service_white"
android:layout_marginRight="@dimen/size_5"
android:padding="@dimen/size_8" />
<TextView
android:id="@+id/tv_center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:ellipsize="end"
android:gravity="center"
android:maxWidth="320dp"
android:maxLines="1"
android:text="订单详情"
android:textColor="@color/textMain"
android:textSize="@dimen/text_18" />
</RelativeLayout>
<ImageView
android:id="@+id/iv_customer_service"
android:layout_width="@dimen/size_42"
android:layout_height="@dimen/size_32"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="@dimen/size_5"
android:padding="@dimen/size_8"
android:src="@drawable/rv_rentingcar_icon_service_white" />
<include layout="@layout/common_line"/>
</RelativeLayout>
</com.ruiwenliu.wrapper.statusbar.StatusBarHeightView>
<include layout="@layout/common_line" />
<ProgressBar
android:id="@+id/pb_progress"
......@@ -53,53 +62,49 @@
android:layout_height="@dimen/size_3"
android:indeterminateOnly="false"
android:max="100"
android:visibility="gone"
android:progressDrawable="@drawable/shape_rv_bg_yellow_progress" >
</ProgressBar>
android:progressDrawable="@drawable/shape_rv_bg_yellow_progress"
android:visibility="gone"></ProgressBar>
<WebView
android:id="@+id/webView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:id="@+id/webView"
/>
android:layout_weight="1" />
<include layout="@layout/common_line"/>
<include layout="@layout/common_line" />
<LinearLayout
android:id="@+id/ll_item_bottom"
android:layout_width="match_parent"
android:layout_height="@dimen/size_70"
android:paddingLeft="@dimen/size_12"
android:paddingRight="@dimen/size_12"
android:gravity="center_vertical"
android:orientation="horizontal">
android:orientation="horizontal"
android:paddingLeft="@dimen/size_12"
android:paddingRight="@dimen/size_12">
<TextView
android:id="@+id/tv_cancel_order"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="@dimen/size_50"
android:textSize="@dimen/text_14"
android:gravity="center"
android:layout_marginRight="@dimen/size_5"
android:layout_weight="1"
android:background="@drawable/shape_rv_border_gray"
android:textColor="@color/textGray"
android:gravity="center"
android:text="@string/rv_cancel_order"
/>
android:textColor="@color/textGray"
android:textSize="@dimen/text_14" />
<TextView
android:id="@+id/tv_pick_up_the_car"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="@dimen/size_50"
android:textSize="@dimen/text_14"
android:gravity="center"
android:layout_marginLeft="@dimen/size_5"
android:layout_weight="1"
android:background="@drawable/shape_rv_bg_yellow"
android:textColor="@color/colorWrite"
android:gravity="center"
android:text="立即支付"
/>
android:textColor="@color/colorWrite"
android:textSize="@dimen/text_14" />
</LinearLayout>
</LinearLayout>
......@@ -64,7 +64,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="取车地址"
android:text="取车公司"
android:textColor="@color/text_Gray"
android:textSize="@dimen/text_10" />
......@@ -113,7 +113,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="还车地址"
android:text="还车公司"
android:textColor="@color/text_Gray"
android:textSize="@dimen/text_10" />
......
......@@ -9,7 +9,7 @@
<EditText
android:id="@+id/edt_search"
android:layout_width="match_parent"
android:layout_height="@dimen/size_30"
android:layout_height="@dimen/size_40"
android:layout_gravity="center"
android:layout_marginLeft="@dimen/size_20"
android:layout_marginTop="@dimen/size_10"
......@@ -18,9 +18,10 @@
android:background="@drawable/shape_rv_textview_home_search"
android:gravity="center"
android:orientation="horizontal"
android:hint="请输入城市名称"
android:textColor="@color/colorMain"
android:textColorHint="@color/colorMain"
android:textSize="@dimen/sp_12" />
android:textColorHint="@color/tv_gr999999"
android:textSize="@dimen/sp_14" />
<include layout="@layout/common_line" />
......
......@@ -9,7 +9,7 @@
<LinearLayout
android:id="@+id/ll_search"
android:layout_width="match_parent"
android:layout_height="@dimen/size_30"
android:layout_height="@dimen/size_40"
android:layout_marginLeft="@dimen/size_20"
android:layout_marginTop="@dimen/size_10"
android:layout_marginRight="@dimen/size_20"
......
......@@ -12,17 +12,17 @@
android:layout_marginBottom="@dimen/size_5"
android:background="@color/colorWrite"
android:orientation="horizontal"
android:padding="@dimen/size_15">
android:padding="@dimen/size_10">
<ImageView
android:id="@+id/iv_goods"
android:layout_width="@dimen/size_120"
android:layout_height="@dimen/size_100"
android:scaleType="centerCrop" />
android:layout_width="121dp"
android:layout_height="85dp"
android:scaleType="centerInside" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="85dp"
android:layout_marginLeft="@dimen/size_5">
<TextView
......@@ -33,26 +33,27 @@
android:maxLines="1"
android:text=""
android:textColor="@color/textMain"
android:textSize="@dimen/text_16" />
android:textSize="@dimen/text_14" />
<TextView
android:layout_marginRight="@dimen/size_50"
android:id="@+id/tv_address"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/tv_name"
android:layout_marginTop="@dimen/size_8"
android:layout_marginTop="@dimen/size_5"
android:ellipsize="end"
android:maxLines="1"
android:text=""
android:textColor="@color/textGray"
android:textSize="@dimen/text_12" />
android:textSize="@dimen/text_10" />
<LinearLayout
android:id="@+id/ll_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/tv_address"
android:layout_marginTop="@dimen/size_5"
android:layout_marginTop="@dimen/size_3"
android:gravity="center_vertical"
android:orientation="horizontal">
......@@ -65,18 +66,21 @@
android:maxLines="1"
android:text=""
android:textColor="@color/textGray"
android:textSize="@dimen/text_12" />
android:textSize="@dimen/text_10" />
<TextView
android:gravity="right|center_vertical"
android:layout_gravity="right"
android:id="@+id/tv_point"
android:layout_width="wrap_content"
android:layout_width="@dimen/size_60"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_10"
android:drawableRight="@drawable/rv_vehicle_icon_star_light"
android:ellipsize="end"
android:maxLines="1"
android:text=""
android:textColor="@color/textGray"
android:textSize="@dimen/text_12" />
android:textSize="@dimen/text_10" />
<com.frame.base.view.StarBar
android:id="@+id/starbar1"
......@@ -89,16 +93,7 @@
ratingbar:starCount="5"
ratingbar:isClick ="true"
ratingbar:starSize="@dimen/size_12"/>
<!--<RatingBar-->
<!--android:layout_marginTop="@dimen/size_5"-->
<!--android:layout_below="@id/tv_context"-->
<!--android:layout_width="wrap_content"-->
<!--style="@style/fiveRatingBar"-->
<!--android:numStars="5"-->
<!--android:id="@+id/rating_bar"-->
<!--android:rating="4.5"-->
<!--android:layout_height="@dimen/size_16"-->
<!--/>-->
</LinearLayout>
<LinearLayout
......@@ -116,12 +111,13 @@
android:layout_weight="1"
android:text=""
android:textColor="@color/colorAuxiliaryRed"
android:textSize="@dimen/text_16"
android:textSize="@dimen/text_14"
android:textStyle="bold" />
<TextView
android:gravity="right|center_vertical"
android:id="@+id/tv_km"
android:layout_width="wrap_content"
android:layout_width="@dimen/size_70"
android:layout_height="wrap_content"
android:text=""
android:textColor="@color/textGray"
......
......@@ -10,7 +10,6 @@
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_10"
android:layout_marginTop="5dp"
android:layout_marginRight="@dimen/size_10"
android:layout_marginBottom="5dp"
android:background="@drawable/shape_rv_bg_hot_city"
android:gravity="center"
......@@ -19,7 +18,7 @@
android:paddingRight="@dimen/size_10"
android:paddingBottom="5dp"
android:textColor="@color/textMain"
android:textSize="@dimen/text_16" />
android:textSize="@dimen/text_14" />
</LinearLayout>
......@@ -17,6 +17,7 @@
android:id="@+id/gdv_hot_city"
android:layout_width="match_parent"
android:layout_height="@dimen/size_80"
android:layout_marginRight="@dimen/size_10"
android:layout_marginBottom="@dimen/size_10"
android:listSelector="@android:color/transparent"
android:numColumns="4" />
......
......@@ -12,6 +12,7 @@ import android.support.annotation.Nullable;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
......@@ -66,8 +67,8 @@ import io.reactivex.functions.Consumer;
* 旅游
*/
public class TourismFragment extends BaseFragment<TourismPresenter> implements SimpleRefreshLayout.OnSimpleRefreshListener {
//BaseQuickAdapter.RequestLoadMoreListener,
public class TourismFragment extends BaseFragment<TourismPresenter> implements SimpleRefreshLayout.OnSimpleRefreshListener {
//BaseQuickAdapter.RequestLoadMoreListener,
@BindView(R2.id.travel_city_text)
TextView travelCityText;
@BindView(R2.id.search_input)
......@@ -135,7 +136,7 @@ public class TourismFragment extends BaseFragment<TourismPresenter> implements
//全部热门旅游
mAllPopularAdapter = new AllPopularAdapter();
rvPopularMore.setLayoutManager(new GridLayoutManager(_mActivity, 3));
rvPopularMore.addItemDecoration(new AbSpacesItemDecoration2(20,10));// 分割线。
rvPopularMore.addItemDecoration(new AbSpacesItemDecoration2(20, 10));// 分割线。
// rvPopularMore.setNestedScrollingEnabled(false);
rvPopularMore.setAdapter(mAllPopularAdapter);
......@@ -186,7 +187,7 @@ public class TourismFragment extends BaseFragment<TourismPresenter> implements
getLoadTourAroundData(mPage);
}
}
},rvTourAround);
}, rvTourAround);
}
@Override
......@@ -361,7 +362,7 @@ public class TourismFragment extends BaseFragment<TourismPresenter> implements
@Override
public void OnBannerClick(int position) {
BeanTourismBanner.DataBean dataBean = banners.get(position);
mPresenter.toTarget(getActivity(),dataBean.getUrl(),dataBean.getTitle());
mPresenter.toTarget(getActivity(), dataBean.getUrl(), dataBean.getTitle());
// ComponentName componentName = new ComponentName(getActivity(), "com.rv.share.WebViewActivity");
// Intent intent = new Intent();
// intent.setComponent(componentName);
......@@ -389,7 +390,7 @@ public class TourismFragment extends BaseFragment<TourismPresenter> implements
@Override
public void onDestroy() {
super.onDestroy();
if (geoCoder !=null){
if (geoCoder != null) {
geoCoder.destroy();
}
}
......@@ -448,7 +449,7 @@ public class TourismFragment extends BaseFragment<TourismPresenter> implements
private int left;
private int right;
public AbSpacesItemDecoration(int left,int right) {
public AbSpacesItemDecoration(int left, int right) {
this.left = left;
this.right = right;
}
......@@ -456,12 +457,12 @@ public class TourismFragment extends BaseFragment<TourismPresenter> implements
@Override
public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
int childCount = parent.getChildCount();
if ((childCount -1) % 2==0){
if ((childCount - 1) % 2 == 0) {
outRect.left = left;
outRect.right = right;
outRect.bottom = right;
outRect.top = right;
}else {
} else {
outRect.left = right;
outRect.right = left;
outRect.bottom = right;
......@@ -476,7 +477,7 @@ public class TourismFragment extends BaseFragment<TourismPresenter> implements
private int left;
private int right;
public AbSpacesItemDecoration2(int left,int right) {
public AbSpacesItemDecoration2(int left, int right) {
this.left = left;
this.right = right;
}
......@@ -484,17 +485,17 @@ public class TourismFragment extends BaseFragment<TourismPresenter> implements
@Override
public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
int childCount = parent.getChildCount();
if (childCount % 3==1){
if (childCount % 3 == 1) {
outRect.left = left;
outRect.right = right;
outRect.bottom = right;
outRect.top = right;
}else if (childCount % 3 == 2){
} else if (childCount % 3 == 2) {
outRect.left = right;
outRect.right = right;
outRect.bottom = right;
outRect.top = right;
}else if (childCount % 3 ==0){
} else if (childCount % 3 == 0) {
outRect.left = right;
outRect.right = left;
outRect.bottom = right;
......@@ -590,7 +591,8 @@ public class TourismFragment extends BaseFragment<TourismPresenter> implements
latLatitude = location.getLatitude();
lonLongitude = location.getLongitude();
mLatLng = new LatLng(location.getLatitude(), location.getLongitude());
travelCityText.setText(location.getCity());
if (!TextUtils.isEmpty(location.getCity()))
travelCityText.setText(location.getCity());
locationManager.stopLocation();
}
});
......
......@@ -9,7 +9,6 @@ import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.webkit.JavascriptInterface;
import android.webkit.WebChromeClient;
......@@ -85,6 +84,7 @@ public class TravelDetailsActivity extends BaseStatusActivity<TourismPresenter>
@BindView(R2.id.tv_appointment)
TextView TvAppointment;
private ShareManager shareManager;
private String webUrl;
private BeanOrderParam beanOrderParam;
......@@ -92,6 +92,7 @@ public class TravelDetailsActivity extends BaseStatusActivity<TourismPresenter>
private static String isCollection = "0"; //0 没有收藏 1 收藏
private ClipboardManager myClipboard;
@Autowired()
String id;
......
......@@ -101,6 +101,12 @@ public class MemberCenterActivity extends BaseStatusActivity<MemberPresenter> {
return R.layout.activity_member;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// StatusBarUtil.setRootViewFitsSystemWindows(mActivity, false);
}
@Override
protected void initView(Bundle savedInstanceState, TitleView titleView, Intent intent) {
api = WXAPIFactory.createWXAPI(this, RvFrameConfig.APP_ID);
......@@ -193,7 +199,7 @@ public class MemberCenterActivity extends BaseStatusActivity<MemberPresenter> {
mPresenter.pay(MemberCenterActivity.this, api, (BeanTourOrderPay) result);
break;
case 4:
mPresenter.aliPay(MemberCenterActivity.this, (BeanTourOrderAliPay) result);
mPresenter.aliPay(MemberCenterActivity.this, (BeanTourOrderAliPay) result);
break;
}
}
......
......@@ -34,9 +34,9 @@ public class ConsumeRecordListAdapter extends BaseQuickAdapter<OrderListBean.Dat
if (bean != null) {
if (!TextUtils.isEmpty(bean.getCrtTime())) {
helper.setText(R.id.tv_consume_time, "下单时间: " + bean.getCrtTime());
if(bean.getStatusX() == 2){
if (bean.getStatusX() == 2) {
helper.setText(R.id.tv_state, "已取消");
} else if (bean.getStatusX() == 3) {
} else if (bean.getStatusX() == 3) {
helper.setText(R.id.tv_state, "待支付");
} else if (bean.getStatusX() == 4) {
helper.setText(R.id.tv_state, "待出行");
......@@ -64,7 +64,9 @@ public class ConsumeRecordListAdapter extends BaseQuickAdapter<OrderListBean.Dat
helper.setText(R.id.tv_member_right, "免费" + vehicleDetail.getFreeDays() + "天");
helper.setVisible(R.id.tv_member_right, true);
} else if (vehicleDetail.getRebate() > 0) {
helper.setText(R.id.tv_member_right, ((int) vehicleDetail.getRebate() / 10) + "折");
double rebate = vehicleDetail.getRebate() / 10d;
String s = String.valueOf(rebate);
helper.setText(R.id.tv_member_right, replace(s) + "折");
helper.setVisible(R.id.tv_member_right, true);
}
}
......@@ -79,4 +81,13 @@ public class ConsumeRecordListAdapter extends BaseQuickAdapter<OrderListBean.Dat
}
});
}
private String replace(String s) {
if (null != s && s.indexOf(".") > 0) {
s = s.replaceAll("0+?$", "");//去掉多余的0
s = s.replaceAll("[.]$", "");//如最后一位是.则去掉
}
return s;
}
}
......@@ -74,19 +74,21 @@ public class DateAdapter extends BaseAdapter {
viewHolder.tv = view.findViewById(R.id.tvWeek);
viewHolder.rlItem = view.findViewById(R.id.rlItem);
viewHolder.ivStatus = view.findViewById(R.id.ivStatus);
if (today == i) {
if (today == days.get(i)) {
viewHolder.tv.setText("今天");
} else {
viewHolder.tv.setText(days.get(i) + "");
}
if (days.get(i) == 0) {
viewHolder.rlItem.setVisibility(View.GONE);
} else {
viewHolder.rlItem.setVisibility(View.VISIBLE);
}
if (singRecords != null && singRecords.contains(i)) {
if (singRecords != null && singRecords.contains(days.get(i))) {
viewHolder.ivStatus.setImageResource(R.drawable.icon_signed);
viewHolder.ivStatus.setVisibility(View.VISIBLE);
} else {
if (today > i) {
if (today > days.get(i)) {
viewHolder.ivStatus.setImageResource(R.drawable.icon_unsign);
viewHolder.ivStatus.setVisibility(View.VISIBLE);
} else {
......
......@@ -112,7 +112,8 @@ public class ShareActivity extends BaseStatusActivity<SharePresenter> {
int id = view.getId();
if (TextUtils.isEmpty(shareUrl)) {
String code = Cookie.getStringValue(getApplicationContext(), SPConstance.USER_JSON_CODE, "");
shareUrl = RvFrameConfig.HOST + "/h5/appHtml/view/invitationCourtesyShare.html?code=" + code ;
shareUrl = RvFrameConfig.HOST + "/h5/appHtml/view/newPeopleH5.html?code=" + code + "&userName=" + Cookie.getStringValue(getApplicationContext(), SPConstance.USER_JSON_NAME)
+ "&headUrl=" + Cookie.getStringValue(getApplicationContext(), SPConstance.USER_JSON_HEADERURL, "");
}
if (id == R.id.tv_weixin) {
mPresenter.shareWx(shareUrl, "新人专享大礼包,快去领!", " ");
......
......@@ -28,7 +28,6 @@ public class PromotionDialog extends Dialog {
public static class Builder {
private Context mContext;
private ImageView button;
private ImageView imgBg;
private ImageView imgClose;
private View.OnClickListener mListener;
......@@ -60,10 +59,6 @@ public class PromotionDialog extends Dialog {
View layout = inflater.inflate(R.layout.dialog_promotion, null);
// 为对话框添加布局和设置大小
dialog.addContentView(layout, new WindowManager.LayoutParams(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.WRAP_CONTENT));
this.button = layout.findViewById(R.id.button);
// if (this.act != null && !TextUtils.isEmpty(this.act.getButtonImages())) {
// GlideManager.getInstance(mContext).loadImage2(this.act.getButtonImages(), this.button);
// }
this.imgBg = layout.findViewById(R.id.img_bg);
if (this.act != null && !TextUtils.isEmpty(this.act.getBackground())) {
GlideManager.getInstance(mContext).loadImage2(this.act.getBackground(), this.imgBg);
......
<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/bg_share_new"
android:tileMode="repeat" />
\ No newline at end of file
......@@ -17,8 +17,9 @@
android:orientation="vertical">
<ImageView
android:scaleType="fitXY"
android:layout_width="match_parent"
android:layout_height="650px"
android:layout_height="@dimen/height_share_ruler_top"
android:src="@drawable/banner_share_ruler_top" />
<TextView
......@@ -59,7 +60,7 @@
android:layout_marginLeft="@dimen/size_10"
android:layout_marginTop="@dimen/size_10"
android:layout_marginRight="@dimen/size_10"
android:text=" 分享你的推广码或专属链接给您的好友,邀请好友下载进入APP体验并注册。在好友注册的时间开始算2个月,每当您的1位好友完成1次租车或房车游行程或购买会员并支付订单,您便可获得好友支付订单金额(不包括租车押金)的10%提成作为邀请奖励。您邀请下单的好友越多,您获得的奖励越多,奖励现金可提现。"
android:text=" 分享你的推广码或专属链接给您的好友,邀请好友下载进入APP体验并注册。在好友注册的时间开始算2个月,每当您的1位好友完成1次租车或房车游行程或购买会员并支付订单,您便可获得好友支付订单金额(不包括租车押金)的5%提成作为邀请奖励。您邀请下单的好友越多,您获得的奖励越多,奖励现金可提现。"
android:textColor="#ff666666"
android:textSize="@dimen/sp_14" />
......@@ -95,9 +96,9 @@
android:layout_height="@dimen/size_20"
android:layout_marginTop="@dimen/size_3"
android:layout_marginBottom="3dp"
android:src="@drawable/icon_share_ruler_down"
android:gravity="center_horizontal"
android:orientation="vertical"/>
android:orientation="vertical"
android:src="@drawable/icon_share_ruler_down" />
<TextView
......@@ -114,9 +115,9 @@
android:layout_height="@dimen/size_20"
android:layout_marginTop="@dimen/size_3"
android:layout_marginBottom="3dp"
android:src="@drawable/icon_share_ruler_down"
android:gravity="center_horizontal"
android:orientation="vertical"/>
android:orientation="vertical"
android:src="@drawable/icon_share_ruler_down" />
<TextView
......@@ -133,9 +134,9 @@
android:layout_height="@dimen/size_20"
android:layout_marginTop="@dimen/size_3"
android:layout_marginBottom="3dp"
android:src="@drawable/icon_share_ruler_down"
android:gravity="center_horizontal"
android:orientation="vertical"/>
android:orientation="vertical"
android:src="@drawable/icon_share_ruler_down" />
<TextView
......@@ -152,9 +153,9 @@
android:layout_height="@dimen/size_20"
android:layout_marginTop="@dimen/size_3"
android:layout_marginBottom="3dp"
android:src="@drawable/icon_share_ruler_down"
android:gravity="center_horizontal"
android:orientation="vertical"/>
android:orientation="vertical"
android:src="@drawable/icon_share_ruler_down" />
<TextView
......@@ -171,9 +172,9 @@
android:layout_height="@dimen/size_20"
android:layout_marginTop="@dimen/size_3"
android:layout_marginBottom="3dp"
android:src="@drawable/icon_share_ruler_down"
android:gravity="center_horizontal"
android:orientation="vertical"/>
android:orientation="vertical"
android:src="@drawable/icon_share_ruler_down" />
<TextView
android:layout_width="match_parent"
......@@ -182,7 +183,7 @@
android:layout_marginRight="@dimen/size_50"
android:background="@drawable/bg_income_item"
android:gravity="center"
android:text="您获得邀请奖励:订单20%的提成" />
android:text="您获得邀请奖励:订单5%的提成" />
</LinearLayout>
......
......@@ -18,19 +18,6 @@
android:minHeight="@dimen/dialog_min_height"
android:scaleType="fitXY" />
<ImageView
android:id="@+id/button"
android:layout_width="match_parent"
android:layout_height="@dimen/size_40"
android:layout_gravity="bottom"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:layout_marginBottom="@dimen/size_10"
android:gravity="center"
android:visibility="gone" />
</FrameLayout>
<ImageView
......
......@@ -4,4 +4,6 @@
<dimen name="dialog_min_height">150dp</dimen>
<dimen name="dialog_act_width">150dp</dimen>
<dimen name="dialog_act_height">200dp</dimen>
<dimen name="height_share_ruler_top">108.34dp</dimen>
</resources>
......@@ -4,4 +4,6 @@
<dimen name="dialog_min_height">200dp</dimen>
<dimen name="dialog_act_width">200dp</dimen>
<dimen name="dialog_act_height">266.67dp</dimen>
<dimen name="height_share_ruler_top">240.45dp</dimen>
</resources>
......@@ -5,4 +5,7 @@
<dimen name="dialog_act_width">300dp</dimen>
<dimen name="dialog_act_height">400dp</dimen>
<dimen name="height_share_ruler_top">216.67dp</dimen>
</resources>
......@@ -38,7 +38,6 @@
android:textSize="@dimen/sp_14" />
<TextView
android:lineSpacingMultiplier="1.3"
android:id="@+id/txt_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
......
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