Commit 3c34e55c authored by jianglx's avatar jianglx

修改分享海报闪退的问题;修改city.json 的城市错误码

parent 334e52db
......@@ -8,8 +8,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 122
versionName "1.2.2"
versionCode 123
versionName "1.2.3"
multiDexEnabled true
//新版Gradle 是 implementation 为了兼容compile,写上这句话
......
......@@ -66,6 +66,25 @@ public class GlideManager {
}
/**
* 加载普通图片
*
* @param url
* @param image
*/
public void loadImage3(String url, ImageView image) {
GlideApp.with(mContext)
.load(url)
.placeholder(R.drawable.glide_icon_placeholder)
.error(R.drawable.glide_icon_error)
.apply(new RequestOptions()
.skipMemoryCache(true)
.disallowHardwareConfig()
.diskCacheStrategy(DiskCacheStrategy.ALL))
.into(image);
}
/**
* 加载普通图片
*
......@@ -108,7 +127,7 @@ public class GlideManager {
GlideApp.with(mContext)
.load(url)
// .apply(RequestOptions.bitmapTransform(new CenterCrop(),new RoundedCorners(round)))
.apply(RequestOptions.bitmapTransform(new GlideRoundTransform(mContext,round)))
.apply(RequestOptions.bitmapTransform(new GlideRoundTransform(mContext, round)))
.into(image);
}
......@@ -124,7 +143,7 @@ public class GlideManager {
GlideApp.with(mContext)
.load(url)
// .apply(RequestOptions.bitmapTransform(new CenterCrop(),new RoundedCorners(round)))
.apply(RequestOptions.bitmapTransform(new GlideRoundTransform(mContext,round)))
.apply(RequestOptions.bitmapTransform(new GlideRoundTransform(mContext, round)))
.into(image);
}
......@@ -188,8 +207,8 @@ public class GlideManager {
@Override
public boolean onResourceReady(GifDrawable gifDrawable, Object model, Target<GifDrawable> target, DataSource dataSource, boolean isFirstResource) {
//设置循环播放次数为1次
gifDrawable.setLoopCount(number);
//设置循环播放次数为1次
gifDrawable.setLoopCount(number);
// getGifduration(gifDrawable);//获取Gif时长
return false;
......
......@@ -805,8 +805,8 @@
"name": "厦门市",
"id": 350200
}, {
"name": "西安",
"id": 220403
"name": "西安",
"id": 610100
}, {
"name": "西宁市",
"id": 630100
......
......@@ -208,14 +208,30 @@ public class CarRentalListActivity extends BaseStatusActivity<CommonPresenter> i
} else if (id == R.id.ll_item_get_address) {
startActivityForResult(SelectShopActivity.getIntent(mActivity, 1, "", dataBean.getStartCityName(), mLat, mLon), 110);
ARouter.getInstance()
.build(Constance.ACTIVITY_URL_SELECTSHOP)
.withDouble("mLat", mLat)
.withDouble("mLon", mLon)
.withString("cityName", dataBean.getStartCityName())
.withInt("shopType", 1)
.navigation(mActivity, 110);
// startActivityForResult(SelectShopActivity.getIntent(mActivity, 1, "", dataBean.getStartCityName(), mLat, mLon), 110);
// //取车地址
// startActivityForResult(SelectLocationActivity.getIntent(mActivity, 1, dataBean.getStartCityName(), dataBean.getStartCity(),mLat, mLon, "", 1), 110);
} else if (id == R.id.ll_item_out_address) {
//还车地址
startActivityForResult(SelectShopActivity.getIntent(mActivity, 2, "", dataBean.getEndCityName(), mLat, mLon), 110);
ARouter.getInstance()
.build(Constance.ACTIVITY_URL_SELECTSHOP)
.withDouble("mLat", mLat)
.withDouble("mLon", mLon)
.withString("cityName", dataBean.getEndCityName())
.withInt("shopType", 2)
.navigation(mActivity, 110);
// startActivityForResult(SelectShopActivity.getIntent(mActivity, 2, "", dataBean.getEndCityName(), outLatitude, outLongitude), 110);
// startActivityForResult(SelectLocationActivity.getIntent(mActivity, 2, dataBean.getStartCityName(),dataBean.getEndCity(), outLatitude, outLongitude, "", 1), 110);
} else if (id == R.id.ll_item_filter) {
if (attributeListBean == null) {
......
......@@ -595,20 +595,20 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
} else if (id == R.id.tv_get_city || id == R.id.tv_get_address || id == R.id.ll_rent) {
ARouter.getInstance()
.build(Constance.ACTIVITY_URL_SELECTSHOP)
.withDouble("mLat",latLatitude)
.withDouble("mLon",lonLongitude)
.withString("cityName",TextUtils.isEmpty(getCityName) ? nowCity : getCityName)
.withInt("shopType",1)
.navigation(_mActivity,TYPE_REQUEST_CITY);
.withDouble("mLat", latLatitude)
.withDouble("mLon", lonLongitude)
.withString("cityName", TextUtils.isEmpty(getCityName) ? nowCity : getCityName)
.withInt("shopType", 1)
.navigation(_mActivity, TYPE_REQUEST_CITY);
// startActivityForResult(SelectShopActivity.getIntent(getActivity(), 1, "", , latLatitude, lonLongitude), TYPE_REQUEST_CITY);
} else if (id == R.id.tv_out_city || id == R.id.ll_return || id == R.id.tv_out_address) {
ARouter.getInstance()
.build(Constance.ACTIVITY_URL_SELECTSHOP)
.withDouble("mLat",latLatitude)
.withDouble("mLon",lonLongitude)
.withString("cityName",TextUtils.isEmpty(outCityName) ? nowCity : outCityName)
.withInt("shopType",2)
.navigation(_mActivity,TYPE_REQUEST_CITY);
.withDouble("mLat", latLatitude)
.withDouble("mLon", lonLongitude)
.withString("cityName", TextUtils.isEmpty(outCityName) ? nowCity : outCityName)
.withInt("shopType", 2)
.navigation(_mActivity, TYPE_REQUEST_CITY);
// startActivityForResult(SelectShopActivity.getIntent(getActivity(), 2, "", TextUtils.isEmpty(outCityName) ? nowCity : outCityName, latLatitude, lonLongitude), TYPE_REQUEST_CITY);
} else if (id == R.id.ll_item_select_data) {
//选择日期
......@@ -824,6 +824,8 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
mTravelCityId = data.getIntExtra("id", 0);
getCityId = mTravelCityId;
outCityId = mTravelCityId;
getCityName = requestData;
outCityName = requestData;
vVTourCityId = mTravelCityId;
setRequestData(type, requestData, headTvGetCity, headTvOutCity, 0, 0);
}
......@@ -892,7 +894,6 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
headTvOutCity.setText(data);
tvRvCity.setText(data);
getShopList(false);
// geoCoder.geocode(new GeoCodeOption()
// .city(data)
// .address(data));
......
......@@ -16,10 +16,13 @@ import android.widget.TextView;
import com.base.utils.ui.image.round.RoundImageView;
import com.ruiwenliu.wrapper.SPConstance;
import com.ruiwenliu.wrapper.base.BaseBean;
import com.ruiwenliu.wrapper.bean.UserInfoBean;
import com.ruiwenliu.wrapper.util.UtilsManager;
import com.ruiwenliu.wrapper.util.glide.GlideManager;
import com.ruiwenliu.wrapper.weight.TitleView;
import com.rv.component.utils.CacheEnum;
import com.rv.component.utils.DisplayUtil;
import com.rv.component.utils.RvCache;
import com.rv.component.utils.ZxingUtils;
import com.rv.home.rv.module.basic.BaseStatusActivity;
import com.rv.share.presenter.ReativeBillPresenter;
......@@ -43,6 +46,8 @@ public class ReativeBillActivity extends BaseStatusActivity<ReativeBillPresenter
Button btnShare;
@BindView(R2.id.ll_bill_content)
CardView llBillContent;
@BindView(R2.id.ll_content)
LinearLayout llContent;
public static Intent getIntent(Context context, String url) {
Intent intent = new Intent(context, ReativeBillActivity.class);
......@@ -65,10 +70,12 @@ public class ReativeBillActivity extends BaseStatusActivity<ReativeBillPresenter
imgQrcode.setImageBitmap(bitmap);
}
String name = UtilsManager.getInstance(OkGoUtil.application).getSPInstance(SPConstance.USER_JSON).getString(SPConstance.USER_JSON_NAME, "");
String url = UtilsManager.getInstance(OkGoUtil.application).getSPInstance(SPConstance.USER_JSON).getString(SPConstance.USER_JSON_HEADERURL, "");
UserInfoBean userInfoBean = (UserInfoBean) RvCache.getInstance(getApplicationContext()).get(CacheEnum.USER);
String name = userInfoBean.getData().getNickname();
String url = userInfoBean.getData().getHeadimgurl();
if (!TextUtils.isEmpty(url)) {
GlideManager.getInstance(getApplicationContext()).loadImage(url, roundImageView);
GlideManager.getInstance(getApplicationContext()).loadImage3(url, roundImageView);
}
if (!TextUtils.isEmpty(name)) {
tvPhone.setText(name);
......@@ -85,9 +92,9 @@ public class ReativeBillActivity extends BaseStatusActivity<ReativeBillPresenter
int id = view.getId();
if (id == R.id.btn_save_bill) {
mPresenter.saveBill(llBillContent);
mPresenter.saveBill(llContent);
} else if (id == R.id.btn_share) {
mPresenter.saveShare(llBillContent);
mPresenter.saveShare(llContent);
}
}
}
......@@ -85,7 +85,7 @@ public class ReativeBillPresenter extends CommonPresenter {
int h = v.getHeight();
int startX = (int) v.getX();
int startY = (int) v.getY();
Bitmap bmp = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888);
Bitmap bmp = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_4444);
Canvas c = new Canvas(bmp);
c.drawColor(Color.WHITE);
v.layout(startX, startY, w + startX, h + startY);
......
......@@ -29,6 +29,7 @@
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/ll_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/size_10"
......
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