src\MyApplication\.idea\compiler.xml

This commit is contained in:
zhangnaifu15 2018-06-04 17:12:56 +08:00
parent 2319d63ee2
commit 3247184a58
12 changed files with 48 additions and 121 deletions

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CheckStyle-IDEA">
<option name="configuration">
<map>
<entry key="checkstyle-version" value="8.2" />
<entry key="location-0" value="BUNDLED:(bundled):Sun Checks" />
<entry key="location-1" value="BUNDLED:(bundled):Google Checks" />
<entry key="scan-before-checkin" value="false" />
<entry key="scanscope" value="JavaOnly" />
<entry key="suppress-errors" value="false" />
</map>
</option>
</component>
</project>

View File

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
<option value="$PROJECT_DIR$/floatwindow" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
</GradleProjectSettings>
</option>
</component>
</project>

View File

@ -7,18 +7,12 @@ import android.os.Environment;
@SuppressLint("SdCardPath") @SuppressLint("SdCardPath")
public class BmobConstants { public class BmobConstants {
/**
* <EFBFBD><EFBFBD>ŷ<EFBFBD><EFBFBD><EFBFBD>ͼƬ<EFBFBD><EFBFBD>Ŀ¼
*/
public static String BMOB_PICTURE_PATH = Environment.getExternalStorageDirectory() + "/bmobimdemo/image/"; public static String BMOB_PICTURE_PATH = Environment.getExternalStorageDirectory() + "/bmobimdemo/image/";
/**
* <EFBFBD>ҵ<EFBFBD>ͷ<EFBFBD>񱣴<EFBFBD>Ŀ¼
*/
public static String MyAvatarDir = "/sdcard/soucang/avatar/"; public static String MyAvatarDir = "/sdcard/soucang/avatar/";
/**
* <EFBFBD><EFBFBD><EFBFBD>ջص<EFBFBD>
*/
public static final int REQUESTCODE_UPLOADAVATAR_CAMERA = 1;//<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>ͷ<EFBFBD><EFBFBD> public static final int REQUESTCODE_UPLOADAVATAR_CAMERA = 1;//<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>ͷ<EFBFBD><EFBFBD>
public static final int REQUESTCODE_UPLOADAVATAR_LOCATION = 2;//<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>ͷ<EFBFBD><EFBFBD> public static final int REQUESTCODE_UPLOADAVATAR_LOCATION = 2;//<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>ͷ<EFBFBD><EFBFBD>
public static final int REQUESTCODE_UPLOADAVATAR_CROP = 3;//ϵͳ<EFBFBD>ü<EFBFBD>ͷ<EFBFBD><EFBFBD> public static final int REQUESTCODE_UPLOADAVATAR_CROP = 3;//ϵͳ<EFBFBD>ü<EFBFBD>ͷ<EFBFBD><EFBFBD>

View File

@ -6,7 +6,7 @@ import android.net.NetworkInfo;
public class CommonUtils { public class CommonUtils {
/** <20><><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
public static boolean isNetworkAvailable(Context context) { public static boolean isNetworkAvailable(Context context) {
NetworkInfo info = getNetworkInfo(context); NetworkInfo info = getNetworkInfo(context);
if (info != null) { if (info != null) {
@ -15,7 +15,7 @@ public class CommonUtils {
return false; return false;
} }
/** <20><><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>WIFI */
public static boolean isWifi(Context context) { public static boolean isWifi(Context context) {
NetworkInfo info = getNetworkInfo(context); NetworkInfo info = getNetworkInfo(context);
if (info != null) { if (info != null) {
@ -25,7 +25,7 @@ public class CommonUtils {
return false; return false;
} }
/** <20><><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>ƶ<EFBFBD><C6B6><EFBFBD><EFBFBD><EFBFBD> */
public static boolean isMobile(Context context) { public static boolean isMobile(Context context) {
NetworkInfo info = getNetworkInfo(context); NetworkInfo info = getNetworkInfo(context);
if (info != null) { if (info != null) {
@ -42,7 +42,7 @@ public class CommonUtils {
return cm.getActiveNetworkInfo(); return cm.getActiveNetworkInfo();
} }
/** <20><><EFBFBD>SD<53><44><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD> */
public static boolean checkSdCard() { public static boolean checkSdCard() {
if (android.os.Environment.getExternalStorageState().equals( if (android.os.Environment.getExternalStorageState().equals(
android.os.Environment.MEDIA_MOUNTED)) android.os.Environment.MEDIA_MOUNTED))

View File

@ -1,8 +1,6 @@
package com.example.administrator.myapplication.utils; package com.example.administrator.myapplication.utils;
/**
* Created by htq on 2016/8/10.
*/
public class Constants { public class Constants {
public final static String BUNDLE_KEY_PAGE = "BUNDLE_KEY_PAGE"; public final static String BUNDLE_KEY_PAGE = "BUNDLE_KEY_PAGE";
public final static String BUNDLE_KEY_ARGS = "BUNDLE_KEY_ARGS"; public final static String BUNDLE_KEY_ARGS = "BUNDLE_KEY_ARGS";

View File

@ -20,36 +20,26 @@ import java.io.IOException;
public class PhotoUtil { public class PhotoUtil {
/**
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> recycle
*
* @throws
*/
public static void recycle(Bitmap bitmap) { public static void recycle(Bitmap bitmap) {
// <EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD>Ѿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (bitmap != null && !bitmap.isRecycled()) { if (bitmap != null && !bitmap.isRecycled()) {
// <EFBFBD><EFBFBD><EFBFBD>ղ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊnull
bitmap.recycle(); bitmap.recycle();
bitmap = null; bitmap = null;
} }
System.gc(); System.gc();
} }
/**
* <EFBFBD><EFBFBD>ȡָ<EFBFBD><EFBFBD>·<EFBFBD><EFBFBD><EFBFBD>µ<EFBFBD>ͼƬ<EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ getImageThumbnail
*
* @return Bitmap
* @throws
*/
public static Bitmap getImageThumbnail(String imagePath, int width, public static Bitmap getImageThumbnail(String imagePath, int width,
int height) { int height) {
Bitmap bitmap = null; Bitmap bitmap = null;
BitmapFactory.Options options = new BitmapFactory.Options(); BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true; options.inJustDecodeBounds = true;
// <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD>ͼƬ<EFBFBD>Ŀ<EFBFBD>͸ߣ<EFBFBD>ע<EFBFBD><EFBFBD>˴<EFBFBD><EFBFBD><EFBFBD>bitmapΪnull
bitmap = BitmapFactory.decodeFile(imagePath, options); bitmap = BitmapFactory.decodeFile(imagePath, options);
options.inJustDecodeBounds = false; // <EFBFBD><EFBFBD>Ϊ false options.inJustDecodeBounds = false;
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ű<EFBFBD>
int h = options.outHeight; int h = options.outHeight;
int w = options.outWidth; int w = options.outWidth;
int beWidth = w / width; int beWidth = w / width;
@ -64,9 +54,9 @@ public class PhotoUtil {
be = 1; be = 1;
} }
options.inSampleSize = be; options.inSampleSize = be;
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼƬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD>ź<EFBFBD><EFBFBD>bitmap<EFBFBD><EFBFBD>ע<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD>options.inJustDecodeBounds <EFBFBD><EFBFBD>Ϊ false
bitmap = BitmapFactory.decodeFile(imagePath, options); bitmap = BitmapFactory.decodeFile(imagePath, options);
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ThumbnailUtils<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫָ<EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĸ<EFBFBD>Bitmap<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
bitmap = ThumbnailUtils.extractThumbnail(bitmap, width, height, bitmap = ThumbnailUtils.extractThumbnail(bitmap, width, height,
ThumbnailUtils.OPTIONS_RECYCLE_INPUT); ThumbnailUtils.OPTIONS_RECYCLE_INPUT);
return bitmap; return bitmap;
@ -75,9 +65,9 @@ public class PhotoUtil {
/** /**
* saveBitmap * saveBitmap
* *
* @param @param filename---<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ-<EFBFBD><EFBFBD>Ŀ¼<EFBFBD>Լ<EFBFBD><EFBFBD>ļ<EFBFBD><EFBFBD><EFBFBD> * @param @param filename
* @param @param bitmap * @param @param bitmap
* @param @param isDelete --<EFBFBD>Ƿ<EFBFBD>ֻ<EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD> * @param @param isDelete
* @return void * @return void
* @throws * @throws
*/ */
@ -89,7 +79,7 @@ public class PhotoUtil {
} }
File file = new File(dirpath, filename); File file = new File(dirpath, filename);
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>ɾ<EFBFBD><EFBFBD>-Ĭ<EFBFBD><EFBFBD>ֻ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>
if (isDelete) { if (isDelete) {
if (file.exists()) { if (file.exists()) {
file.delete(); file.delete();
@ -153,12 +143,7 @@ public class PhotoUtil {
} }
} }
/**
*
* <EFBFBD><EFBFBD>ȡͼƬ<EFBFBD><EFBFBD><EFBFBD>ԣ<EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD>ĽǶ<EFBFBD>
* @param path ͼƬ<EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><EFBFBD>
* @return degree<EFBFBD><EFBFBD>ת<EFBFBD>ĽǶ<EFBFBD>
*/
public static int readPictureDegree(String path) { public static int readPictureDegree(String path) {
int degree = 0; int degree = 0;
@ -185,30 +170,18 @@ public class PhotoUtil {
} }
/** <EFBFBD><EFBFBD>תͼƬһ<EFBFBD><EFBFBD><EFBFBD>Ƕ<EFBFBD>
* rotaingImageView
* @return Bitmap
* @throws
*/
public static Bitmap rotaingImageView(int angle, Bitmap bitmap) { public static Bitmap rotaingImageView(int angle, Bitmap bitmap) {
// <EFBFBD><EFBFBD>תͼƬ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Matrix matrix = new Matrix(); Matrix matrix = new Matrix();
matrix.postRotate(angle); matrix.postRotate(angle);
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>µ<EFBFBD>ͼƬ
Bitmap resizedBitmap = Bitmap.createBitmap(bitmap, 0, 0, Bitmap resizedBitmap = Bitmap.createBitmap(bitmap, 0, 0,
bitmap.getWidth(), bitmap.getHeight(), matrix, true); bitmap.getWidth(), bitmap.getHeight(), matrix, true);
return resizedBitmap; return resizedBitmap;
} }
/**
* <EFBFBD><EFBFBD>ͼƬ<EFBFBD><EFBFBD>ΪԲ<EFBFBD><EFBFBD>
*
* @param bitmap
* ԭBitmapͼƬ
* @param pixels
* ͼƬԲ<EFBFBD>ǵĻ<EFBFBD><EFBFBD><EFBFBD>(<EFBFBD><EFBFBD>λ:<EFBFBD><EFBFBD><EFBFBD><EFBFBD>(px))
* @return <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Բ<EFBFBD>ǵ<EFBFBD>ͼƬ(Bitmap <EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
*/
public static Bitmap toRoundCorner(Bitmap bitmap, int pixels) { public static Bitmap toRoundCorner(Bitmap bitmap, int pixels) {
Bitmap output = Bitmap.createBitmap(bitmap.getWidth(), Bitmap output = Bitmap.createBitmap(bitmap.getWidth(),
bitmap.getHeight(), Config.ARGB_8888); bitmap.getHeight(), Config.ARGB_8888);
@ -231,12 +204,7 @@ public class PhotoUtil {
return output; return output;
} }
/**
* <EFBFBD><EFBFBD>ͼƬת<EFBFBD><EFBFBD>ΪԲ<EFBFBD><EFBFBD>ͷ<EFBFBD><EFBFBD>
*
* @Title: toRoundBitmap
* @throws
*/
public static Bitmap toRoundBitmap(Bitmap bitmap) { public static Bitmap toRoundBitmap(Bitmap bitmap) {
int width = bitmap.getWidth(); int width = bitmap.getWidth();
int height = bitmap.getHeight(); int height = bitmap.getHeight();
@ -283,16 +251,16 @@ public class PhotoUtil {
(int) dst_right, (int) dst_bottom); (int) dst_right, (int) dst_bottom);
final RectF rectF = new RectF(dst); final RectF rectF = new RectF(dst);
paint.setAntiAlias(true);// <EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><EFBFBD><EFBFBD><EFBFBD>޾<EFBFBD><EFBFBD> paint.setAntiAlias(true);
canvas.drawARGB(0, 0, 0, 0); // <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Canvas canvas.drawARGB(0, 0, 0, 0);
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Բ,drawRounRect<EFBFBD><EFBFBD>drawCircle
canvas.drawRoundRect(rectF, roundPx, roundPx, paint);// <EFBFBD><EFBFBD>Բ<EFBFBD>Ǿ<EFBFBD><EFBFBD>Σ<EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊͼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD>򣬵ڶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>͵<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD><EFBFBD><EFBFBD>ˮƽԲ<EFBFBD>ǰ뾶<EFBFBD>ʹ<EFBFBD>ֱԲ<EFBFBD>ǰ뾶<EFBFBD><EFBFBD> canvas.drawRoundRect(rectF, roundPx, roundPx, paint);
// canvas.drawCircle(roundPx, roundPx, roundPx, paint); // canvas.drawCircle(roundPx, roundPx, roundPx, paint);
paint.setXfermode(new PorterDuffXfermode(Mode.SRC_IN));// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼƬ<EFBFBD>ཻʱ<EFBFBD><EFBFBD>ģʽ,<EFBFBD>ο<EFBFBD>http://trylovecatch.iteye.com/blog/1189452 paint.setXfermode(new PorterDuffXfermode(Mode.SRC_IN));
canvas.drawBitmap(bitmap, src, dst, paint); // <EFBFBD><EFBFBD>Mode.SRC_INģʽ<EFBFBD>ϲ<EFBFBD>bitmap<EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD>draw<EFBFBD>˵<EFBFBD>Circle canvas.drawBitmap(bitmap, src, dst, paint);
return output; return output;
} }

View File

@ -3,7 +3,7 @@ package com.example.administrator.myapplication.utils;
import com.example.administrator.myapplication.R; import com.example.administrator.myapplication.R;
/** /**
* Created by htq on 2016/9/15. * Created by htq on 2018/5/20.
*/ */
public class ResourceParser { public class ResourceParser {
public static final int TEXT_SMALL = 0; public static final int TEXT_SMALL = 0;

View File

@ -8,7 +8,7 @@ import java.lang.reflect.Method;
import java.util.Map; import java.util.Map;
/** /**
* Created by Wentong WANG on 2016/6/6. * Created by Wentong WANG on 2018/5/29.
*/ */
public class SPUtils { public class SPUtils {
/** /**

View File

@ -15,9 +15,9 @@ import java.util.regex.Pattern;
/** /**
* 字符串操作工具包 * 字符串操作工具包
* *
* @author liux (http://my.oschina.net/liux) * @author znf
* @version 1.0 * @version 1.0
* @created 2012-3-21 * @created 2018-4-21
*/ */
public class StringUtils { public class StringUtils {
private final static Pattern emailer = Pattern private final static Pattern emailer = Pattern
@ -344,7 +344,7 @@ public class StringUtils {
* @param dete1 * @param dete1
* @param date2 * @param date2
* @return * @return
* @author 火蚁 2015-2-9 下午4:50:06 * @author znf 2018-5-1
*/ */
public static long calDateDifferent(String dete1, String date2) { public static long calDateDifferent(String dete1, String date2) {

View File

@ -23,7 +23,7 @@ import java.io.InputStream;
import static android.content.Context.MODE_PRIVATE; import static android.content.Context.MODE_PRIVATE;
/** /**
* Created by htq on 2016/8/10. * Created by htq on 2018/4/10.
*/ */
public class SystemUtils { public class SystemUtils {

View File

@ -4,9 +4,9 @@ import java.util.Date;
import java.util.TimeZone; import java.util.TimeZone;
/** /**
* @author HuangWenwei * @author znf
* *
* @date 2014年10月9日 * @date 2017年10月9日
*/ */
public class TimeZoneUtil { public class TimeZoneUtil {
@ -24,7 +24,7 @@ public class TimeZoneUtil {
} }
/** /**
* 根据不同时区转换时间 2014年7月31 * 根据不同时区转换时间 2017年10月10
* @param time * @param time
* @return * @return
*/ */

View File

@ -2,13 +2,6 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<FrameLayout
android:id="@+id/js_root_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
</FrameLayout>
<RelativeLayout <RelativeLayout
android:layout_gravity="bottom" android:layout_gravity="bottom"
@ -25,4 +18,12 @@
</RelativeLayout> </RelativeLayout>
<FrameLayout
android:id="@+id/js_root_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
</FrameLayout>
</FrameLayout> </FrameLayout>