I have a listview
with two buttons.
I want replace those two button with textview once I get the response from the server.
How can I achieve this?
After server response:
public void onResponse(String response) {
try {
JSONObject obj = new JSONObject(response);
if (obj.getString("response").equals("1")) {
JSONObject res = new JSONObject(obj.getString("data"));
Toast.makeText(getApplicationContext(), obj.getString("message"), Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(getApplicationContext(), obj.getString("message"), Toast.LENGTH_SHORT).show();
}
} catch (JSONException e) {
e.printStackTrace();
}
}
I have not created any adapter.