Created
July 25, 2016 15:55
-
-
Save ParisaRashidi/b8735c3d3c2adfabbd231b54a47cea60 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void requesSecondPage() { | |
RequestQueue queue = Volley.newRequestQueue(this); | |
String url = "http://leyliomajnoonapp.ir/panel/ws1.php?type=type=items&start=0&catid=\"+value+\"&id=0&total=10"; | |
StringRequest stringRequest = new StringRequest(Request.Method.GET, url, new Response.Listener<String>() { | |
@Override | |
public void onResponse(String response) { | |
Toast.makeText(SecondPage.this, "the response of second page is :" + response, Toast.LENGTH_LONG).show(); | |
Log.d(TAG, "Response " + response); | |
Gson mGson = new Gson(); | |
ContentAnswer contentAnswer = mGson.fromJson((response), ContentAnswer.class); | |
secodAdapter = new secondPageAdapter(SecondPage.this, contentAnswer.content); | |
secondPageRecycler.setAdapter(secodAdapter); | |
} | |
}, new Response.ErrorListener() { | |
@Override | |
public void onErrorResponse(VolleyError error) { | |
// Log.d(TAG, "Error " + error.getMessage()); | |
} | |
}); | |
queue.add(stringRequest); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment