AmazingDialog overview

AmazingDialog is inheriting the android app. Dialog to achieve full screen and can slide right to exit the Dialog.Including the content of text and two buttons (such as removing, determine) fluctuation two parts, defines the image button and the button text button two kinds of style, the user can choose according to your requirements to use.

AmazingDialog introduction

Give AmazingDialog set show that the contents of the text, buttons and other properties

You need to give AmazingDialog set to display the contents of the text:

 
setContent(int resId);
 
Parameters: the resource ID, generally for a string of resId.
 
setContent(CharSequence text);
 
Parameters: arbitrary string.

You can give AmazingDialog set pictures style button:

 
setPositiveButton(int resId, View.OnClickListener listener);
 
Parameters: the resId is a picture of resId commonly, also can be a selector resId.
Parameters: the listener button click to monitor.
 
setPositiveButton(Drawable drawable, View.OnClickListener listener);
 
Parameters: the drawable arbitrary drawable object.
Parameters: the listener button click to monitor.
setNegativeButton(int resId, View.OnClickListener listener);
 
Parameters: the resId is a picture of resId commonly, also can be a selector resId.
Parameters: the listener button click to monitor.
 
setNegativeButton(Drawable drawable, View.OnClickListener listener);
 
Parameters: the drawable arbitrary drawable object.
Parameters: the listener button click to monitor.

You can also give AmazingDialog set text style of the button:

 
setPositiveTextButton(int resId, View.OnClickListener listener);
 
Parameters: the resId is usually a string of resId.
Parameters: the listener button click to monitor.
 
setPositiveTextButton(CharSequence text, View.OnClickListener listener);
 
Parameters: the text arbitrary string.
Parameters: the listener button click to monitor.
setNegativeTextButton(int resId, View.OnClickListener listener);
 
Parameters: the resId is usually a string of resId.
Parameters: the listener button click to monitor.
 
setNegativeTextButton(CharSequence text, View.OnClickListener listener);
 
Parameters: the text arbitrary string.
Parameters: the listener button click to monitor.

You can customize AmazingDialog content text color and size:

 
setTextColor(int color);
 
Parameters: general for a color of resId or an argb color value.
 
setTextSize(int size);
 
Parameters: the pixel size of text.

You can make to AmazingDialog right slide out function, AmazingDialog default can be right out, if you don't need this function, you can set the disabled:

 
setRightScrollEnable(boolean enable);
 
Parameters: true | false.

AmazingDialog typical usage


// 1.Image button style
private AmazingDialog dialog = new AmazingDialog(mContext)
                .setContent(R.string.dialog_content)
                .setNegativeButton(AmazingDialog.USE_NORMAL_DRAWABLE,
                        new View.OnClickListener() {

                            @Override
                            public void onClick(View arg0) {
                                AmazingToast.showToast(mContext,
                                        "Click Cancel",
                                        AmazingToast.LENGTH_SHORT,
                                        AmazingToast.BOTTOM_CENTER);
                                dialog.dismiss();
                            }
                        })
                .setPositiveButton(AmazingDialog.USE_NORMAL_DRAWABLE,
                        new View.OnClickListener() {

                            @Override
                            public void onClick(View arg0) {
                                dialog2.show();
                            }
                        });

// 2.Set the text button style, not right slip out
private AmazingDialog dialog = new AmazingDialog(mContext)
                .setContent(R.string.dialog_content2)
                .setRightScrollEnable(false)
                .setNegativeTextButton(AmazingDialog.USE_NORMAL_TEXT,
                        new View.OnClickListener() {

                            @Override
                            public void onClick(View arg0) {
                                AmazingToast.showToast(mContext,
                                        "Click Cancel",
                                        AmazingToast.LENGTH_SHORT,
                                        AmazingToast.BOTTOM_CENTER);
                                dialog2.dismiss();
                            }
                        })
                .setPositiveTextButton(AmazingDialog.USE_NORMAL_TEXT,
                        new View.OnClickListener() {

                            @Override
                            public void onClick(View arg0) {
                                AmazingToast.showToast(mContext, "Click OK",
                                        AmazingToast.LENGTH_SHORT,
                                        AmazingToast.BOTTOM_CENTER);
                                dialog2.dismiss();
                            }
                        });

...

// According to
dialog.show();

...

// hidden
dialog.dismiss();

// Use the default image button/default text, you can customize these attributes according to their own needs.

AmazingProgressBar overview

AmazingIndeterminateProgressBar is inherited android. View. The view, is composed of five balls, let five ProgressBar billiard balls along the circular simulation movement.

AmazingProgressBar is introduced

You can set yourself AmazingProgressBar rotating open and stop:

 
start();
 
Start rotating.
 
stop();
 
End of rotation.
isStart();
 
The return value: is rotation (true | false).

AmazingProgressBar typical usage

In the“layout.xml“configuration


<com.ingenic.iwds.widget.AmazingProgressBar
                android:id="@+id/progressbar"
                android:layout_width="80dp"
                android:layout_height="80dp" />

Set in the interface


// Open to rotate, if did not call the stop (), can not take the initiative to call the start (), is opened by default.
findViewBy(R.id.progressbar).start();

// End of rotation
if(isStart()){
    findViewBy(R.id.progressbar).stop();
}

AmazingIndeterminateProgressBar overview

AmazingIndeterminateProgressBar is inherited android. View. The view, the realization of a composed of 12 color ring color balls a circular ProgressBar.

AmazingIndeterminateProgressBar is introduced

You can set yourself AmazingIndeterminateProgressBar rotating open and stop:

 
start();
 
Start rotating.
 
stop();
 
End of rotation.
isStart();
 
The return value: is rotation (true | false).

AmazingIndeterminateProgressBar typical usage

In the“layout.xml“configuration,can color balls in the XML configuration


<com.ingenic.iwds.widget.AmazingIndeterminateProgressBar
                android:layout_width="60dp"
                android:layout_height="60dp"
                android:background="@android:color/white" />

Set in the interface


// Open to rotate, if did not call the stop (), can not take the initiative to call the start (), is opened by default.
progressbar.start();

// End of rotation
if(isStart()){
    progressbar.stop();
}