Commit 7f290bda authored by linfeng's avatar linfeng

bug修复

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