I got a custom array or list.Which is like :
final List<Haber> haberler = new ArrayList<Haber>();
Haber is my custom class. I want to do :
listemiz.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
AlertDialog.Builder diyalogOlusturucu =
new AlertDialog.Builder(getActivity(),R.style.DialogTheme);
diyalogOlusturucu.setMessage(haberler[position])
.setCancelable(false)
.setPositiveButton("Tamam", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
}
});
diyalogOlusturucu.create().show();
}
});
but
haberler[position]
is not working as expected. What can i do about that ? All code of my project : Haberler.java which hold these codes : https://gist.github.com/ShockvaWe/05fb28543032cc018778dedf5d9f4c04 Haber.java which is my custom class : https://gist.github.com/ShockvaWe/ddf0cbd1ad766977ff28e4409ba51b4b