Detay Sayfasına Veri Aktarımı - Android Volley
25.01.2016 - 02:12
@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
mAdapter = new RecipeAdapter(getActivity());
GridView grid = (GridView) getView().findViewById(R.id.gridView);
//ListView listView = (ListView) getView().findViewById(R.id.recipe_list);
fetch(1);
grid.setOnScrollListener(new EndlessScrollListener() {
@Override
public boolean onLoadMore(int page, int totalItemsCount) {
Log.d("PAGE", "onLoadMore: " + page);
// Triggered only when new data needs to be appended to the list
// Add whatever code is needed to append new items to your AdapterView
customLoadMoreDataFromApi(page);
// or customLoadMoreDataFromApi(totalItemsCount);
return true; // ONLY if more data is actually being loaded; false otherwise.
}
});
grid.setAdapter(mAdapter);
grid.setOnItemClickListener(new AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView parent, View v, int position, long id) {
Intent intent = new Intent(getActivity(),RecipeActivity.class);
intent.putExtra("recipe", position);
startActivity(intent); //start Activity
}
});
}
arkadaşlar yemek tarifinin detaylarını detay sayfasında nasıl okuyacağım
9
Görüntülenme
0 Beğeni