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();
}
});
}
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();
}
});
}
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();
}
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();
}
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();
}
Aggregations