pull/5/head v2.0.8
fengyuecanzhu 4 years ago
parent 233ab6d229
commit 3c520e296d
  1. 184
      DialogX/src/main/java/com/kongzue/dialogx/dialogs/WaitDialog.java
  2. 5
      DialogX/src/main/java/com/kongzue/dialogx/interfaces/BaseDialog.java
  3. 3
      DialogX/src/main/java/com/kongzue/dialogx/util/views/NoArticulatedProgressView.java
  4. 4
      app/src/main/assets/updatelog.fy
  5. 46
      app/src/main/java/xyz/fycz/myreader/enums/Font.java
  6. 31
      app/src/main/java/xyz/fycz/myreader/ui/activity/AboutActivity.java
  7. 10
      app/src/main/java/xyz/fycz/myreader/ui/activity/BookInfoEditActivity.java
  8. 5
      app/src/main/java/xyz/fycz/myreader/ui/activity/MainActivity.java
  9. 3
      app/src/main/java/xyz/fycz/myreader/ui/presenter/BookcasePresenter.java
  10. 103
      app/src/main/java/xyz/fycz/myreader/util/UriFileUtil.java
  11. 3
      app/src/main/java/xyz/fycz/myreader/util/utils/OkHttpUtils.java
  12. 20
      app/src/main/res/drawable/ic_edit.xml
  13. 14
      app/src/main/res/drawable/ic_share.xml
  14. 17
      app/src/main/res/drawable/ic_top.xml
  15. 4
      app/version_code.properties

@ -43,21 +43,21 @@ import java.lang.ref.WeakReference;
* @createTime: 2020/9/27 14:50 * @createTime: 2020/9/27 14:50
*/ */
public class WaitDialog extends BaseDialog { public class WaitDialog extends BaseDialog {
public static int overrideEnterDuration = -1; public static int overrideEnterDuration = -1;
public static int overrideExitDuration = -1; public static int overrideExitDuration = -1;
public static int overrideEnterAnimRes = 0; public static int overrideEnterAnimRes = 0;
public static int overrideExitAnimRes = 0; public static int overrideExitAnimRes = 0;
public static BOOLEAN overrideCancelable; public static BOOLEAN overrideCancelable;
protected OnBindView<WaitDialog> onBindView; protected OnBindView<WaitDialog> onBindView;
public enum TYPE { public enum TYPE {
NONE, NONE,
SUCCESS, SUCCESS,
WARNING, WARNING,
ERROR ERROR
} }
protected static WeakReference<WaitDialog> me; protected static WeakReference<WaitDialog> me;
protected CharSequence message; protected CharSequence message;
protected long tipShowDuration = 1500; protected long tipShowDuration = 1500;
@ -66,20 +66,20 @@ public class WaitDialog extends BaseDialog {
protected TextInfo messageTextInfo; protected TextInfo messageTextInfo;
protected int maskColor = -1; protected int maskColor = -1;
protected BOOLEAN privateCancelable; protected BOOLEAN privateCancelable;
private DialogLifecycleCallback<WaitDialog> dialogLifecycleCallback; private DialogLifecycleCallback<WaitDialog> dialogLifecycleCallback;
protected WaitDialog() { protected WaitDialog() {
super(); super();
me = new WeakReference<>(this); me = new WeakReference<>(this);
cancelable = DialogX.cancelableTipDialog; cancelable = DialogX.cancelableTipDialog;
} }
public static WaitDialog show(CharSequence message) { public static WaitDialog show(CharSequence message) {
DialogImpl dialogImpl = me().dialogImpl; DialogImpl dialogImpl = me().dialogImpl;
me().message = message; me().message = message;
me().showType = -1; me().showType = -1;
if (dialogImpl != null) { if (dialogImpl != null && dialogImpl.progressView != null) {
dialogImpl.progressView.loading(); dialogImpl.progressView.loading();
setMessage(message); setMessage(message);
return me(); return me();
@ -90,12 +90,12 @@ public class WaitDialog extends BaseDialog {
return waitDialog; return waitDialog;
} }
} }
public static WaitDialog show(Activity activity, CharSequence message) { public static WaitDialog show(Activity activity, CharSequence message) {
DialogImpl dialogImpl = me().dialogImpl; DialogImpl dialogImpl = me().dialogImpl;
me().message = message; me().message = message;
me().showType = -1; me().showType = -1;
if (dialogImpl != null && dialogImpl.bkg.getContext() == activity) { if (dialogImpl != null&& dialogImpl.progressView != null && dialogImpl.bkg.getContext() == activity) {
dialogImpl.progressView.loading(); dialogImpl.progressView.loading();
setMessage(message); setMessage(message);
return me(); return me();
@ -106,12 +106,12 @@ public class WaitDialog extends BaseDialog {
return waitDialog; return waitDialog;
} }
} }
public static WaitDialog show(int messageResId) { public static WaitDialog show(int messageResId) {
DialogImpl dialogImpl = me().dialogImpl; DialogImpl dialogImpl = me().dialogImpl;
me().preMessage(messageResId); me().preMessage(messageResId);
me().showType = -1; me().showType = -1;
if (dialogImpl != null) { if (dialogImpl != null&& dialogImpl.progressView != null) {
dialogImpl.progressView.loading(); dialogImpl.progressView.loading();
setMessage(messageResId); setMessage(messageResId);
return me(); return me();
@ -122,12 +122,12 @@ public class WaitDialog extends BaseDialog {
return waitDialog; return waitDialog;
} }
} }
public static WaitDialog show(Activity activity, int messageResId) { public static WaitDialog show(Activity activity, int messageResId) {
DialogImpl dialogImpl = me().dialogImpl; DialogImpl dialogImpl = me().dialogImpl;
me().preMessage(messageResId); me().preMessage(messageResId);
me().showType = -1; me().showType = -1;
if (dialogImpl != null && dialogImpl.bkg.getContext() == activity) { if (dialogImpl != null&& dialogImpl.progressView != null && dialogImpl.bkg.getContext() == activity) {
dialogImpl.progressView.loading(); dialogImpl.progressView.loading();
setMessage(messageResId); setMessage(messageResId);
return me(); return me();
@ -138,12 +138,12 @@ public class WaitDialog extends BaseDialog {
return waitDialog; return waitDialog;
} }
} }
public static WaitDialog show(CharSequence message, float progress) { public static WaitDialog show(CharSequence message, float progress) {
DialogImpl dialogImpl = me().dialogImpl; DialogImpl dialogImpl = me().dialogImpl;
me().showType = -1; me().showType = -1;
me().preMessage(message); me().preMessage(message);
if (dialogImpl != null) { if (dialogImpl != null&& dialogImpl.progressView != null) {
setMessage(message); setMessage(message);
me().setProgress(progress); me().setProgress(progress);
return me(); return me();
@ -155,12 +155,12 @@ public class WaitDialog extends BaseDialog {
return waitDialog; return waitDialog;
} }
} }
public static WaitDialog show(Activity activity, CharSequence message, float progress) { public static WaitDialog show(Activity activity, CharSequence message, float progress) {
DialogImpl dialogImpl = me().dialogImpl; DialogImpl dialogImpl = me().dialogImpl;
me().showType = -1; me().showType = -1;
me().preMessage(message); me().preMessage(message);
if (dialogImpl != null && dialogImpl.bkg.getContext() == activity) { if (dialogImpl != null && dialogImpl.progressView != null&& dialogImpl.bkg.getContext() == activity) {
setMessage(message); setMessage(message);
me().setProgress(progress); me().setProgress(progress);
return me(); return me();
@ -172,12 +172,12 @@ public class WaitDialog extends BaseDialog {
return waitDialog; return waitDialog;
} }
} }
public static WaitDialog show(int messageResId, float progress) { public static WaitDialog show(int messageResId, float progress) {
DialogImpl dialogImpl = me().dialogImpl; DialogImpl dialogImpl = me().dialogImpl;
me().showType = -1; me().showType = -1;
me().preMessage(messageResId); me().preMessage(messageResId);
if (dialogImpl != null) { if (dialogImpl != null&& dialogImpl.progressView != null) {
setMessage(messageResId); setMessage(messageResId);
me().setProgress(progress); me().setProgress(progress);
return me(); return me();
@ -189,12 +189,12 @@ public class WaitDialog extends BaseDialog {
return waitDialog; return waitDialog;
} }
} }
public static WaitDialog show(Activity activity, int messageResId, float progress) { public static WaitDialog show(Activity activity, int messageResId, float progress) {
DialogImpl dialogImpl = me().dialogImpl; DialogImpl dialogImpl = me().dialogImpl;
me().showType = -1; me().showType = -1;
me().preMessage(messageResId); me().preMessage(messageResId);
if (dialogImpl != null && dialogImpl.bkg.getContext() == activity) { if (dialogImpl != null&& dialogImpl.progressView != null && dialogImpl.bkg.getContext() == activity) {
setMessage(messageResId); setMessage(messageResId);
me().setProgress(progress); me().setProgress(progress);
return me(); return me();
@ -206,11 +206,11 @@ public class WaitDialog extends BaseDialog {
return waitDialog; return waitDialog;
} }
} }
public static WaitDialog show(Activity activity, float progress) { public static WaitDialog show(Activity activity, float progress) {
DialogImpl dialogImpl = me().dialogImpl; DialogImpl dialogImpl = me().dialogImpl;
me().showType = -1; me().showType = -1;
if (dialogImpl != null && dialogImpl.bkg.getContext() == activity) { if (dialogImpl != null&& dialogImpl.progressView != null && dialogImpl.bkg.getContext() == activity) {
me().setProgress(progress); me().setProgress(progress);
return me(); return me();
} else { } else {
@ -220,11 +220,11 @@ public class WaitDialog extends BaseDialog {
return waitDialog; return waitDialog;
} }
} }
public static WaitDialog show(float progress) { public static WaitDialog show(float progress) {
DialogImpl dialogImpl = me().dialogImpl; DialogImpl dialogImpl = me().dialogImpl;
me().showType = -1; me().showType = -1;
if (dialogImpl != null) { if (dialogImpl != null&& dialogImpl.progressView != null) {
me().setProgress(progress); me().setProgress(progress);
return me(); return me();
} else { } else {
@ -234,19 +234,19 @@ public class WaitDialog extends BaseDialog {
return waitDialog; return waitDialog;
} }
} }
public float getProgress() { public float getProgress() {
return waitProgress; return waitProgress;
} }
public WaitDialog setProgress(float waitProgress) { public WaitDialog setProgress(float waitProgress) {
this.waitProgress = waitProgress; this.waitProgress = waitProgress;
refreshUI(); refreshUI();
return this; return this;
} }
private View dialogView; private View dialogView;
public WaitDialog show() { public WaitDialog show() {
super.beforeShow(); super.beforeShow();
int layoutResId = R.layout.layout_dialogx_wait; int layoutResId = R.layout.layout_dialogx_wait;
@ -264,7 +264,7 @@ public class WaitDialog extends BaseDialog {
}); });
return this; return this;
} }
public WaitDialog show(final Activity activity) { public WaitDialog show(final Activity activity) {
super.beforeShow(); super.beforeShow();
int layoutResId = R.layout.layout_dialogx_wait; int layoutResId = R.layout.layout_dialogx_wait;
@ -282,9 +282,9 @@ public class WaitDialog extends BaseDialog {
}); });
return this; return this;
} }
protected DialogImpl dialogImpl; protected DialogImpl dialogImpl;
public class DialogImpl implements DialogConvertViewInterface { public class DialogImpl implements DialogConvertViewInterface {
public DialogXBaseRelativeLayout boxRoot; public DialogXBaseRelativeLayout boxRoot;
public MaxRelativeLayout bkg; public MaxRelativeLayout bkg;
@ -293,14 +293,14 @@ public class WaitDialog extends BaseDialog {
public ProgressViewInterface progressView; public ProgressViewInterface progressView;
public RelativeLayout boxCustomView; public RelativeLayout boxCustomView;
public TextView txtInfo; public TextView txtInfo;
private int layoutResId; private int layoutResId;
public DialogImpl(int layoutResId) { public DialogImpl(int layoutResId) {
this.layoutResId = layoutResId; this.layoutResId = layoutResId;
} }
public void lazyCreate(){ public void lazyCreate() {
dialogView = createView(layoutResId); dialogView = createView(layoutResId);
boxRoot = dialogView.findViewById(R.id.box_root); boxRoot = dialogView.findViewById(R.id.box_root);
bkg = dialogView.findViewById(R.id.bkg); bkg = dialogView.findViewById(R.id.bkg);
@ -318,7 +318,7 @@ public class WaitDialog extends BaseDialog {
dialogImpl = this; dialogImpl = this;
refreshView(); refreshView();
} }
public DialogImpl(View convertView) { public DialogImpl(View convertView) {
boxRoot = convertView.findViewById(R.id.box_root); boxRoot = convertView.findViewById(R.id.box_root);
bkg = convertView.findViewById(R.id.bkg); bkg = convertView.findViewById(R.id.bkg);
@ -336,18 +336,18 @@ public class WaitDialog extends BaseDialog {
dialogImpl = this; dialogImpl = this;
refreshView(); refreshView();
} }
public void init() { public void init() {
if (messageTextInfo == null) messageTextInfo = DialogX.tipTextInfo; if (messageTextInfo == null) messageTextInfo = DialogX.tipTextInfo;
if (backgroundColor == -1) backgroundColor = DialogX.tipBackgroundColor; if (backgroundColor == -1) backgroundColor = DialogX.tipBackgroundColor;
if (style.overrideWaitTipRes() == null) { if (style.overrideWaitTipRes() == null) {
blurView.setRadiusPx(dip2px(15)); blurView.setRadiusPx(dip2px(15));
} else { } else {
blurView.setRadiusPx(style.overrideWaitTipRes().overrideRadiusPx() < 0 ? dip2px(15) : style.overrideWaitTipRes().overrideRadiusPx()); blurView.setRadiusPx(style.overrideWaitTipRes().overrideRadiusPx() < 0 ? dip2px(15) : style.overrideWaitTipRes().overrideRadiusPx());
} }
boxRoot.setClickable(true); boxRoot.setClickable(true);
boxRoot.setParentDialog(me.get()); boxRoot.setParentDialog(me.get());
boxRoot.setOnLifecycleCallBack(new DialogXBaseRelativeLayout.OnLifecycleCallBack() { boxRoot.setOnLifecycleCallBack(new DialogXBaseRelativeLayout.OnLifecycleCallBack() {
@Override @Override
@ -372,18 +372,18 @@ public class WaitDialog extends BaseDialog {
} }
enterAnim.setDuration(enterAnimDurationTemp); enterAnim.setDuration(enterAnimDurationTemp);
bkg.startAnimation(enterAnim); bkg.startAnimation(enterAnim);
boxRoot.animate() boxRoot.animate()
.setDuration(enterAnimDurationTemp) .setDuration(enterAnimDurationTemp)
.alpha(1f) .alpha(1f)
.setInterpolator(new DecelerateInterpolator()) .setInterpolator(new DecelerateInterpolator())
.setListener(null); .setListener(null);
getDialogLifecycleCallback().onShow(me()); getDialogLifecycleCallback().onShow(me());
} }
}); });
} }
@Override @Override
public void onDismiss() { public void onDismiss() {
isShow = false; isShow = false;
@ -392,7 +392,7 @@ public class WaitDialog extends BaseDialog {
me.clear(); me.clear();
} }
}); });
if (readyTipType != null) { if (readyTipType != null) {
progressView.noLoading(); progressView.noLoading();
((View) progressView).postDelayed(new Runnable() { ((View) progressView).postDelayed(new Runnable() {
@ -402,7 +402,7 @@ public class WaitDialog extends BaseDialog {
} }
}, 100); }, 100);
} }
boxRoot.setOnBackPressedListener(new OnBackPressedListener() { boxRoot.setOnBackPressedListener(new OnBackPressedListener() {
@Override @Override
public boolean onBackPressed() { public boolean onBackPressed() {
@ -417,9 +417,9 @@ public class WaitDialog extends BaseDialog {
} }
}); });
} }
private float oldProgress; private float oldProgress;
public void refreshView() { public void refreshView() {
if (style.overrideWaitTipRes() != null) { if (style.overrideWaitTipRes() != null) {
int overrideBackgroundColorRes = style.overrideWaitTipRes().overrideBackgroundColorRes(isLightTheme()); int overrideBackgroundColorRes = style.overrideWaitTipRes().overrideBackgroundColorRes(isLightTheme());
@ -446,17 +446,17 @@ public class WaitDialog extends BaseDialog {
} }
} }
if (DialogX.tipProgressColor != -1) progressView.setColor(DialogX.tipProgressColor); if (DialogX.tipProgressColor != -1) progressView.setColor(DialogX.tipProgressColor);
if (waitProgress >= 0 && waitProgress <= 1 && oldProgress != waitProgress) { if (waitProgress >= 0 && waitProgress <= 1 && oldProgress != waitProgress) {
progressView.progress(waitProgress); progressView.progress(waitProgress);
oldProgress = waitProgress; oldProgress = waitProgress;
} }
showText(txtInfo, message); showText(txtInfo, message);
useTextInfo(txtInfo, messageTextInfo); useTextInfo(txtInfo, messageTextInfo);
if (maskColor != -1) boxRoot.setBackgroundColor(maskColor); if (maskColor != -1) boxRoot.setBackgroundColor(maskColor);
if (onBindView != null && onBindView.getCustomView() != null) { if (onBindView != null && onBindView.getCustomView() != null) {
onBindView.bindParent(boxCustomView, me.get()); onBindView.bindParent(boxCustomView, me.get());
boxCustomView.setVisibility(View.VISIBLE); boxCustomView.setVisibility(View.VISIBLE);
@ -466,13 +466,13 @@ public class WaitDialog extends BaseDialog {
boxProgress.setVisibility(View.VISIBLE); boxProgress.setVisibility(View.VISIBLE);
} }
} }
public void doDismiss(final View v) { public void doDismiss(final View v) {
boxRoot.post(new Runnable() { boxRoot.post(new Runnable() {
@Override @Override
public void run() { public void run() {
if (v != null) v.setEnabled(false); if (v != null) v.setEnabled(false);
int exitAnimResId = R.anim.anim_dialogx_default_exit; int exitAnimResId = R.anim.anim_dialogx_default_exit;
if (overrideExitAnimRes != 0) { if (overrideExitAnimRes != 0) {
exitAnimResId = overrideExitAnimRes; exitAnimResId = overrideExitAnimRes;
@ -488,12 +488,12 @@ public class WaitDialog extends BaseDialog {
exitAnim.setDuration(exitAnimDurationTemp); exitAnim.setDuration(exitAnimDurationTemp);
exitAnim.setInterpolator(new AccelerateInterpolator()); exitAnim.setInterpolator(new AccelerateInterpolator());
bkg.startAnimation(exitAnim); bkg.startAnimation(exitAnim);
boxRoot.animate() boxRoot.animate()
.alpha(0f) .alpha(0f)
.setInterpolator(new AccelerateInterpolator()) .setInterpolator(new AccelerateInterpolator())
.setDuration(exitAnimDurationTemp); .setDuration(exitAnimDurationTemp);
new Handler(Looper.getMainLooper()).postDelayed(new Runnable() { new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
@Override @Override
public void run() { public void run() {
@ -503,7 +503,7 @@ public class WaitDialog extends BaseDialog {
} }
}); });
} }
public void showTip(final TYPE tip) { public void showTip(final TYPE tip) {
runOnMain(new Runnable() { runOnMain(new Runnable() {
@Override @Override
@ -524,7 +524,7 @@ public class WaitDialog extends BaseDialog {
progressView.error(); progressView.error();
break; break;
} }
//此事件是在完成衔接动画绘制后执行的逻辑 //此事件是在完成衔接动画绘制后执行的逻辑
progressView.whenShowTick(new Runnable() { progressView.whenShowTick(new Runnable() {
@Override @Override
@ -545,12 +545,12 @@ public class WaitDialog extends BaseDialog {
}); });
} }
} }
@Override @Override
public String dialogKey() { public String dialogKey() {
return getClass().getSimpleName() + "(" + Integer.toHexString(hashCode()) + ")"; return getClass().getSimpleName() + "(" + Integer.toHexString(hashCode()) + ")";
} }
@Override @Override
public boolean isLightTheme() { public boolean isLightTheme() {
if (DialogX.tipTheme == null) { if (DialogX.tipTheme == null) {
@ -559,7 +559,7 @@ public class WaitDialog extends BaseDialog {
return DialogX.tipTheme == DialogX.THEME.LIGHT; return DialogX.tipTheme == DialogX.THEME.LIGHT;
} }
} }
public void refreshUI() { public void refreshUI() {
runOnMain(new Runnable() { runOnMain(new Runnable() {
@Override @Override
@ -568,67 +568,67 @@ public class WaitDialog extends BaseDialog {
} }
}); });
} }
public void doDismiss() { public void doDismiss() {
if (dialogImpl == null) return; if (dialogImpl == null) return;
dialogImpl.doDismiss(null); dialogImpl.doDismiss(null);
} }
public static void dismiss() { public static void dismiss() {
me().doDismiss(); me().doDismiss();
} }
protected static WaitDialog me() { protected static WaitDialog me() {
if (me == null || me.get() == null) me = new WeakReference<>(new WaitDialog()); if (me == null || me.get() == null) me = new WeakReference<>(new WaitDialog());
return me.get(); return me.get();
} }
protected TYPE readyTipType; protected TYPE readyTipType;
protected void showTip(CharSequence message, TYPE type) { protected void showTip(CharSequence message, TYPE type) {
showType = type.ordinal(); showType = type.ordinal();
this.message = message; this.message = message;
readyTipType = type; readyTipType = type;
show(); show();
} }
protected void showTip(Activity activity, CharSequence message, TYPE type) { protected void showTip(Activity activity, CharSequence message, TYPE type) {
showType = type.ordinal(); showType = type.ordinal();
this.message = message; this.message = message;
readyTipType = type; readyTipType = type;
show(activity); show(activity);
} }
protected void showTip(int messageResId, TYPE type) { protected void showTip(int messageResId, TYPE type) {
showType = type.ordinal(); showType = type.ordinal();
this.message = getString(messageResId); this.message = getString(messageResId);
readyTipType = type; readyTipType = type;
show(); show();
} }
protected void showTip(Activity activity, int messageResId, TYPE type) { protected void showTip(Activity activity, int messageResId, TYPE type) {
showType = type.ordinal(); showType = type.ordinal();
this.message = getString(messageResId); this.message = getString(messageResId);
readyTipType = type; readyTipType = type;
show(activity); show(activity);
} }
public static CharSequence getMessage() { public static CharSequence getMessage() {
return me().message; return me().message;
} }
public static WaitDialog setMessage(CharSequence message) { public static WaitDialog setMessage(CharSequence message) {
me().preMessage(message); me().preMessage(message);
me().refreshUI(); me().refreshUI();
return me(); return me();
} }
public static WaitDialog setMessage(int messageResId) { public static WaitDialog setMessage(int messageResId) {
me().preMessage(messageResId); me().preMessage(messageResId);
me().refreshUI(); me().refreshUI();
return me(); return me();
} }
public boolean isCancelable() { public boolean isCancelable() {
if (privateCancelable != null) { if (privateCancelable != null) {
return privateCancelable == BOOLEAN.TRUE; return privateCancelable == BOOLEAN.TRUE;
@ -638,12 +638,12 @@ public class WaitDialog extends BaseDialog {
} }
return cancelable; return cancelable;
} }
public WaitDialog setCancelable(boolean cancelable) { public WaitDialog setCancelable(boolean cancelable) {
privateCancelable = cancelable ? BOOLEAN.TRUE : BOOLEAN.FALSE; privateCancelable = cancelable ? BOOLEAN.TRUE : BOOLEAN.FALSE;
return this; return this;
} }
/** /**
* 用于从 WaitDialog TipDialog 的消息设置 * 用于从 WaitDialog TipDialog 的消息设置
* 此方法不会立即执行而是等到动画衔接完成后由事件设置 * 此方法不会立即执行而是等到动画衔接完成后由事件设置
@ -655,95 +655,95 @@ public class WaitDialog extends BaseDialog {
me().message = message; me().message = message;
return me(); return me();
} }
protected WaitDialog preMessage(int messageResId) { protected WaitDialog preMessage(int messageResId) {
me().message = getString(messageResId); me().message = getString(messageResId);
return me(); return me();
} }
public DialogLifecycleCallback<WaitDialog> getDialogLifecycleCallback() { public DialogLifecycleCallback<WaitDialog> getDialogLifecycleCallback() {
return dialogLifecycleCallback == null ? new DialogLifecycleCallback<WaitDialog>() { return dialogLifecycleCallback == null ? new DialogLifecycleCallback<WaitDialog>() {
} : dialogLifecycleCallback; } : dialogLifecycleCallback;
} }
public WaitDialog setDialogLifecycleCallback(DialogLifecycleCallback<WaitDialog> dialogLifecycleCallback) { public WaitDialog setDialogLifecycleCallback(DialogLifecycleCallback<WaitDialog> dialogLifecycleCallback) {
this.dialogLifecycleCallback = dialogLifecycleCallback; this.dialogLifecycleCallback = dialogLifecycleCallback;
if (isShow) dialogLifecycleCallback.onShow(me.get()); if (isShow) dialogLifecycleCallback.onShow(me.get());
return this; return this;
} }
public DialogImpl getDialogImpl() { public DialogImpl getDialogImpl() {
return dialogImpl; return dialogImpl;
} }
public WaitDialog setCustomView(OnBindView<WaitDialog> onBindView) { public WaitDialog setCustomView(OnBindView<WaitDialog> onBindView) {
this.onBindView = onBindView; this.onBindView = onBindView;
refreshUI(); refreshUI();
return this; return this;
} }
public View getCustomView() { public View getCustomView() {
if (onBindView == null) return null; if (onBindView == null) return null;
return onBindView.getCustomView(); return onBindView.getCustomView();
} }
public WaitDialog removeCustomView() { public WaitDialog removeCustomView() {
this.onBindView.clean(); this.onBindView.clean();
refreshUI(); refreshUI();
return this; return this;
} }
public OnBackPressedListener getOnBackPressedListener() { public OnBackPressedListener getOnBackPressedListener() {
return onBackPressedListener; return onBackPressedListener;
} }
public WaitDialog setOnBackPressedListener(OnBackPressedListener onBackPressedListener) { public WaitDialog setOnBackPressedListener(OnBackPressedListener onBackPressedListener) {
this.onBackPressedListener = onBackPressedListener; this.onBackPressedListener = onBackPressedListener;
refreshUI(); refreshUI();
return this; return this;
} }
public int getBackgroundColor() { public int getBackgroundColor() {
return backgroundColor; return backgroundColor;
} }
public WaitDialog setBackgroundColor(@ColorInt int backgroundColor) { public WaitDialog setBackgroundColor(@ColorInt int backgroundColor) {
this.backgroundColor = backgroundColor; this.backgroundColor = backgroundColor;
refreshUI(); refreshUI();
return this; return this;
} }
public WaitDialog setBackgroundColorRes(@ColorRes int backgroundColorResId) { public WaitDialog setBackgroundColorRes(@ColorRes int backgroundColorResId) {
this.backgroundColor = getColor(backgroundColorResId); this.backgroundColor = getColor(backgroundColorResId);
refreshUI(); refreshUI();
return this; return this;
} }
public WaitDialog setMaskColor(@ColorInt int maskColor) { public WaitDialog setMaskColor(@ColorInt int maskColor) {
this.maskColor = maskColor; this.maskColor = maskColor;
refreshUI(); refreshUI();
return this; return this;
} }
public WaitDialog setEnterAnimDuration(long enterAnimDuration) { public WaitDialog setEnterAnimDuration(long enterAnimDuration) {
this.enterAnimDuration = enterAnimDuration; this.enterAnimDuration = enterAnimDuration;
return this; return this;
} }
public long getExitAnimDuration() { public long getExitAnimDuration() {
return exitAnimDuration; return exitAnimDuration;
} }
public WaitDialog setExitAnimDuration(long exitAnimDuration) { public WaitDialog setExitAnimDuration(long exitAnimDuration) {
this.exitAnimDuration = exitAnimDuration; this.exitAnimDuration = exitAnimDuration;
return this; return this;
} }
@Override @Override
public void onUIModeChange(Configuration newConfig) { public void onUIModeChange(Configuration newConfig) {
refreshUI(); refreshUI();
} }
public static WaitDialog getInstance() { public static WaitDialog getInstance() {
return me(); return me();
} }

@ -298,7 +298,10 @@ public abstract class BaseDialog {
} }
public static FrameLayout getRootFrameLayout() { public static FrameLayout getRootFrameLayout() {
if (rootFrameLayout == null) return null; if (rootFrameLayout == null) {
error("DialogX 未初始化。\n请检查是否在启动对话框前进行初始化操作,使用以下代码进行初始化:\nDialogX.init(context);\n\n另外建议您前往查看 DialogX 的文档进行使用:https://github.com/kongzue/DialogX");
return null;
}
return rootFrameLayout.get(); return rootFrameLayout.get();
} }

@ -19,6 +19,7 @@ import android.view.animation.LinearInterpolator;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import com.kongzue.dialogx.DialogX;
import com.kongzue.dialogx.R; import com.kongzue.dialogx.R;
import com.kongzue.dialogx.interfaces.ProgressViewInterface; import com.kongzue.dialogx.interfaces.ProgressViewInterface;
@ -188,7 +189,7 @@ public class NoArticulatedProgressView extends View implements ProgressViewInter
} }
if (tickShowRunnable != null) { if (tickShowRunnable != null) {
tickShowRunnable.run(); tickShowRunnable.run();
performHapticFeedback(HapticFeedbackConstants.LONG_PRESS); if (DialogX.useHaptic)performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
tickShowRunnable = null; tickShowRunnable = null;
} }
switch (status) { switch (status) {

@ -1,6 +1,10 @@
2021.06.04
风月读书v2.0.8 风月读书v2.0.8
更新内容: 更新内容:
1、优化书籍、书源拖拽移动效果 1、优化书籍、书源拖拽移动效果
2、重做书籍长按菜单
3、修复部分字体无法下载的问题
4、修复其他已知bug
2021.06.03 2021.06.03
风月读书v2.0.7 风月读书v2.0.7

@ -1,31 +1,33 @@
package xyz.fycz.myreader.enums; package xyz.fycz.myreader.enums;
import xyz.fycz.myreader.common.URLCONST;
public enum Font { public enum Font {
默认字体( "默认字体"), 默认字体( "默认字体"),
本地字体( "默认字体"), 本地字体( "默认字体"),
方正楷体( "https://fycz.lanzousi.com/ilLFMe6kefe"), 方正楷体( URLCONST.LAN_ZOUS_URL + " /ilLFMe6kefe"),
方正行楷( "https://fycz.lanzousi.com/imFvne6keji"), 方正行楷( URLCONST.LAN_ZOUS_URL + "/imFvne6keji"),
经典宋体("https://fycz.lanzousi.com/idhI5e6keqf"), 经典宋体(URLCONST.LAN_ZOUS_URL + "/idhI5e6keqf"),
方正硬笔行书("https://fycz.lanzousi.com/ilVh6ep9xja"), 方正硬笔行书(URLCONST.LAN_ZOUS_URL + "/ilVh6ep9xja"),
包图小白体("https://fycz.lanzoui.com/i5qgAicrirc"), 包图小白体(URLCONST.LAN_ZOUS_URL + "/i5qgAicrirc"),
仓耳非白W02("https://fycz.lanzoui.com/iHwRnicriuf"), 仓耳非白W02(URLCONST.LAN_ZOUS_URL + "/iHwRnicriuf"),
仓耳舒圆体W02("https://fycz.lanzoui.com/i3GVPicrj3e"), 仓耳舒圆体W02(URLCONST.LAN_ZOUS_URL + "/i3GVPicrj3e"),
仓耳与墨W02("https://fycz.lanzoui.com/ivhv9icrj7i"), 仓耳与墨W02(URLCONST.LAN_ZOUS_URL + "/ivhv9icrj7i"),
方正仿宋简体("https://fycz.lanzoui.com/iEcCHicrjef"), 方正仿宋简体(URLCONST.LAN_ZOUS_URL + "/iEcCHicrjef"),
方正黑体简体("https://fycz.lanzoui.com/iw8kKicrjij"), 方正黑体简体(URLCONST.LAN_ZOUS_URL + "/iw8kKicrjij"),
方正书宋简体("https://fycz.lanzoui.com/i5976icrjmd"), 方正书宋简体(URLCONST.LAN_ZOUS_URL + "/i5976icrjmd"),
品如手写体("https://fycz.lanzoui.com/iZccuicrjyf"), 品如手写体(URLCONST.LAN_ZOUS_URL + "/iZccuicrjyf"),
千图小兔体("https://fycz.lanzoui.com/iOONMicrkda"), 千图小兔体(URLCONST.LAN_ZOUS_URL + "/iOONMicrkda"),
手书体("https://fycz.lanzoui.com/iqbmdicrkvi"), 手书体(URLCONST.LAN_ZOUS_URL + "/iqbmdicrkvi"),
演示春风楷("https://fycz.lanzoui.com/ioRJSicrldg"), 演示春风楷(URLCONST.LAN_ZOUS_URL + "/ioRJSicrldg"),
演示秋鸿楷("https://fycz.lanzoui.com/i8qnzicrlsb"), 演示秋鸿楷(URLCONST.LAN_ZOUS_URL + "/i8qnzicrlsb"),
演示夏行楷("https://fycz.lanzoui.com/iyYUTicrm6f"), 演示夏行楷(URLCONST.LAN_ZOUS_URL + "/iyYUTicrm6f"),
演示悠然小楷("https://fycz.lanzoui.com/ikKq7icrmrg"), 演示悠然小楷(URLCONST.LAN_ZOUS_URL + "/ikKq7icrmrg"),
杨任东竹石体("https://fycz.lanzoui.com/iiWdVicrnbg"), 杨任东竹石体(URLCONST.LAN_ZOUS_URL + "/iiWdVicrnbg"),
站酷仓耳渔阳体("https://fycz.lanzoui.com/if5weicrnje"), 站酷仓耳渔阳体(URLCONST.LAN_ZOUS_URL + "/if5weicrnje"),
迷你隶书( "https://fycz.lanzousi.com/ihaXVe6kekj"), 迷你隶书( URLCONST.LAN_ZOUS_URL + "/ihaXVe6kekj"),
方正黄草("https://fycz.lanzousi.com/iQg67e6keed"); 方正黄草(URLCONST.LAN_ZOUS_URL + "/iQg67e6keed");
public String downloadPath; public String downloadPath;

@ -14,6 +14,7 @@ import java.io.File;
import io.reactivex.Observable; import io.reactivex.Observable;
import io.reactivex.ObservableOnSubscribe; import io.reactivex.ObservableOnSubscribe;
import io.reactivex.disposables.Disposable;
import xyz.fycz.myreader.R; import xyz.fycz.myreader.R;
import xyz.fycz.myreader.application.App; import xyz.fycz.myreader.application.App;
import xyz.fycz.myreader.base.BaseActivity; import xyz.fycz.myreader.base.BaseActivity;
@ -22,6 +23,7 @@ import xyz.fycz.myreader.common.APPCONST;
import xyz.fycz.myreader.common.URLCONST; import xyz.fycz.myreader.common.URLCONST;
import xyz.fycz.myreader.databinding.ActivityAboutBinding; import xyz.fycz.myreader.databinding.ActivityAboutBinding;
import xyz.fycz.myreader.ui.dialog.DialogCreator; import xyz.fycz.myreader.ui.dialog.DialogCreator;
import xyz.fycz.myreader.ui.dialog.LoadingDialog;
import xyz.fycz.myreader.util.ShareUtils; import xyz.fycz.myreader.util.ShareUtils;
import xyz.fycz.myreader.util.SharedPreUtils; import xyz.fycz.myreader.util.SharedPreUtils;
import xyz.fycz.myreader.util.ToastUtils; import xyz.fycz.myreader.util.ToastUtils;
@ -73,7 +75,9 @@ public class AboutActivity extends BaseActivity {
SharedPreUtils.getInstance().getString(getString(R.string.downloadLink), URLCONST.LAN_ZOUS_URL))); SharedPreUtils.getInstance().getString(getString(R.string.downloadLink), URLCONST.LAN_ZOUS_URL)));
binding.il.vwUpdate.setOnClickListener(v -> App.checkVersionByServer(this, true)); binding.il.vwUpdate.setOnClickListener(v -> App.checkVersionByServer(this, true));
binding.il.vwUpdateLog.setOnClickListener(v -> DialogCreator.createAssetTipDialog(this, "更新日志", "updatelog.fy")); binding.il.vwUpdateLog.setOnClickListener(v -> DialogCreator.createAssetTipDialog(this, "更新日志", "updatelog.fy"));
binding.il.vwShareLog.setOnClickListener(v -> shareCrashLog()); binding.il.vwShareLog.setOnClickListener(v -> DialogCreator.createCommonDialog(this, "分享崩溃日志",
"你是希望将日志上传到服务器,还是直接分享给他人?", true,
"上传服务器", "直接分享", (dialog, which) -> uploadCrashLog(), (dialog, which) -> shareCrashLog()));
binding.il.vwQq.setOnClickListener(v -> { binding.il.vwQq.setOnClickListener(v -> {
if (!App.joinQQGroup(this, "8PIOnHFuH6A38hgxvD_Rp2Bu-Ke1ToBn")) { if (!App.joinQQGroup(this, "8PIOnHFuH6A38hgxvD_Rp2Bu-Ke1ToBn")) {
//数据 //数据
@ -99,16 +103,21 @@ public class AboutActivity extends BaseActivity {
} }
private void updateCrashLog() { private void uploadCrashLog() {
File logDir = new File(APPCONST.LOG_DIR); File logDir = new File(APPCONST.LOG_DIR);
if (!logDir.exists() || logDir.listFiles() == null || logDir.listFiles().length == 0) { if (!logDir.exists() || logDir.listFiles() == null || logDir.listFiles().length == 0) {
ToastUtils.showWarring("没有日志文件"); ToastUtils.showWarring("没有日志文件");
return; return;
} }
final Disposable[] disposable = new Disposable[1];
LoadingDialog dialog = new LoadingDialog(this, "正在上传", () -> {
if (disposable[0] != null) disposable[0].dispose();
});
dialog.show();
String time = String.valueOf(System.currentTimeMillis());
String fileName = "log-" + time + ".zip";
String logZip = FileUtils.getCachePath() + File.separator + fileName;
Observable.create((ObservableOnSubscribe<String>) emitter -> { Observable.create((ObservableOnSubscribe<String>) emitter -> {
String time = String.valueOf(System.currentTimeMillis());
String fileName = "log-" + time + ".zip";
String logZip = FileUtils.getCachePath() + File.separator + fileName;
File zipFile = FileUtils.getFile(logZip); File zipFile = FileUtils.getFile(logZip);
if (ZipUtils.zipFile(logDir, zipFile)) { if (ZipUtils.zipFile(logDir, zipFile)) {
emitter.onNext(OkHttpUtils.upload(URLCONST.LOG_UPLOAD_URL, logZip, fileName)); emitter.onNext(OkHttpUtils.upload(URLCONST.LOG_UPLOAD_URL, logZip, fileName));
@ -117,14 +126,24 @@ public class AboutActivity extends BaseActivity {
} }
emitter.onComplete(); emitter.onComplete();
}).compose(RxUtils::toSimpleSingle).subscribe(new MyObserver<String>() { }).compose(RxUtils::toSimpleSingle).subscribe(new MyObserver<String>() {
@Override
public void onSubscribe(Disposable d) {
disposable[0] = d;
}
@Override @Override
public void onNext(@NotNull String s) { public void onNext(@NotNull String s) {
ToastUtils.showInfo(s); ToastUtils.showInfo(s);
FileUtils.deleteFile(APPCONST.LOG_DIR);
FileUtils.deleteFile(logZip);
dialog.dismiss();
} }
@Override @Override
public void onError(Throwable e) { public void onError(Throwable e) {
ToastUtils.showError(e.getLocalizedMessage()); ToastUtils.showError(e.getLocalizedMessage());
FileUtils.deleteFile(logZip);
dialog.dismiss();
} }
}); });
@ -150,7 +169,7 @@ public class AboutActivity extends BaseActivity {
}).compose(RxUtils::toSimpleSingle).subscribe(new MyObserver<File>() { }).compose(RxUtils::toSimpleSingle).subscribe(new MyObserver<File>() {
@Override @Override
public void onNext(@NotNull File file) { public void onNext(@NotNull File file) {
ShareUtils.share(AboutActivity.this, file, file.getName(), "application/x-zip-compressed"); ShareUtils.share(AboutActivity.this, file, "分享日志文件", "application/x-zip-compressed");
} }
@Override @Override

@ -8,6 +8,8 @@ import android.view.MenuItem;
import androidx.appcompat.widget.Toolbar; import androidx.appcompat.widget.Toolbar;
import java.util.Objects;
import xyz.fycz.myreader.R; import xyz.fycz.myreader.R;
import xyz.fycz.myreader.application.App; import xyz.fycz.myreader.application.App;
import xyz.fycz.myreader.base.BaseActivity; import xyz.fycz.myreader.base.BaseActivity;
@ -154,9 +156,9 @@ public class BookInfoEditActivity extends BaseActivity {
} }
private boolean hasChange() { private boolean hasChange() {
return !bookName.equals(binding.tieBookName.getText().toString()) || return !Objects.equals(bookName, binding.tieBookName.getText().toString()) ||
!author.equals(binding.tieBookAuthor.getText().toString()) || !Objects.equals(author, binding.tieBookAuthor.getText().toString()) ||
!imgUrl.equals(binding.tieCoverUrl.getText().toString()) || !Objects.equals(imgUrl, binding.tieCoverUrl.getText().toString()) ||
!desc.equals(binding.tieBookDesc.getText().toString()); !Objects.equals(desc, binding.tieBookDesc.getText().toString());
} }
} }

@ -143,7 +143,10 @@ public class MainActivity extends BaseActivity {
super.initClick(); super.initClick();
mToolbar.setOnLongClickListener(v -> { mToolbar.setOnLongClickListener(v -> {
if (binding.viewPagerMain.getCurrentItem() == 0 && !BookGroupService.getInstance().curGroupIsPrivate()) { if (binding.viewPagerMain.getCurrentItem() == 0 &&
!BookGroupService.getInstance().curGroupIsPrivate() &&
(mBookcaseFragment.getmBookcasePresenter() != null &&
!mBookcaseFragment.getmBookcasePresenter().ismEditState())) {
goPrivateBookcase(); goPrivateBookcase();
return true; return true;
} }

@ -554,6 +554,9 @@ public class BookcasePresenter implements BasePresenter {
if (canEditBookcase()) { if (canEditBookcase()) {
mMainActivity.getViewPagerMain().setEnableScroll(false); mMainActivity.getViewPagerMain().setEnableScroll(false);
mBookcaseFragment.getSrlContent().setEnableRefresh(false); mBookcaseFragment.getSrlContent().setEnableRefresh(false);
if (mSetting.getSortStyle() == 0){
ToastUtils.showInfo("长按可移动书籍哦!");
}
itemTouchCallback.setLongPressDragEnable(mSetting.getSortStyle() == 0); itemTouchCallback.setLongPressDragEnable(mSetting.getSortStyle() == 0);
mBookcaseAdapter.setmEditState(true); mBookcaseAdapter.setmEditState(true);
mBookcaseFragment.getRlBookEdit().setVisibility(View.VISIBLE); mBookcaseFragment.getRlBookEdit().setVisibility(View.VISIBLE);

@ -93,113 +93,72 @@ public class UriFileUtil {
*/ */
public static String getPath(final Context context, final Uri uri) { public static String getPath(final Context context, final Uri uri) {
final boolean isKitKat = Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT; final boolean isKitKat = Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT;
// DocumentProvider // DocumentProvider
if (isKitKat && DocumentsContract.isDocumentUri(context, uri)) { if (isKitKat && DocumentsContract.isDocumentUri(context, uri)) {
// ExternalStorageProvider // ExternalStorageProvider
if (isExternalStorageDocument(uri)) { if (isExternalStorageDocument(uri)) {
final String docId = DocumentsContract.getDocumentId(uri); final String docId = DocumentsContract.getDocumentId(uri);
final String[] split = docId.split(":"); final String[] split = docId.split(":");
final String type = split[0]; final String type = split[0];
if ("primary".equalsIgnoreCase(type)) { if ("primary".equalsIgnoreCase(type)) {
return Environment.getExternalStorageDirectory() + "/" + split[1]; return Environment.getExternalStorageDirectory() + "/" + split[1];
} }
// TODO handle non-primary volumes
} }
// DownloadsProvider // DownloadsProvider
else if (isDownloadsDocument(uri)) { else if (isDownloadsDocument(uri)) {
final String id = DocumentsContract.getDocumentId(uri); final String id = DocumentsContract.getDocumentId(uri);
final String[] split = id.split(":");
final String type = split[0];
if ("raw".equalsIgnoreCase(type)) { //处理某些机型(比如Goole Pixel )ID是raw:/storage/emulated/0/Download/c20f8664da05ab6b4644913048ea8c83.mp4
return split[1];
}
final Uri contentUri = ContentUris.withAppendedId( final Uri contentUri = ContentUris.withAppendedId(
Uri.parse("content://downloads/public_downloads"), Long.valueOf(id)); Uri.parse("content://downloads/public_downloads"), Long.valueOf(id));
return getDataColumn(context, contentUri, null, null); return getDataColumn(context, contentUri, null, null);
} }
// MediaProvider // MediaProvider
else if (isMediaDocument(uri)) { else if (isMediaDocument(uri)) {
final String docId = DocumentsContract.getDocumentId(uri); final String docId = DocumentsContract.getDocumentId(uri);
final String[] split = docId.split(":"); final String[] split = docId.split(":");
final String type = split[0]; final String type = split[0];
Uri contentUri = null; Uri contentUri = null;
if ("image".equals(type)) { if ("image".equals(type)) {
contentUri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI; contentUri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI;
} else if ("video".equals(type)) { } else if ("video".equals(type)) {
contentUri = MediaStore.Video.Media.EXTERNAL_CONTENT_URI; contentUri = MediaStore.Video.Media.EXTERNAL_CONTENT_URI;
} else if ("audio".equals(type)) { } else if ("audio".equals(type)) {
contentUri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI; contentUri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;
} }
final String selection = "_id=?"; final String selection = "_id=?";
final String[] selectionArgs = new String[]{ final String[] selectionArgs = new String[]{
split[1] split[1]
}; };
return getDataColumn(context, contentUri, selection, selectionArgs); return getDataColumn(context, contentUri, selection, selectionArgs);
} }
} }
// MediaStore (and general) // MediaStore (and general)
else if ("content".equalsIgnoreCase(uri.getScheme())) { else if ("content".equalsIgnoreCase(uri.getScheme())) {
return getDataColumn(context, uri, null, null); // Return the remote address
if (isGooglePhotosUri(uri))
return uri.getLastPathSegment();
return getDataColumn(context, uri, null, null);
} }
// File // File
else if ("file".equalsIgnoreCase(uri.getScheme())) { else if ("file".equalsIgnoreCase(uri.getScheme())) {
return uri.getPath(); return uri.getPath();
} }
return null; return null;
} }
@ -218,45 +177,21 @@ public class UriFileUtil {
*/ */
public static String getDataColumn(Context context, Uri uri, String selection, public static String getDataColumn(Context context, Uri uri, String selection,
String[] selectionArgs) { String[] selectionArgs) {
Cursor cursor = null;
final String column = "_data"; final String column = "_data";
final String[] projection = { final String[] projection = {
column column
}; };
try (Cursor cursor = context.getContentResolver().query(uri, projection, selection, selectionArgs,
null)) {
try {
cursor = context.getContentResolver().query(uri, projection, selection, selectionArgs,
null);
if (cursor != null && cursor.moveToFirst()) { if (cursor != null && cursor.moveToFirst()) {
final int index = cursor.getColumnIndexOrThrow(column);
final int column_index = cursor.getColumnIndexOrThrow(column); return cursor.getString(index);
return cursor.getString(column_index);
} }
} catch (Exception e) {
} finally { e.printStackTrace();
if (cursor != null)
cursor.close();
} }
return null; return null;
} }
@ -294,4 +229,12 @@ public class UriFileUtil {
return "com.android.providers.media.documents".equals(uri.getAuthority()); return "com.android.providers.media.documents".equals(uri.getAuthority());
} }
/**
* @param uri The Uri to check.
* @return Whether the Uri authority is Google Photos.
*/
public static boolean isGooglePhotosUri(Uri uri) {
return "com.google.android.apps.photos.content".equals(uri.getAuthority());
}
} }

@ -331,8 +331,7 @@ public class OkHttpUtils {
OkHttpClient client = getOkHttpClient(); OkHttpClient client = getOkHttpClient();
RequestBody requestBody = new MultipartBody.Builder() RequestBody requestBody = new MultipartBody.Builder()
.setType(MultipartBody.FORM) .setType(MultipartBody.FORM)
.addFormDataPart("file", fileName, .addFormDataPart("file", fileName, RequestBody.create(MediaType.parse("multipart/form-data"), new File(filePath)))
RequestBody.create(MediaType.parse("multipart/form-data"), new File(filePath)))
.build(); .build();
Request request = new Request.Builder() Request request = new Request.Builder()

@ -1,12 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:viewportWidth="1024" android:viewportWidth="24"
android:viewportHeight="1024"> android:viewportHeight="24">
<path
android:pathData="M856.9,927.3H118.6c-8.5,0 -16.7,-3.4 -22.7,-9.4s-9.4,-14.2 -9.3,-22.7l2,-732.3c0,-17.6 14.4,-31.9 32,-31.9H633c17.7,0 32,14.3 32,32s-14.3,32 -32,32H152.6l-1.8,668.3H825l1.5,-514.8c0.1,-17.6 14.4,-31.9 32,-31.9h0.1c17.7,0.1 32,14.4 31.9,32.1l-1.6,546.7c0,17.6 -14.3,31.9 -32,31.9z" <path
android:fillColor="#ffffff"/> android:fillColor="#595757"
<path android:pathData="M5.6,20.009c-0.881,0-1.6-0.789-1.6-1.758V5.749C4,4.78,4.719,3.991,5.6,3.991h10.62 c0.882,0,1.599,0.789,1.599,1.758v1.258h-1.483l-0.076-1.258c0-0.122-0.062-0.172-0.062-0.172L5.6,5.582 c0.002,0.015-0.039,0.069-0.039,0.167v12.502c0,0.107,0.051,0.164,0.063,0.172l10.596-0.005c-0.002-0.014,0.039-0.067,0.039-0.167 l0.016-4.739h1.469l0.075,4.739c0,0.969-0.717,1.758-1.599,1.758H5.6z" />
android:pathData="M401.1,665c-8.2,0 -16.4,-3.1 -22.6,-9.4 -12.5,-12.5 -12.5,-32.8 0,-45.3L882.8,106c12.5,-12.5 32.8,-12.5 45.3,0s12.5,32.8 0,45.3L423.7,655.7c-6.3,6.2 -14.5,9.3 -22.6,9.3z" <path
android:fillColor="#ffffff"/> android:fillColor="#595757"
</vector> android:pathData="M 12.549 13.354 L 13.738 12.323 L 13.738 12.323 L 18.967 7.553 L 20 8.646 L 14.658 13.514 L 13.54 14.515 Z" />
</vector>

@ -1,9 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="20dp"
android:height="24dp" android:height="20dp"
android:viewportWidth="1024" android:viewportWidth="24"
android:viewportHeight="1024"> android:viewportHeight="24">
<path <path
android:pathData="M783.7,653.3c-42.8,0 -80.8,20.5 -104.9,52.1l-277.1,-165c3.1,-12.1 5,-24.8 5,-37.9 0,-3.8 -0.3,-7.5 -0.6,-11.3l277.3,-167.1c24.2,28.3 60.1,46.4 100.3,46.4 72.9,0 132,-59.1 132,-132 0,-72.9 -59.1,-132 -132,-132 -72.9,0 -132,59.1 -132,132 0,14.5 2.4,28.3 6.7,41.3L383.5,422.5c-26.7,-42.5 -73.8,-70.8 -127.7,-70.8C172.5,351.7 105,419.2 105,502.5s67.6,150.8 150.9,150.8c44.6,0 84.6,-19.5 112.2,-50.3L656.2,752c-2.8,10.7 -4.4,21.8 -4.4,33.3 0,72.9 59.1,132 132,132 72.9,0 132,-59.1 132,-132 0,-72.9 -59.2,-132 -132.1,-132z" android:pathData="M18,16.08c-0.76,0 -1.44,0.3 -1.96,0.77L8.91,12.7c0.05,-0.23 0.09,-0.46 0.09,-0.7s-0.04,-0.47 -0.09,-0.7l7.05,-4.11c0.54,0.5 1.25,0.81 2.04,0.81 1.66,0 3,-1.34 3,-3s-1.34,-3 -3,-3 -3,1.34 -3,3c0,0.24 0.04,0.47 0.09,0.7L8.04,9.81C7.5,9.31 6.79,9 6,9c-1.66,0 -3,1.34 -3,3s1.34,3 3,3c0.79,0 1.5,-0.31 2.04,-0.81l7.12,4.16c-0.05,0.21 -0.08,0.43 -0.08,0.65 0,1.61 1.31,2.92 2.92,2.92 1.61,0 2.92,-1.31 2.92,-2.92s-1.31,-2.92 -2.92,-2.92z"
android:fillColor="#ffffff"/> android:fillColor="#FFFFFF" />
</vector> </vector>

@ -1,9 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp" android:width="24dp"
android:height="24dp" android:height="24dp"
android:viewportWidth="1024" android:viewportWidth="24"
android:viewportHeight="1024"> android:viewportHeight="24">
<path
android:pathData="M855.87,106.43a42.46,42.46 0,0 1,-42.46 42.46L203.44,148.9a42.46,42.46 0,0 1,0 -84.93h609.97a42.46,42.46 0,0 1,42.46 42.46zM511.82,264.35a42.46,42.46 0,0 0,-42.46 42.46v609.97a42.46,42.46 0,0 0,84.93 0L554.29,306.82a42.46,42.46 0,0 0,-42.46 -42.46zM541.97,233.02c-16.59,-16.58 -42.53,-17.54 -57.92,-2.13L171.23,543.68c-15.41,15.41 -14.45,41.34 2.13,57.92 16.59,16.59 42.51,17.54 57.92,2.13l312.8,-312.78c15.39,-15.41 14.45,-41.34 -2.13,-57.92zM481.7,233.02c-16.58,16.58 -17.54,42.51 -2.13,57.92l312.8,312.8c15.39,15.39 41.33,14.45 57.92,-2.14 16.58,-16.58 17.52,-42.51 2.11,-57.92L539.62,230.9c-15.41,-15.41 -41.34,-14.45 -57.92,2.13z" <path
android:fillColor="#000000"/> android:fillColor="#595757"
</vector> android:pathData="M 4 4.003 H 20 V 5.603 H 4 V 4.003 Z" />
<path
android:fillColor="#595757"
android:pathData="M 5.594 12.821 L 6.742 13.935 L 11.199 9.338 L 11.194 20 L 12.794 20 L 12.799 9.338 L 17.251 13.938 L 18.401 12.825 L 11.999 6.214 Z" />
</vector>

@ -1,2 +1,2 @@
#Thu Jun 03 14:18:11 CST 2021 #Fri Jun 04 20:20:53 CST 2021
VERSION_CODE=207 VERSION_CODE=208

Loading…
Cancel
Save