Skip to content

Commit

Permalink
0.0.40.beta3
Browse files Browse the repository at this point in the history
  • Loading branch information
kongzue committed Jun 13, 2021
1 parent 371e605 commit b0fe84a
Show file tree
Hide file tree
Showing 17 changed files with 50 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,8 @@ public void init() {
if (btnCancel != null) btnCancel.getPaint().setFakeBoldText(true);
if (btnSelectPositive != null) btnSelectPositive.getPaint().setFakeBoldText(true);
if (btnSelectOther != null) btnSelectOther.getPaint().setFakeBoldText(true);


bkg.setMaxWidth(DialogX.dialogMaxWidth);
boxRoot.setParentDialog(me);
boxRoot.setOnLifecycleCallBack(new DialogXBaseRelativeLayout.OnLifecycleCallBack() {
@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.kongzue.dialogx.dialogs;

import android.animation.Animator;
import android.app.Activity;
import android.content.Context;
import android.content.res.Configuration;
Expand Down Expand Up @@ -443,6 +442,7 @@ public void onClick(View v) {
}

public void refreshView() {
log("#refreshView");
if (backgroundColor != -1) {
tintColor(bkg, backgroundColor);
if (style instanceof MaterialStyle) {
Expand All @@ -451,7 +451,7 @@ public void refreshView() {
tintColor(btnSelectPositive, backgroundColor);
}
}

bkg.setMaxWidth(DialogX.dialogMaxWidth);
if (me instanceof InputDialog) {
txtInput.setVisibility(View.VISIBLE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public enum TYPE {
protected CharSequence message;
protected long tipShowDuration = 1500;
protected float waitProgress = -1;
protected int showType = -1; //-1:Waitdialog 状态标示符,其余为 TipDialog 状态标示
protected int showType = -1; //-1:WaitDialog 状态标示符,其余为 TipDialog 状态标示
protected TextInfo messageTextInfo;
protected int maskColor = -1;
protected BOOLEAN privateCancelable;
Expand Down Expand Up @@ -749,4 +749,20 @@ public void onUIModeChange(Configuration newConfig) {
public static WaitDialog getInstance() {
return me();
}

/**
* 获取当前 WaitDialog 显示状态
*
* 值的含义:
* -1: WaitDialog 等待状态
* 0: TipDialog 无状态(与 WaitDialog 等待状态相同)
* 1: TipDialog 完成状态
* 2: TipDialog 警告状态
* 3: TipDialog 错误状态
*
* @return showType
*/
public static int getType() {
return me().showType;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ public ActivityLifecycleImpl(ActivityLifecycleImpl.onActivityResumeCallBack onAc
}

public static void init(Context context, ActivityLifecycleImpl.onActivityResumeCallBack onActivityResumeCallBack) {
(getApplicationContext(context)).registerActivityLifecycleCallbacks(new ActivityLifecycleImpl(onActivityResumeCallBack));
Application application = getApplicationContext(context);
if (application == null) {
error("DialogX 未初始化。\n请检查是否在启动对话框前进行初始化操作,使用以下代码进行初始化:\nDialogX.init(context);\n\n另外建议您前往查看 DialogX 的文档进行使用:https://github.com/kongzue/DialogX");
return;
}
application.registerActivityLifecycleCallbacks(new ActivityLifecycleImpl(onActivityResumeCallBack));
}

public static Application getApplicationContext(Context context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public MaxRelativeLayout setMaxHeight(int maxHeight) {
}

public MaxRelativeLayout setMaxWidth(int maxWidth) {
if (maxWidth > 0 && this.maxWidth != 0) this.maxWidth = maxWidth;
if (maxWidth > 0) this.maxWidth = maxWidth;
return this;
}

Expand All @@ -102,7 +102,7 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
preWidth = widthSize;
}
if (lockWidth) {
maxWidth = Math.min(widthSize, preWidth);
maxWidth = Math.min(maxWidth, Math.min(widthSize, preWidth));
}
if (maxHeight > 0) {
heightSize = Math.min(heightSize, maxHeight);
Expand All @@ -118,10 +118,10 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
if (widthTemp < minWidth) widthTemp = minWidth;
if (heightTemp < minHeight) heightTemp = minHeight;
if (blurView != null) {
if (heightMode == EXACTLY){
if (heightMode == EXACTLY) {
heightTemp = heightSize;
}
if (widthMode == EXACTLY){
if (widthMode == EXACTLY) {
widthTemp = widthSize;
}
LayoutParams lp = (LayoutParams) blurView.getLayoutParams();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:background="@drawable/rect_dialogx_material_bottom_bkg_light"
android:clickable="true"
android:focusableInTouchMode="true">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:background="@drawable/rect_dialogx_material_bottom_bkg_night"
android:clickable="true"
android:focusableInTouchMode="true">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:focusableInTouchMode="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:focusableInTouchMode="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:background="@color/white"
android:focusableInTouchMode="true">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:background="@color/dialogxKongzueDarkDialogBkgColor"
android:focusableInTouchMode="true">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:background="@drawable/rect_dialogx_miui_bkg_light"
android:focusableInTouchMode="true">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:background="@drawable/rect_dialogx_miui_bkg_night"
android:focusableInTouchMode="true">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:background="@drawable/rect_dialogx_miui_bkg_light">

<LinearLayout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:background="@drawable/rect_dialogx_miui_bkg_night">

<LinearLayout
Expand Down
13 changes: 8 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,14 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.github.kongzue:BaseFramework:6.7.9.5'

implementation 'com.github.kongzue.DialogX:DialogXIOSStyle:0.0.39.debug4'
implementation 'com.github.kongzue.DialogX:DialogXKongzueStyle:0.0.39.debug4'
implementation 'com.github.kongzue.DialogX:DialogXMIUIStyle:0.0.39.debug4'
// implementation 'com.github.kongzue.DialogX:DialogXIOSStyle:0.0.39.debug4'
// implementation 'com.github.kongzue.DialogX:DialogXKongzueStyle:0.0.39.debug4'
// implementation 'com.github.kongzue.DialogX:DialogXMIUIStyle:0.0.39.debug4'

implementation 'com.github.kongzue:DialogXStyle-Snackbar:1.0.6'
//implementation 'com.github.kongzue.dialogx:DialogX:0.0.37'
implementation project(path: ':DialogX')
implementation project(path: ':DialogXIOSStyle')
implementation project(path: ':DialogXKongzueStyle')
implementation project(path: ':DialogXMIUIStyle')

implementation 'com.github.kongzue:DialogXStyle-Snackbar:1.0.6'
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true

BUILD_VERSION=0.0.40.beta2
BUILD_VERSION=0.0.40.beta3
BUILD_VERSION_INT=39

0 comments on commit b0fe84a

Please sign in to comment.