Commit 344b53a0 authored by linfeng's avatar linfeng

bug修复

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