Merge branch 'feature/temp'

This commit is contained in:
xingxing
2018-01-17 23:02:43 +08:00
5 changed files with 29 additions and 35 deletions

View File

@@ -94,13 +94,13 @@ dependencies {
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'jp.wasabeef:glide-transformations:2.0.1'
compile 'com.android.support:support-v13:26.1.0'
compile 'com.yuyh.imgsel:library:1.3.2'
compile 'com.yuyh.imgsel:library:2.0.2'
compile 'com.facebook.stetho:stetho:1.4.2'
compile 'com.facebook.stetho:stetho-okhttp3:1.4.2'
compile 'com.github.houxg:FlexLayout:1.2'
compile 'net.danlew:android.joda:2.9.5'
compile group: 'com.tencent.bugly', name: 'crashreport_upgrade', version: '1.2.1'
compile 'com.tencent.bugly:crashreport_upgrade:latest.release'
compile 'com.elvishew:xlog:1.3.0'
compile 'com.github.piasy:BigImageViewer:1.2.5'
compile 'com.github.piasy:GlideImageLoader:1.2.5'

View File

@@ -66,19 +66,9 @@
android:name="com.tencent.bugly.beta.ui.BetaActivity"
android:theme="@android:style/Theme.Translucent" />
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="com.leanote.android.fileProvider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths" />
</provider>
<receiver
android:name=".appwidget.NoteAppWidget"
android:icon="@drawable/ic_add"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />

View File

@@ -5,7 +5,9 @@ import android.app.Application;
import android.content.Context;
import android.content.res.Resources;
import android.text.TextUtils;
import android.widget.ImageView;
import com.bumptech.glide.Glide;
import com.elvishew.xlog.LogLevel;
import com.elvishew.xlog.XLog;
import com.facebook.stetho.Stetho;
@@ -15,6 +17,8 @@ import com.raizlabs.android.dbflow.config.FlowConfig;
import com.raizlabs.android.dbflow.config.FlowManager;
import com.tencent.bugly.Bugly;
import com.tencent.bugly.beta.Beta;
import com.yuyh.library.imgsel.ISNav;
import com.yuyh.library.imgsel.common.ImageLoader;
import net.danlew.android.joda.JodaTimeAndroid;
@@ -48,6 +52,12 @@ public class Leamonax extends Application {
if (BuildConfig.DEBUG) {
Stetho.initializeWithDefaults(this);
}
ISNav.getInstance().init(new ImageLoader() {
@Override
public void displayImage(Context context, String path, ImageView imageView) {
Glide.with(context).load(path).into(imageView);
}
});
}
private void initBugly() {

View File

@@ -6,6 +6,7 @@ import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.graphics.Color;
import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.NonNull;
@@ -21,14 +22,13 @@ import android.view.ViewGroup;
import android.view.WindowManager;
import android.webkit.WebView;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.PopupWindow;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.elvishew.xlog.XLog;
import com.yuyh.library.imgsel.ImgSelActivity;
import com.yuyh.library.imgsel.ImgSelConfig;
import com.yuyh.library.imgsel.ISNav;
import com.yuyh.library.imgsel.config.ISListConfig;
import com.yuyh.library.imgsel.ui.ISListActivity;
import org.houxg.leamonax.R;
import org.houxg.leamonax.editor.Editor;
@@ -196,21 +196,22 @@ public class EditorFragment extends Fragment implements Editor.EditorListener {
}
private void openImageSelector(boolean supportSelfie) {
ImgSelConfig config = new ImgSelConfig.Builder(
getActivity(),
new com.yuyh.library.imgsel.ImageLoader() {
@Override
public void displayImage(Context context, String path, ImageView imageView) {
Glide.with(context).load(path).into(imageView);
}
})
ISListConfig config = new ISListConfig.Builder()
.multiSelect(false)
.rememberSelected(false)
.btnBgColor(Color.GRAY)
.btnTextColor(Color.BLUE)
.statusBarColor(Color.parseColor("#3F51B5"))
.backResId(R.drawable.ic_arrow_back_white)
.needCrop(true)
// .title("选择图片")
.titleColor(Color.WHITE)
.titleBgColor(Color.parseColor("#3F51B5"))
.cropSize(1, 1, 200, 200)
.needCrop(true)
.needCamera(supportSelfie)
.maxNum(9)
.build();
ImgSelActivity.startActivity(this, config, REQ_SELECT_IMAGE);
ISNav.getInstance().toListActivity(this, config, REQ_SELECT_IMAGE);
}
@OnClick(R.id.btn_link)
@@ -313,7 +314,7 @@ public class EditorFragment extends Fragment implements Editor.EditorListener {
&& resultCode == Activity.RESULT_OK
&& data != null
&& mListener != null) {
List<String> pathList = data.getStringArrayListExtra(ImgSelActivity.INTENT_RESULT);
List<String> pathList = data.getStringArrayListExtra(ISListActivity.INTENT_RESULT);
if (CollectionUtils.isNotEmpty(pathList)) {
String path = pathList.get(0);
XLog.i(TAG + "path=" + path);

View File

@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<!-- /storage/emulated/0/Download/${applicationId}/.beta/apk-->
<external-path name="beta_external_path" path="Download/"/>
<!--/storage/emulated/0/Android/data/${applicationId}/files/apk/-->
<external-path name="beta_external_files_path" path="Android/data/"/>
</paths>