why i can not remove item on listview
final ListView viewInfo = (ListView)findViewById(R.id.listView1);
final SWFForeCastInfoLayoutAdapter adapter = new
SWFForeCastInfoLayoutAdapter(this, data,
data.getCurrentConditionData());
viewInfo.setAdapter(adapter);
adapter.notifyDataSetChanged();
viewInfo.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> a, View
v, final int
position, long id) {
AlertDialog.Builder adb=new
AlertDialog.Builder(SearchActivity.this);
adb.setTitle("Delete?");
adb.setMessage("Are you sure you want to delete
" + position);
final int positionToRemove = position;
adb.setNegativeButton("Cancel", null);
adb.setPositiveButton("Ok", new
AlertDialog.OnClickListener() {
@Override
public void
onClick(DialogInterface dialog, int which) {
// TODO Auto-generated
method stub
viewInfo.removeViewAt(positionToRemove);
adapter.notifyDataSetChanged();
}});
adb.show();
}
});
i see logcat . It say error at this viewInfo.removeViewAt(positionToRemove);
How can i do
best regard;
jhew
2011/8/31, TreKing <[email protected]>:
> On Wed, Aug 31, 2011 at 5:03 AM, Tawisak Ruksuwan <
> [email protected]> wrote:
>
>> this page can run but i want call public class MyCustomAdapter
>> extends BaseAdapter for show data from layout item
>> How can i do?
>>
>
> Your question makes little sense.
>
> -------------------------------------------------------------------------------------------------
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en