修复:
侧边栏问题
This commit is contained in:
@@ -97,7 +97,7 @@ public class DialogUitl {
|
||||
}
|
||||
|
||||
public static void showSimpleDialog(Context context, String content, SimpleCallback callback) {
|
||||
showSimpleDialog(context, content, true, callback);
|
||||
showSimpleDialog(context, content, false, callback);
|
||||
}
|
||||
|
||||
public static void showSimpleDialog(Context context, String content, boolean cancelable, SimpleCallback callback) {
|
||||
@@ -114,6 +114,15 @@ public class DialogUitl {
|
||||
.show();
|
||||
}
|
||||
|
||||
public static void showSimpleDialog(Context context, String title, String content, boolean cancelable, SimpleCallback3 callback) {
|
||||
new Builder(context)
|
||||
.setTitle(title)
|
||||
.setContent(content)
|
||||
.setCancelable(cancelable)
|
||||
.setClickCallback3(callback)
|
||||
.build()
|
||||
.show();
|
||||
}
|
||||
|
||||
public static void showSimpleInputDialog(Context context, String title, String hint, int inputType, int length, SimpleCallback callback) {
|
||||
new Builder(context).setTitle(title)
|
||||
@@ -290,6 +299,7 @@ public class DialogUitl {
|
||||
private int mInputType;
|
||||
private int mLength;
|
||||
private SimpleCallback mClickCallback;
|
||||
private SimpleCallback3 mClickCallback3;
|
||||
|
||||
public Builder(Context context) {
|
||||
mContext = context;
|
||||
@@ -350,6 +360,11 @@ public class DialogUitl {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setClickCallback3(SimpleCallback3 clickCallback) {
|
||||
mClickCallback3 = clickCallback;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Dialog build() {
|
||||
final Dialog dialog = new Dialog(mContext, mBackgroundDimEnabled ? R.style.dialog : R.style.dialog2);
|
||||
dialog.setContentView(mInput ? R.layout.dialog_input : R.layout.dialog_simple);
|
||||
@@ -397,12 +412,24 @@ public class DialogUitl {
|
||||
}
|
||||
} else {
|
||||
dialog.dismiss();
|
||||
if (mClickCallback3 != null) {
|
||||
mClickCallback3.onConfirmClick(dialog);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
dialog.dismiss();
|
||||
if (mClickCallback instanceof SimpleCallback2) {
|
||||
((SimpleCallback2) mClickCallback).onCancelClick();
|
||||
if (mClickCallback3 != null) {
|
||||
mClickCallback3.onCancel();
|
||||
|
||||
} else {
|
||||
|
||||
if (mClickCallback instanceof SimpleCallback2) {
|
||||
((SimpleCallback2) mClickCallback).onCancelClick();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -429,6 +456,12 @@ public class DialogUitl {
|
||||
void onCancelClick();
|
||||
}
|
||||
|
||||
public interface SimpleCallback3 {
|
||||
void onConfirmClick(Dialog dialog);
|
||||
|
||||
void onCancel();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 城市选择
|
||||
|
||||
@@ -75,6 +75,10 @@ public class VerticalViewPager extends ViewGroup {
|
||||
|
||||
private boolean mEnableScroll = true;
|
||||
|
||||
public boolean ismEnableScroll() {
|
||||
return mEnableScroll;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to track what the expected number of items in the adapter should be.
|
||||
* If the app changes this when we don't expect it, we'll throw a big obnoxious exception.
|
||||
|
||||
Reference in New Issue
Block a user