Код: Выделить всё
private void loadDataMahasiswa() {
progress = new ProgressDialog(this);
progress.setCancelable(false);
progress.setMessage("Loading ...");
progress.show();
String nip = editTxtnip.getText().toString();
Retrofit retrofit = new Retrofit.Builder()
.baseUrl(URL)
.addConverterFactory(GsonConverterFactory.create())
.build();
LoginAPI api = retrofit.create(LoginAPI.class);
Call call = api.view3(nip);
call.enqueue(new Callback() {
@Override
public void onResponse(Call call, Response response) {
String value = response.body().getValue();
progress.dismiss();
if (value.equals("1")) {
results = response.body().getResult();
viewAdapter = new RecyclerViewAdapter3(Lihat_izin.this, results);
recyclerView.setAdapter(viewAdapter);
}
}
@Override
public void onFailure(Call call, Throwable t) {
}
});
}
Код: Выделить всё
Подробнее здесь: [url]https://stackoverflow.com/questions/72766906/how-to-output-data-from-xampp-to-textview[/url]