Android Open Source - SuperToasts Playground






From Project

Back to project page SuperToasts.

License

The source code is released under:

Apache License

If you think the Android project SuperToasts listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.supertoastsdemo;
//from   ww  w .  java  2  s .  c om
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import com.github.johnpersano.supertoasts.SuperToast;
import com.github.johnpersano.supertoasts.util.Style;


/** Use this class to play around with the library. Simply run this activity
 *  in a specified run configuration */
public class Playground extends Activity {

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.playground);

        final Button showButton = (Button)
                findViewById(R.id.show_button);
        showButton.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View view) {

                final SuperToast superToast = new SuperToast(Playground.this, Style.getStyle(Style.GREEN));
                superToast.setDuration(4500);
                superToast.setOnDismissListener(new SuperToast.OnDismissListener() {

                    @Override
                    public void onDismiss(View view) {

                        Log.e("SuperToast", "On Dismiss");

                    }
                });

                superToast.show();

            }
        });

    }

}




Java Source Code List

com.github.johnpersano.supertoasts.ManagerSuperActivityToast.java
com.github.johnpersano.supertoasts.ManagerSuperCardToast.java
com.github.johnpersano.supertoasts.ManagerSuperToast.java
com.github.johnpersano.supertoasts.SuperActivityToast.java
com.github.johnpersano.supertoasts.SuperCardToast.java
com.github.johnpersano.supertoasts.SuperToast.java
com.github.johnpersano.supertoasts.util.OnClickWrapper.java
com.github.johnpersano.supertoasts.util.OnDismissWrapper.java
com.github.johnpersano.supertoasts.util.Style.java
com.github.johnpersano.supertoasts.util.SwipeDismissListener.java
com.github.johnpersano.supertoasts.util.Wrappers.java
com.supertoastsdemo.ActivityTwo.java
com.supertoastsdemo.FragmentSuperActivityToast.java
com.supertoastsdemo.FragmentSuperCardToast.java
com.supertoastsdemo.FragmentSuperToast.java
com.supertoastsdemo.MainActivity.java
com.supertoastsdemo.Playground.java
com.supertoastsdemo.examples.ExampleStyle.java
com.supertoastsdemo.examples.ExampleSuperActivityToast.java
com.supertoastsdemo.examples.ExampleUndoBar.java