Commit 7f290bda authored by linfeng's avatar linfeng

bug修复

parent 08eb6a58
......@@ -8,8 +8,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
flavorDimensions "default"
versionCode 140
versionName "1.4.0"
versionCode 142
versionName "1.4.2"
multiDexEnabled true
//新版Gradle 是 implementation 为了兼容compile,写上这句话
......
......@@ -12,6 +12,7 @@ public interface RvFrameConfig extends RvFrameConstant {
// String HOST = "http://10.1.37.244:8765";
// String HOST = "http://10.1.37.245:10000";
String HOST = "https://dev.dfangche.com";
String IMA_BASEUSRL = "https://xxfcim.upyuns.com/xxfcim";
String HOST_H5_DETAIL = HOST;
String ADMIN_POST = HOST + "/api/admin/";
String AUTH_POST = HOST + "/api/auth/";
......
......@@ -8,12 +8,13 @@ package com.frame.rv.config;
*/
public interface RvFrameConfig extends RvFrameConstant {
// String HOST = "https://xxtest.upyuns.com";
// String HOST = "https://xxtest.upyuns.com";
// String HOST = "http://10.1.37.192:8765";
// String HOST = "http://10.1.37.245:10000";
// String HOST = "https://dev.dfangche.com";
// String HOST = "https://api.dfangche.com";
String HOST = "https://mgmt.dfangche.com";
String IMA_BASEUSRL = "https://imapi.dfangche.com";
String HOST_H5_DETAIL = "https://mgmt.dfangche.com";
String ADMIN_POST = HOST + "/api/admin/";
String AUTH_POST = HOST + "/api/auth/";
......
......@@ -9,6 +9,7 @@ package com.frame.rv.config;
public interface RvFrameConfig extends RvFrameConstant {
String HOST = "https://xxtest.upyuns.com";
String IMA_BASEUSRL = "https://xxfcim.upyuns.com/xxfcim";
// String HOST = "http://10.1.37.192:8765";
// String HOST = "http://10.1.37.245:10000";
// String HOST = "https://dev.dfangche.com";
......
......@@ -51,7 +51,7 @@ public class PickerPresenter extends CommonPresenter {
try {
//API>=24 android 7.0
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
cropUri = FileProvider.getUriForFile(getPresenterContext(), getPresenterContext().getPackageName() +".fileProvider", imageFile);
cropUri = FileProvider.getUriForFile(getPresenterContext(), getPresenterContext().getPackageName() + ".fileProvider", imageFile);
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); //添加这一句表示对目标应用临时授权该Uri所代表的文件
} else {//<24
cropUri = Uri.fromFile(imageFile);
......@@ -89,7 +89,7 @@ public class PickerPresenter extends CommonPresenter {
}
Intent intent = new Intent(Intent.ACTION_PICK);
intent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "image/*");
((Activity) getPresenterContext()).startActivityForResult(intent, isCrop ? TYPE_ALBUM_CROP_CODE: TYPE_ALBUM_CODE);
((Activity) getPresenterContext()).startActivityForResult(intent, isCrop ? TYPE_ALBUM_CROP_CODE : TYPE_ALBUM_CODE);
}
/**
......@@ -127,7 +127,7 @@ public class PickerPresenter extends CommonPresenter {
intent.putExtra("crop", "true");
intent.putExtra("aspectX", 1);
intent.putExtra("aspectY", 1);
intent.putExtra("outputX",200);
intent.putExtra("outputX", 200);
intent.putExtra("outputY", 200);
intent.putExtra("scale", true);
intent.putExtra("return-data", false);
......@@ -140,7 +140,6 @@ public class PickerPresenter extends CommonPresenter {
}
/**
* 调用系统裁剪功能
*/
......@@ -158,9 +157,10 @@ public class PickerPresenter extends CommonPresenter {
intent.putExtra("crop", "true");
intent.putExtra("aspectX", 783);
intent.putExtra("aspectY", 1074);
intent.putExtra("outputX",600);
intent.putExtra("outputY", 950);
// intent.putExtra("outputX",600);
// intent.putExtra("outputY", 950);
intent.putExtra("scale", true);
intent.putExtra("scaleUpIfNeeded", true);
intent.putExtra("return-data", false);
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputUri);
intent.putExtra("outputFormat", Bitmap.CompressFormat.JPEG.toString());
......@@ -173,6 +173,7 @@ public class PickerPresenter extends CommonPresenter {
/**
* 获取图片存储地址
*
* @return
*/
public FileStorage getFileStore() {
......@@ -188,7 +189,7 @@ public class PickerPresenter extends CommonPresenter {
* 根据路径获得图片信息并按比例压缩,返回bitmap
*/
public File getSmallBitmap(String filePath) {
File file=new File(filePath);//将要保存图片的路径
File file = new File(filePath);//将要保存图片的路径
final BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;//只解析图片边沿,获取宽高
BitmapFactory.decodeFile(filePath, options);
......@@ -196,7 +197,7 @@ public class PickerPresenter extends CommonPresenter {
options.inSampleSize = calculateInSampleSize(options, 200, 200);
// 完整解析图片返回bitmap
options.inJustDecodeBounds = false;
Bitmap bitmap= BitmapFactory.decodeFile(filePath, options);
Bitmap bitmap = BitmapFactory.decodeFile(filePath, options);
try {
BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(file));
bitmap.compress(Bitmap.CompressFormat.JPEG, 100, bos);
......@@ -224,7 +225,6 @@ public class PickerPresenter extends CommonPresenter {
}
// public File getUrlFile(Uri uri){
// File file = null; //图片地址
// try {
......@@ -234,27 +234,28 @@ public class PickerPresenter extends CommonPresenter {
// }
// return file;
// }
/**
* Try to return the absolute file path from the given Uri
*
* @param uri
* @return the file path or null
*/
public String getRealFilePath( final Uri uri ) {
if ( null == uri ) return null;
public String getRealFilePath(final Uri uri) {
if (null == uri) return null;
final String scheme = uri.getScheme();
String data = null;
if ( scheme == null )
if (scheme == null)
data = uri.getPath();
else if ( ContentResolver.SCHEME_FILE.equals( scheme ) ) {
else if (ContentResolver.SCHEME_FILE.equals(scheme)) {
data = uri.getPath();
} else if ( ContentResolver.SCHEME_CONTENT.equals( scheme ) ) {
Cursor cursor =getPresenterContext().getContentResolver().query( uri, new String[] { MediaStore.Images.ImageColumns.DATA }, null, null, null );
if ( null != cursor ) {
if ( cursor.moveToFirst() ) {
int index = cursor.getColumnIndex( MediaStore.Images.ImageColumns.DATA );
if ( index > -1 ) {
data = cursor.getString( index );
} else if (ContentResolver.SCHEME_CONTENT.equals(scheme)) {
Cursor cursor = getPresenterContext().getContentResolver().query(uri, new String[]{MediaStore.Images.ImageColumns.DATA}, null, null, null);
if (null != cursor) {
if (cursor.moveToFirst()) {
int index = cursor.getColumnIndex(MediaStore.Images.ImageColumns.DATA);
if (index > -1) {
data = cursor.getString(index);
}
}
cursor.close();
......
package com.rv.component.utils;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import java.util.List;
public class IsAppInstall {
public static boolean isWeixinAvilible(Context context) {
final PackageManager packageManager = context.getPackageManager();
List<PackageInfo> pinfo = packageManager.getInstalledPackages(0);
if (pinfo != null) {
for (int i = 0; i < pinfo.size(); i++) {
String pn = pinfo.get(i).packageName;
if (pn.equals("com.tencent.mm")) {
return true;
}
}
}
return false;
}
/**
* 判断qq是否可用
*
* @param context
* @return
*/
public static boolean isQQClientAvailable(Context context) {
final PackageManager packageManager = context.getPackageManager();
List<PackageInfo> pinfo = packageManager.getInstalledPackages(0);
if (pinfo != null) {
for (int i = 0; i < pinfo.size(); i++) {
String pn = pinfo.get(i).packageName;
if (pn.equals("com.tencent.mobileqq")) {
return true;
}
}
}
return false;
}
}
......@@ -39,6 +39,7 @@ import com.rv.camp.bean.CampDetailsBean;
import com.rv.camp.presenter.CampPresenter;
import com.rv.component.control.ProgressWebView;
import com.rv.component.utils.Cookie;
import com.rv.component.utils.IsAppInstall;
import com.umeng.socialize.bean.SHARE_MEDIA;
import com.umeng.socialize.shareboard.SnsPlatform;
import com.umeng.socialize.utils.ShareBoardlistener;
......@@ -290,7 +291,18 @@ public class CampDetailActivity extends BaseStatusActivity<CampPresenter> {
} else if (snsPlatform.mShowWord.equals("复制链接")) {
copyText();
}else if (snsPlatform.mShowWord.contains("微信")) {
if (!IsAppInstall.isWeixinAvilible(mActivity)) {
showToast("亲,您微信还没有安装呢");
return;
}
}else if (snsPlatform.mShowWord.contains("QQ")){
if (!IsAppInstall.isQQClientAvailable(mActivity)) {
showToast("亲,您QQ还没有安装呢");
return;
}
}
shareManager.showShare(share_media, webUrls, name, content, logo
, new CustomShareListener(mActivity) {
......
......@@ -3,7 +3,7 @@ package com.xxfc.discovery.api;
import com.frame.rv.config.RvFrameConfig;
public interface DiscoveryApi extends RvFrameConfig {
String IMA_BASEUSRL = "https://imapi.dfangche.com";
// String IMA_BASEUSRL = "https://imapi.dfangche.com";
// String IMA_BASEUSRL = "https://xxfcim.upyuns.com/xxfcim";
//问题列表
......
......@@ -27,6 +27,9 @@ import com.alibaba.android.arouter.launcher.ARouter;
import com.alibaba.fastjson.JSON;
import com.base.utils.tools.android.IntentUtil;
import com.base.utils.ui.datetime.selector.util.TextUtil;
import com.frame.base.bus.LoginSuccessfulEvent;
import com.frame.base.bus.Observer;
import com.frame.base.bus.RxBus;
import com.frame.base.url.Constance;
import com.frame.rv.config.CommonApi;
import com.frame.rv.config.RvFrameConfig;
......@@ -42,6 +45,7 @@ import com.ruiwenliu.wrapper.util.um.ShareManager;
import com.ruiwenliu.wrapper.weight.TitleView;
import com.rv.component.utils.Cookie;
import com.rv.component.utils.DateUtils;
import com.rv.component.utils.IsAppInstall;
import com.umeng.socialize.bean.SHARE_MEDIA;
import com.umeng.socialize.shareboard.SnsPlatform;
import com.umeng.socialize.utils.ShareBoardlistener;
......@@ -60,6 +64,8 @@ import java.util.Map;
import butterknife.BindView;
import butterknife.OnClick;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;
import static com.ruiwenliu.wrapper.weight.webview.SafeWebView.hasKitkat;
......@@ -127,6 +133,19 @@ public class DetailPatActivity extends BaseStatusActivity<DiscoveryPresenter> {
initShare(webUrl + "&shareType=app&code=" + code, title, "【滴房车】开着房车去旅行,一样的旅途,不一样的精彩", iconUrl);
}
initRxbus();
}
private void initRxbus() {
RxBus.tObservable(LoginSuccessfulEvent.class)
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<LoginSuccessfulEvent>(disposable) {
@Override
public void onNext(LoginSuccessfulEvent event) {
mWebView.reload();
}
});
}
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
......@@ -288,9 +307,8 @@ public class DetailPatActivity extends BaseStatusActivity<DiscoveryPresenter> {
@JavascriptInterface
public void isLike(String praise) {
isPraise = praise;
if (OkGoUtil.getToken() != null) {
isPraise = praise;
Map<String, Object> headMap = new LinkedHashMap<>();
headMap.put("Authorization", OkGoUtil.getToken());
mPresenter.postData(RvFrameConfig.HOST, 2, DiscoveryApi.DISCOVERY_IM_LOGIN, DiscoveryIMTokenBean.class, headMap, headMap, false);
......@@ -320,7 +338,18 @@ public class DetailPatActivity extends BaseStatusActivity<DiscoveryPresenter> {
} else if (snsPlatform.mShowWord.equals("复制链接")) {
copyText();
} else if (snsPlatform.mShowWord.contains("微信")) {
if (!IsAppInstall.isWeixinAvilible(mActivity)) {
showToast("亲,您微信还没有安装呢");
return;
}
} else if (snsPlatform.mShowWord.contains("QQ")) {
if (!IsAppInstall.isQQClientAvailable(mActivity)) {
showToast("亲,您QQ还没有安装呢");
return;
}
}
shareManager.showShare(share_media, webUrl, name, content, logo
, new CustomShareListener(mActivity) {
......@@ -350,7 +379,6 @@ public class DetailPatActivity extends BaseStatusActivity<DiscoveryPresenter> {
}
}
}
});
}
......@@ -366,7 +394,7 @@ public class DetailPatActivity extends BaseStatusActivity<DiscoveryPresenter> {
myClipboard = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);
}
String code = Cookie.getStringValue(getApplicationContext(), SPConstance.USER_JSON_CODE, "");
ClipData myClip = ClipData.newPlainText("text", webUrl+ "&shareType=app&code=" + code);
ClipData myClip = ClipData.newPlainText("text", webUrl + "&shareType=app&code=" + code);
myClipboard.setPrimaryClip(myClip);
showToast("复制成功!");
}
......
......@@ -22,18 +22,24 @@ import android.widget.TextView;
import com.alibaba.android.arouter.facade.annotation.Autowired;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.base.utils.ui.image.round.RoundImageView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
import com.bumptech.glide.request.RequestOptions;
import com.frame.base.url.Constance;
import com.ruiwenliu.wrapper.base.BaseBean;
import com.ruiwenliu.wrapper.base.BaseStatusActivity;
import com.ruiwenliu.wrapper.base.presenter.PickerPresenter;
import com.ruiwenliu.wrapper.util.TransformationUtil;
import com.ruiwenliu.wrapper.util.ViewHolder;
import com.ruiwenliu.wrapper.util.glide.GlideManager;
import com.ruiwenliu.wrapper.util.glide.GlideOptions;
import com.ruiwenliu.wrapper.util.permission.RxPermission;
import com.ruiwenliu.wrapper.util.um.CustomShareListener;
import com.ruiwenliu.wrapper.util.um.ShareManager;
import com.ruiwenliu.wrapper.weight.TitleView;
import com.rv.component.dialog.PickerDialog;
import com.rv.component.utils.DisplayUtil;
import com.rv.component.utils.IsAppInstall;
import com.rv.component.utils.ZxingUtils;
import com.umeng.socialize.bean.SHARE_MEDIA;
import com.umeng.socialize.shareboard.SnsPlatform;
......@@ -96,11 +102,24 @@ public class PatGeneratePosterActivity extends BaseStatusActivity<PickerPresente
titleView.setTitle("生成海报");
if (!TextUtils.isEmpty(url)) {
Bitmap bitmap = ZxingUtils.createQRImage(url, DisplayUtil.dip2px(this, 150), DisplayUtil.dip2px(this, 150), BitmapFactory.decodeResource(getResources(), R.drawable.logo_hint));
Bitmap bitmap = ZxingUtils.createQR(url, DisplayUtil.dip2px(this, 150), DisplayUtil.dip2px(this, 150));
imgQrcode.setImageBitmap(bitmap);
}
GlideManager.getInstance(mActivity).loadRoundImage(iconUrl, imgBillTop, 8);
GlideOptions options = GlideOptions.placeholderOf(com.ruiwenliu.wrapper.R.drawable.glide_icon_placeholder).
error(com.ruiwenliu.wrapper.R.drawable.glide_icon_error);
TransformationUtil utils = new TransformationUtil(imgBillTop);
Glide.with(this)
.asBitmap()
.load(iconUrl)
.apply(options)
.apply(RequestOptions
.bitmapTransform(new RoundedCorners(12)).override(imgBillTop.getWidth(), imgBillTop.getHeight())
.disallowHardwareConfig())
.into(utils);
// GlideManager.getInstance(mActivity).loadRoundImage(, imgBillTop, 8);
tvContent.setText(content);
GlideManager.getInstance(mActivity).loadCircleImage(userUrl, ringHeader);
tvUsername.setText(userName);
......@@ -163,10 +182,25 @@ public class PatGeneratePosterActivity extends BaseStatusActivity<PickerPresente
mPresenter.cropPhoto2(data.getData());
}
} else if (requestCode == mPresenter.TYPE_CAMERA_CODE && resultCode == RESULT_OK) {
if (!TextUtils.isEmpty(mPresenter.gerCameraStoreUrl())) {
mPresenter.cropPhoto2(Uri.fromFile(new File(mPresenter.gerCameraStoreUrl())));
}
} else if (requestCode == mPresenter.TYPE_CROP_CODE && resultCode == RESULT_OK) {
String url = mPresenter.gerCameraStoreUrl();
GlideManager.getInstance(mActivity).loadRoundImage(url, imgBillTop, 8);
// GlideManager.getInstance(mActivity).loadRoundImage(url, imgBillTop, 8);
GlideOptions options = GlideOptions.placeholderOf(com.ruiwenliu.wrapper.R.drawable.glide_icon_placeholder).
error(com.ruiwenliu.wrapper.R.drawable.glide_icon_error);
TransformationUtil utils = new TransformationUtil(imgBillTop);
Glide.with(this)
.asBitmap()
.load(url)
.apply(options)
.apply(RequestOptions
.bitmapTransform(new RoundedCorners(12)).override(imgBillTop.getWidth(), imgBillTop.getHeight())
.disallowHardwareConfig())
.into(utils);
}
}
......@@ -248,6 +282,17 @@ public class PatGeneratePosterActivity extends BaseStatusActivity<PickerPresente
shareManager = new ShareManager(this, new ShareBoardlistener() {
@Override
public void onclick(SnsPlatform snsPlatform, SHARE_MEDIA share_media) {
if (snsPlatform.mShowWord.contains("微信")) {
if (!IsAppInstall.isWeixinAvilible(mActivity)) {
showToast("亲,您微信还没有安装呢");
return;
}
} else if (snsPlatform.mShowWord.contains("QQ")) {
if (!IsAppInstall.isQQClientAvailable(mActivity)) {
showToast("亲,您QQ还没有安装呢");
return;
}
}
shareManager.showShareImage(share_media, bitmap, new CustomShareListener(mActivity) {
@Override
......
......@@ -28,7 +28,7 @@
android:layout_marginLeft="@dimen/size_10"
android:layout_marginTop="@dimen/size_10"
android:layout_marginRight="@dimen/size_10"
android:layout_marginBottom="@dimen/size_10"
android:layout_marginBottom="@dimen/size_5"
android:gravity="center_horizontal"
android:orientation="vertical">
......@@ -37,7 +37,7 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:scaleType="centerCrop" />
android:scaleType="fitXY" />
<TextView
android:id="@+id/tv_content"
......@@ -49,7 +49,7 @@
android:singleLine="true"
android:text="落霞与孤叶齐飞,荒草共长天一色,荒草长一..."
android:textColor="@color/colorMain"
android:textSize="@dimen/text_16" />
android:textSize="@dimen/text_14" />
<include layout="@layout/common_line" />
......@@ -87,7 +87,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_marginLeft="@dimen/text_10"
android:layout_marginLeft="@dimen/size_10"
android:gravity="center_vertical"
android:orientation="horizontal">
......@@ -98,9 +98,9 @@
<ImageView
android:id="@+id/img_qrcode"
android:layout_width="@dimen/size_70"
android:layout_height="@dimen/size_70"
android:layout_marginLeft="@dimen/size_20" />
android:layout_width="@dimen/size_60"
android:layout_height="@dimen/size_60"
android:layout_marginLeft="@dimen/size_10" />
</LinearLayout>
</LinearLayout>
......@@ -109,8 +109,10 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/size_3"
android:text="滴房车app,带你走进房车生活"
android:layout_marginTop="@dimen/size_5"
android:drawableLeft="@drawable/common_icon_logo_small"
android:drawablePadding="@dimen/size_3"
android:text="房车让生活更美好"
android:textColor="@color/gray_B4B4B4"
android:textSize="@dimen/text_8" />
......@@ -125,9 +127,9 @@
android:layout_gravity="bottom"
android:layout_marginLeft="@dimen/size_15"
android:layout_marginRight="@dimen/size_15"
android:layout_marginBottom="@dimen/size_20"
android:gravity="center_horizontal|bottom"
android:orientation="horizontal"
android:layout_marginBottom="@dimen/size_20"
android:paddingTop="@dimen/size_10">
<TextView
......
......@@ -21,6 +21,7 @@ import com.ruiwenliu.wrapper.util.listener.TextChangedListener;
import com.ruiwenliu.wrapper.weight.TitleView;
import com.rv.component.utils.Cookie;
import com.rv.component.utils.IsAppInstall;
import com.rv.component.utils.LogUtil;
import com.rv.home.R;
import com.rv.home.R2;
......@@ -162,8 +163,16 @@ public class LoginRvActivity extends BaseLoginActivity<CommonPresenter> {
codeLogin();
} else if (view.getId() == R.id.iv_weixin) {
if (!IsAppInstall.isWeixinAvilible(mActivity)) {
showToast("亲,您微信还没有安装呢");
return;
}
umLogin(SHARE_MEDIA.WEIXIN);
} else if (view.getId() == R.id.iv_qq) {
if (!IsAppInstall.isQQClientAvailable(mActivity)) {
showToast("亲,您QQ还没有安装呢");
return;
}
umLogin(SHARE_MEDIA.QQ);
} else if (view.getId() == R.id.tv_pwd_login) {
startActivity(PwdLoginActivity.getIntent(mActivity, jumptype));
......
......@@ -41,6 +41,7 @@ import com.ruiwenliu.wrapper.util.um.CustomShareListener;
import com.ruiwenliu.wrapper.util.um.ShareManager;
import com.ruiwenliu.wrapper.weight.TitleView;
import com.rv.component.utils.Cookie;
import com.rv.component.utils.IsAppInstall;
import com.rv.home.R;
import com.rv.home.R2;
import com.rv.home.rv.module.ApiConfig;
......@@ -364,14 +365,25 @@ public class CarDetailActivity extends BaseStatusActivity<CommonPresenter> {
.build(Constance.ACTIVITY_URL_CARPOSTERACTIVITY)
.withString("url", url)
.withString("imageUrl", icon)
.withString("title",mCarBean.getVehicleModel().getName())
.withString("content",mCarBean.getVehicleModel().getKeyword())
.withString("price",String.valueOf(mCarBean.getVehicleModel().getPrice()))
.withString("title", mCarBean.getVehicleModel().getName())
.withString("content", mCarBean.getVehicleModel().getKeyword())
.withString("price", String.valueOf(mCarBean.getVehicleModel().getPrice()))
.navigation();
} else if (snsPlatform.mShowWord.equals("复制链接")) {
copyText();
} else if (snsPlatform.mShowWord.contains("微信")) {
if (!IsAppInstall.isWeixinAvilible(mActivity)) {
showToast("亲,您微信还没有安装呢");
return;
}
} else if (snsPlatform.mShowWord.contains("QQ")) {
if (!IsAppInstall.isQQClientAvailable(mActivity)) {
showToast("亲,您QQ还没有安装呢");
return;
}
}
shareManager.showShare(share_media, url, name, content, logo
, new CustomShareListener(mActivity) {
......
......@@ -84,7 +84,7 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl
TextView tvNickname;
@BindView(R2.id.iv_member)
ImageView ivMember;
@BindView(com.rv.member.R2.id.tv_member)
@BindView(R2.id.tv_member)
TextView tvMember;
@BindView(R2.id.tv_login)
TextView tvLogin;
......@@ -121,10 +121,6 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl
@BindView(R2.id.tv_coupon)
TextView tvCoupon;
Unbinder unbinder;
private UserInfoBean.UserInfo info;
public static MineFragment getInstance(int type) {
......
......@@ -108,14 +108,11 @@ public class AddAVisitorActivity extends BaseStatusActivity<CommonPresenter> {
return;
}
if (identityType == 0) {
phone = etPhone.getText().toString().trim();
if (!StringUtils.isChinaPhone(phone)) {
showToast("请输入正确的手机号码!");
return;
}
}
addAVisitor(name, idCard, phone);
}
});
......
......@@ -44,6 +44,7 @@ import com.ruiwenliu.wrapper.util.um.CustomShareListener;
import com.ruiwenliu.wrapper.util.um.ShareManager;
import com.ruiwenliu.wrapper.weight.TitleView;
import com.rv.component.utils.Cookie;
import com.rv.component.utils.IsAppInstall;
import com.rv.tourism.R;
import com.rv.tourism.R2;
import com.rv.tourism.api.TourismApi;
......@@ -392,7 +393,18 @@ public class TravelDetailsActivity extends BaseStatusActivity<TourismPresenter>
} else if (snsPlatform.mShowWord.equals("复制链接")) {
copyText();
}else if (snsPlatform.mShowWord.contains("微信")) {
if (!IsAppInstall.isWeixinAvilible(mActivity)) {
showToast("亲,您微信还没有安装呢");
return;
}
}else if (snsPlatform.mShowWord.contains("QQ")){
if (!IsAppInstall.isQQClientAvailable(mActivity)) {
showToast("亲,您QQ还没有安装呢");
return;
}
}
shareManager.showShare(share_media, webUrls, name, content, logo
, new CustomShareListener(mActivity) {
......
......@@ -32,6 +32,7 @@ import com.ruiwenliu.wrapper.util.um.CustomShareListener;
import com.ruiwenliu.wrapper.util.um.ShareManager;
import com.ruiwenliu.wrapper.weight.TitleView;
import com.rv.component.utils.DisplayUtil;
import com.rv.component.utils.IsAppInstall;
import com.rv.component.utils.ShareUtils;
import com.rv.component.utils.ZxingUtils;
import com.umeng.socialize.bean.SHARE_MEDIA;
......@@ -214,7 +215,17 @@ public class CarPosterActivity extends BaseStatusActivity<CommonPresenter> {
shareManager = new ShareManager(this, new ShareBoardlistener() {
@Override
public void onclick(SnsPlatform snsPlatform, SHARE_MEDIA share_media) {
if (snsPlatform.mShowWord.contains("微信")) {
if (!IsAppInstall.isWeixinAvilible(mActivity)) {
showToast("亲,您微信还没有安装呢");
return;
}
} else if (snsPlatform.mShowWord.contains("QQ")) {
if (!IsAppInstall.isQQClientAvailable(mActivity)) {
showToast("亲,您QQ还没有安装呢");
return;
}
}
shareManager.showShareImage2(share_media, image, new CustomShareListener(mActivity) {
@Override
public void onResult(SHARE_MEDIA platform) {
......
......@@ -36,6 +36,7 @@ import com.ruiwenliu.wrapper.util.um.ShareManager;
import com.ruiwenliu.wrapper.weight.TitleView;
import com.rv.component.utils.CacheEnum;
import com.rv.component.utils.DisplayUtil;
import com.rv.component.utils.IsAppInstall;
import com.rv.component.utils.RvCache;
import com.rv.component.utils.ShareUtils;
import com.rv.component.utils.ZxingUtils;
......@@ -88,7 +89,7 @@ public class PosterActivity extends BaseStatusActivity<CommonPresenter> {
titleView.setTitle("生成海报");
if (!TextUtils.isEmpty(url)) {
Bitmap bitmap = ZxingUtils.createQRImage(url, DisplayUtil.dip2px(this, 150), DisplayUtil.dip2px(this, 150), BitmapFactory.decodeResource(getResources(), R.drawable.logo_hint));
Bitmap bitmap = ZxingUtils.createQR(url, DisplayUtil.dip2px(this, 150), DisplayUtil.dip2px(this, 150));
imgQrcode.setImageBitmap(bitmap);
}
......@@ -215,6 +216,17 @@ public class PosterActivity extends BaseStatusActivity<CommonPresenter> {
@Override
public void onclick(SnsPlatform snsPlatform, SHARE_MEDIA share_media) {
if (snsPlatform.mShowWord.contains("微信")) {
if (!IsAppInstall.isWeixinAvilible(mActivity)) {
showToast("亲,您微信还没有安装呢");
return;
}
} else if (snsPlatform.mShowWord.contains("QQ")) {
if (!IsAppInstall.isQQClientAvailable(mActivity)) {
showToast("亲,您QQ还没有安装呢");
return;
}
}
shareManager.showShareImage2(share_media, image, new CustomShareListener(mActivity) {
@Override
public void onResult(SHARE_MEDIA platform) {
......
......@@ -41,7 +41,8 @@
<ImageView
android:id="@+id/img_bill_top"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:scaleType="fitXY" />
<LinearLayout
android:layout_width="match_parent"
......@@ -91,7 +92,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_marginLeft="@dimen/text_10"
android:layout_marginLeft="@dimen/size_10"
android:gravity="center_vertical"
android:orientation="horizontal">
......@@ -102,9 +103,9 @@
<ImageView
android:id="@+id/img_qrcode"
android:layout_width="@dimen/size_80"
android:layout_height="@dimen/size_80"
android:layout_marginLeft="@dimen/size_20" />
android:layout_width="@dimen/size_60"
android:layout_height="@dimen/size_60"
android:layout_marginLeft="@dimen/size_10" />
</LinearLayout>
</LinearLayout>
......@@ -116,7 +117,7 @@
android:layout_marginTop="@dimen/size_5"
android:drawableLeft="@drawable/common_icon_logo_small"
android:drawablePadding="@dimen/size_3"
android:text="滴房车app,带你走进房车生活"
android:text="房车让生活更美好"
android:textColor="@color/gray_B4B4B4"
android:textSize="@dimen/text_8" />
</LinearLayout>
......
......@@ -19,7 +19,7 @@
android:layout_marginLeft="@dimen/size_15"
android:layout_marginTop="@dimen/size_15"
android:layout_marginRight="@dimen/size_15"
android:layout_marginBottom="@dimen/size_70"
android:layout_marginBottom="@dimen/size_40"
android:background="@color/white"
app:cardCornerRadius="5dp">
......@@ -29,7 +29,7 @@
android:layout_marginLeft="@dimen/size_10"
android:layout_marginTop="@dimen/size_10"
android:layout_marginRight="@dimen/size_10"
android:layout_marginBottom="@dimen/size_10"
android:layout_marginBottom="@dimen/size_5"
android:scrollbars="none">
<LinearLayout
......@@ -41,12 +41,13 @@
<ImageView
android:id="@+id/img_bill_top"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:scaleType="fitXY" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_10"
android:layout_marginTop="@dimen/size_10"
android:gravity="center_vertical"
android:orientation="horizontal">
......@@ -76,7 +77,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_marginLeft="@dimen/text_10"
android:layout_marginLeft="@dimen/size_10"
android:gravity="center_vertical"
android:orientation="horizontal">
......@@ -87,9 +88,10 @@
<ImageView
android:id="@+id/img_qrcode"
android:layout_width="@dimen/size_70"
android:layout_height="@dimen/size_70"
android:layout_marginLeft="@dimen/size_20" />
android:layout_width="@dimen/size_60"
android:layout_height="@dimen/size_60"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/size_10" />
</LinearLayout>
</LinearLayout>
......@@ -99,7 +101,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/size_5"
android:text="滴房车app,带你走进房车生活"
android:drawableLeft="@drawable/common_icon_logo_small"
android:drawablePadding="@dimen/size_3"
android:text="房车让生活更美好"
android:textColor="@color/gray_B4B4B4"
android:textSize="@dimen/text_8" />
</LinearLayout>
......
......@@ -11,6 +11,7 @@ import android.widget.Toast;
import com.base.utils.ui.datetime.selector.util.TextUtil;
import com.ruiwenliu.wrapper.base.presenter.CommonPresenter;
import com.rv.component.utils.IsAppInstall;
import com.rv.share.BillActivity;
import com.rv.share.R;
import com.rv.share.view.RvWebView;
......@@ -165,12 +166,20 @@ public class WebViewPresenter extends CommonPresenter {
@Override
public void wxShare() {
if (!IsAppInstall.isWeixinAvilible(getPresenterContext())) {
Toast.makeText(getPresenterContext(),"亲,您微信还没有安装呢",Toast.LENGTH_SHORT).show();
return;
}
if (!TextUtils.isEmpty(mUrl))
shareWx();
}
@Override
public void wxCShare() {
if (!IsAppInstall.isWeixinAvilible(getPresenterContext())) {
Toast.makeText(getPresenterContext(),"亲,您微信还没有安装呢",Toast.LENGTH_SHORT).show();
return;
}
if (!TextUtils.isEmpty(mUrl))
shareWxC();
}
......
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