Getting Data from Local JSON and set Json Data into a TextView which is to be swipable(View Pager) in Android
Create assets folder and put json.json file. Inside of an Activity: ViewPager myPager = null; int count1 = 0; Timer timer; ArrayList<String> title1; ArrayList<String> title2; JSONArray jsonArray; JSONObject jsonObject; String m; String movie; String category; InputStream inputstream; BufferedReader reader; int pager_position; callingJsonFunction(); getData(); setTime_ToSlide(); private void callingJsonFunction () { try { inputstream = getResources().getAssets().open("json.json"); reader = new BufferedReader(new InputStreamReader(inputstream)); m = reader.toString(); StringBuilder total = new StringBuilder(); String line; while ((line = reader.readLine()) != null) { total.append(line); } ...