Back to project page audioplayer.
The source code is released under:
GNU General Public License
If you think the Android project audioplayer listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package fr.julien_dumortier.simplemusicplayer.uiprompt; /*from w w w. j av a2 s . com*/ import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import android.widget.EditText; import fr.julien_dumortier.simplemusicplayer.R; public class PromptGetTextName extends AlertDialog.Builder { public PromptGetTextName(Context context, final IOnTextSetted listener) { super(context); setMessage(context.getResources().getText(R.string.enter_playlist_name)); final EditText edit = new EditText(context); setView(edit); setPositiveButton(context.getResources().getText(R.string.yes), new OnClickListener() { public void onClick(DialogInterface dialog, int which) { listener.onTextSetted(edit.getText().toString()); } }); setNegativeButton(context.getResources().getText(R.string.cancel), new OnClickListener() { public void onClick(DialogInterface dialog, int which) {}}); } public interface IOnTextSetted { public void onTextSetted(String name); } }