Android Open Source - fiction Ui Utils






From Project

Back to project page fiction.

License

The source code is released under:

GNU General Public License

If you think the Android project fiction 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.lithiumli.fiction.ui;
/*from  w  w  w  .j a  v  a  2s .c  om*/
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.widget.EditText;

import de.keyboardsurfer.android.widget.crouton.Style;

import com.lithiumli.fiction.R;

public class UiUtils {
    public static final Style STYLE_INFO = (new Style.Builder(Style.INFO))
        .setBackgroundDrawable(R.drawable.ab_texture_tile_fiction_crouton)
        .setTileEnabled(true)
        .build();

    public abstract static class Dialog {
        AlertDialog mDialog;

        public Dialog(int titleResId, Context context) {
            AlertDialog.Builder builder = new AlertDialog.Builder(context);
            builder.setTitle(titleResId);
            final EditText text = new EditText(context);
            builder.setView(text);
            builder.setPositiveButton(R.string.create, new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface dialog, int id) {
                        onDialogDismissed(true, text.getText().toString());
                    }
                });
            builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
                    public void onClick(DialogInterface dialog, int id) {
                        mDialog.dismiss();
                        onDialogDismissed(false, null);
                    }
                });
            mDialog = builder.create();
        }

        public void show() {
            mDialog.show();
        }

        public abstract void onDialogDismissed(boolean positive, String input);
    }
}




Java Source Code List

com.lithiumli.fiction.ArtistImageCache.java
com.lithiumli.fiction.FictionActivity.java
com.lithiumli.fiction.LibraryActivity.java
com.lithiumli.fiction.NowPlayingActivity.java
com.lithiumli.fiction.PlaybackQueue.java
com.lithiumli.fiction.PlaybackService.java
com.lithiumli.fiction.Playlist.java
com.lithiumli.fiction.PlaylistsSublibraryActivity.java
com.lithiumli.fiction.Song.java
com.lithiumli.fiction.SublibraryActivity.java
com.lithiumli.fiction.fragments.ArtistsGridFragment.java
com.lithiumli.fiction.fragments.FictionCursorAdapter.java
com.lithiumli.fiction.fragments.FictionGridFragment.java
com.lithiumli.fiction.fragments.FictionListFragment.java
com.lithiumli.fiction.fragments.PlaylistsListFragment.java
com.lithiumli.fiction.fragments.SongsListFragment.java
com.lithiumli.fiction.ui.AlbumSwiper.java
com.lithiumli.fiction.ui.SongsAlphabetIndexer.java
com.lithiumli.fiction.ui.UiUtils.java
com.lithiumli.fiction.util.BitmapLruCache.java