freebitco.in script


SUBMITTED BY: Guest

DATE: Sept. 15, 2016, midnight

FORMAT: Text only

SIZE: 1.1 kB

HITS: 1310

  1. public class ListViewActivity extends Activity {
  2. // Log tag
  3. private static final String TAG = ListViewActivity.class.getSimpleName();
  4. // change here url of server api
  5. private static final String url = "https://comida-95724.herokuapp.com/api/v1/restaurants/get_featured_restaurants";
  6. private ProgressDialog pDialog;
  7. private List<Movie> movieList = new ArrayList<Movie>();
  8. private ListView listView;
  9. private CustomListAdapter adapter;
  10. @Override
  11. protected void onCreate(Bundle savedInstanceState) {
  12. super.onCreate(savedInstanceState);
  13. setContentView(R.layout.activity_listview);
  14. listView = (ListView) findViewById(R.id.list);
  15. adapter = new CustomListAdapter(this, movieList);
  16. listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
  17. @Override
  18. public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
  19. Movie movie = movieList.get(position);
  20. Intent intent = new Intent(ListViewActivity.this, SecondActivity.class);

comments powered by Disqus