Search in sources :

Example 31 with ProgressDialog

use of android.app.ProgressDialog in project IceNet by anton46.

the class JsonObjectActivity method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_json_object);
    final TextView id = (TextView) findViewById(R.id.tv_id);
    final TextView title = (TextView) findViewById(R.id.tv_title);
    final ProgressDialog dialog = new ProgressDialog(this);
    dialog.setMessage("Loading...");
    dialog.show();
    IceNet.connect().createRequest().get().pathUrl("/notes/1").fromJsonObject().mappingInto(Note.class).execute("request_string", new RequestCallback<Note>() {

        @Override
        public void onRequestSuccess(Note note) {
            dialog.dismiss();
            id.setText(note.getId());
            title.setText(note.getTitle());
        }

        @Override
        public void onRequestError(RequestError error) {
            dialog.dismiss();
        }
    });
}
Also used : RequestError(labs.anton.icenet.RequestError) TextView(android.widget.TextView) ProgressDialog(android.app.ProgressDialog)

Example 32 with ProgressDialog

use of android.app.ProgressDialog in project IceNet by anton46.

the class StringActivity method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_string);
    final TextView result = (TextView) findViewById(R.id.tv_result);
    final ProgressDialog dialog = new ProgressDialog(this);
    dialog.setMessage("Loading...");
    dialog.show();
    IceNet.connect().createRequest().get().pathUrl("/string").fromString().execute("request_string", new RequestCallback<String>() {

        @Override
        public void onRequestSuccess(String str) {
            dialog.dismiss();
            result.setText(str);
        }

        @Override
        public void onRequestError(RequestError error) {
            dialog.dismiss();
        }
    });
}
Also used : RequestError(labs.anton.icenet.RequestError) TextView(android.widget.TextView) ProgressDialog(android.app.ProgressDialog)

Example 33 with ProgressDialog

use of android.app.ProgressDialog in project JamsMusicPlayer by psaravan.

the class AsyncIterateThruFolderTask method onPreExecute.

protected void onPreExecute() {
    //Create a String template for the dialog's message body.
    String message = mContext.getResources().getString(R.string.scanning_subfolders_message) + " " + mFolderName;
    pd = new ProgressDialog(mContext);
    pd.setCancelable(false);
    pd.setIndeterminate(false);
    pd.setTitle(R.string.scanning_subfolders);
    pd.setMessage(message);
    pd.show();
}
Also used : ProgressDialog(android.app.ProgressDialog)

Example 34 with ProgressDialog

use of android.app.ProgressDialog in project JamsMusicPlayer by psaravan.

the class AsyncPlayFolderRecursiveTask method onPreExecute.

protected void onPreExecute() {
    pd = new ProgressDialog(mContext);
    pd.setCancelable(false);
    pd.setIndeterminate(false);
    pd.setTitle(R.string.play_folder_recursive);
    pd.setButton(DialogInterface.BUTTON_NEUTRAL, mContext.getResources().getString(R.string.cancel), new OnClickListener() {

        @Override
        public void onClick(DialogInterface arg0, int arg1) {
            pd.dismiss();
        }
    });
    pd.show();
}
Also used : DialogInterface(android.content.DialogInterface) OnClickListener(android.content.DialogInterface.OnClickListener) ProgressDialog(android.app.ProgressDialog)

Example 35 with ProgressDialog

use of android.app.ProgressDialog in project JamsMusicPlayer by psaravan.

the class AsyncDeleteTask method onPreExecute.

protected void onPreExecute() {
    pd = new ProgressDialog(mContext);
    pd.setCancelable(false);
    pd.setIndeterminate(false);
    pd.setTitle(R.string.delete);
    pd.setMessage(mContext.getResources().getString(R.string.deleting_files));
    pd.setButton(DialogInterface.BUTTON_NEUTRAL, mContext.getResources().getString(R.string.run_in_background), new OnClickListener() {

        @Override
        public void onClick(DialogInterface arg0, int arg1) {
            pd.dismiss();
        }
    });
    pd.show();
}
Also used : DialogInterface(android.content.DialogInterface) OnClickListener(android.content.DialogInterface.OnClickListener) ProgressDialog(android.app.ProgressDialog)

Aggregations

ProgressDialog (android.app.ProgressDialog)267 DialogInterface (android.content.DialogInterface)47 Intent (android.content.Intent)23 View (android.view.View)21 File (java.io.File)19 TextView (android.widget.TextView)13 SuppressLint (android.annotation.SuppressLint)12 Handler (android.os.Handler)12 FrameLayout (android.widget.FrameLayout)12 ArrayList (java.util.ArrayList)12 IOException (java.io.IOException)11 JSONObject (org.json.JSONObject)10 Uri (android.net.Uri)9 LinearLayout (android.widget.LinearLayout)9 OnCancelListener (android.content.DialogInterface.OnCancelListener)8 Display (android.view.Display)8 Activity (android.app.Activity)7 Dialog (android.app.Dialog)7 ImageView (android.widget.ImageView)7 List (java.util.List)7