Postingan lainnya
bagaimana caranya supaya upload selesai masuk ke layout lain
selamat sore teman2 saya mau bertanya tentang android studio, bagaimana caranya setelah selesai upload muncul pop-up upload berhasil dan masuk ke layout lain. in contoh kode yang saya pake (boleh copas dari internet).
@Override
public void onSuccess(int statusCode, Header[] headers, JSONObject response) {
super.onSuccess(statusCode, headers, response);
Log.d("Tag", statusCode + "");
Log.d("Response", String.valueOf(response));
try {
if (response.getString(KEY_SUCCESS) != null) {
String res = response.getString(KEY_SUCCESS);
if (Integer.parseInt(res) == 1) {
edttxt_title.setText("");
edttxt_description.setText("");
edttxt_tag.setText("");
selectedFilePath = "";
messageText.setText("No file chosen");
track_image.setImageBitmap(null);
Toast.makeText(getApplicationContext(), "uploaded successfully", Toast.LENGTH_SHORT).show();
// dialog.dismiss();
} else {
Toast.makeText(getApplicationContext(), "not uploaded", Toast.LENGTH_SHORT).show();
// dialog.dismiss();
}
}
} catch (JSONException e) {
e.printStackTrace();
}
}
mohon bantuanya,
0
1 Jawaban:
Jarang main Android Studio gan, mungkin alurnya kalo upload selesai (true), langsung Intent aja ke layout tujuan. Mungkin kek gitu si.
0