AUInputDialog (formerly APInputDialog) provides a dialog box containing a title, body, Confirm and Cancel buttons, and an input box.
Sample image
Dependency
See Quick start.
API description
/**
* Construct AUInputDialog based on Input parameters.
*
* @param context The context object.
* @param title The title.
* @param msg The message.
* @param positiveString Confirm button text.
* @param negativeString Cancel button text.
* @param isAutoCancel Indicates whether to automatically cancel actions in the area outside the pop-up window.
*/
public AUInputDialog(Context context, String title, String msg, String positiveString,
String negativeString, boolean isAutoCancel)
/**
* Obtain the Cancel button.
*/
public Button getCancelBtn();
/**
* Obtain the Confirm button.
*/
public Button getEnsureBtn();
/**
* Obtain title TextView.
*/
public TextView getTitle();
/**
* Obtain message TextView.
*/
public TextView getMsg();
/**
* Obtain LinearLayout of the bottom button.
*/
public LinearLayout getBottomLayout();
/**
* Obtain RelativeLayout at the outermost layer of the pop-up window.
*/
public RelativeLayout getDialogBg();
/**
* Set the Confirm button listener.
*/
public void setPositiveListener(OnClickPositiveListener listener);
/**
* Set the Cancel button listener.
*/
public void setNegativeListener(OnClickNegativeListener listener);
/**
* Obtain EditText of the input box.
*/
public AUEditText getInputContent() {
return inputContent;
}
/**
* Starts and display the dialog.
*/
public void show();
Sample code
AUInputDialog dialog = new AUInputDialog(this, "Title", "Auxiliary Description",
"OK", "Cancel", true);
dialog.show();