Java Code Examples for android.content.DialogInterface#OnShowListener

The following examples show how to use android.content.DialogInterface#OnShowListener . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BaseDialog.java    From AndroidProject with Apache License 2.0 5 votes vote down vote up
/**
 * 设置一个显示监听器
 *
 * @param listener       显示监听器对象
 * @deprecated           请使用 {@link #addOnShowListener(BaseDialog.OnShowListener)}}
 */
@Deprecated
@Override
public void setOnShowListener(@Nullable DialogInterface.OnShowListener listener) {
    if (listener == null) {
        return;
    }
    addOnShowListener(new ShowListenerWrapper(listener));
}
 
Example 2
Source File: PressureSensitivityPrompt.java    From slide-android with GNU General Public License v2.0 5 votes vote down vote up
@Override
public DialogInterface.OnShowListener onShow()
{
    return new DialogInterface.OnShowListener()
    {
        @Override
        public void onShow(DialogInterface arg0)
        {
            getSeekbarSensitivity().setProgress((int) (getSensitivity() * 100));
        }
    };
}
 
Example 3
Source File: MouseSensitivityPrompt.java    From slide-android with GNU General Public License v2.0 5 votes vote down vote up
@Override
public DialogInterface.OnShowListener onShow()
{
    return new DialogInterface.OnShowListener()
    {
        @Override
        public void onShow(DialogInterface arg0)
        {
            getSeekbarSensitivity().setProgress((int) (getSensitivity() * 10));
        }
    };
}
 
Example 4
Source File: BaseDialog.java    From AndroidProject with Apache License 2.0 4 votes vote down vote up
private ShowListenerWrapper(DialogInterface.OnShowListener referent) {
    super(referent);
}
 
Example 5
Source File: BaseBuilder.java    From GetApk with MIT License 4 votes vote down vote up
public T showListener(@NonNull DialogInterface.OnShowListener listener) {
    this.showListener = listener;
    return (T) this;
}
 
Example 6
Source File: ReactModalHostView.java    From react-native-GPay with MIT License 4 votes vote down vote up
protected void setOnShowListener(DialogInterface.OnShowListener listener) {
  mOnShowListener = listener;
}
 
Example 7
Source File: AlertDialogWrapper.java    From talk-android with MIT License 4 votes vote down vote up
public Builder setOnShowListener(@NonNull DialogInterface.OnShowListener listener) {
    builder.showListener(listener);
    return this;
}
 
Example 8
Source File: TalkDialog.java    From talk-android with MIT License 4 votes vote down vote up
public Builder showListener(@NonNull DialogInterface.OnShowListener listener) {
    this.showListener = listener;
    return this;
}
 
Example 9
Source File: BottomSheet.java    From BottomSheet with Apache License 2.0 4 votes vote down vote up
public Builder setOnShowListener(DialogInterface.OnShowListener listener) {
    bottomSheet.onShowListener = listener;
    return this;
}
 
Example 10
Source File: FCBaseDialog.java    From FamilyChat with Apache License 2.0 4 votes vote down vote up
public void setOnShowListener(DialogInterface.OnShowListener l)
{
    this.mOnShowListener = l;
}
 
Example 11
Source File: MaterialDialog.java    From AndroidMaterialDialog with Apache License 2.0 2 votes vote down vote up
/**
 * Sets the listener, which should be notified, when the dialog has been shown.
 *
 * @param listener
 *         The listener, which should be set, as an instance of the type {@link
 *         DialogInterface.OnShowListener}, or null, if no listener should be set
 */
void setOnShowListener(@Nullable DialogInterface.OnShowListener listener);
 
Example 12
Source File: AbstractMaterialDialogBuilder.java    From AndroidMaterialDialog with Apache License 2.0 2 votes vote down vote up
/**
 * Sets the listener, which should be notified, when the dialog has been shown.
 *
 * @param listener
 *         The listener, which should be set, as an instance of the type {@link
 *         DialogInterface.OnShowListener}, or null, if no listener should be set
 */
public BuilderType setOnShowListener(@Nullable final DialogInterface.OnShowListener listener) {
    getProduct().setOnShowListener(listener);
    return self();
}
 
Example 13
Source File: SliderPrompt.java    From slide-android with GNU General Public License v2.0 votes vote down vote up
public abstract DialogInterface.OnShowListener onShow();