I have 3 actions and 1 class;
MobilEpostaActivity (the main activity) gives the data received from the gmail server for this data: ListeleActivity (fill and show the ListView), and ListeleActivity fills this data with the ListView and when the onClick element in the ListView the element click data element targets GoruntuleActivity (Shows event information onclick). And also I have the class " Baglantı " (meaning "Connection"), and it has all the other methods that are necessary for everyone.
My problem is here: when the user clicks the delete button. I want to update the list and show the next letter to the user. when the user clicks the delete button, I can show the user the following mail with the addition of 1 to the position and show it. But this does not work properly .. because of his attachment are complex.
Now starting with MobilEpostaActivity; I take the username and password from the user and pass them to the Baglantı class to connect to the server. Then I get the result of the body, from the subject to the arraylists. Then I pass this body, and considering ListeleActivity with the intention
public void epostaListeleme() throws MessagingException, IOException
{
final Intent intent = new Intent(this, ListeleActivity.class);
intent.putStringArrayListExtra(bodylistesi ,(ArrayList<String>) getBodyList());
intent.putStringArrayListExtra(konulistesi ,(ArrayList<String>) getKonuList());
intent.putStringArrayListExtra(kimdenlistesi ,(ArrayList<String>) getKimdenList());
startActivity(intent);
}
In the ListeleActivity () list, Retrieving data from MobilEpostaActivity with the Bundle. Filling the list with "from" data. And waiting for listItemOnClick. If Onclick Action happens, pass the data to GoruntuleActivity.
GoruntuleActivity()
ListeleActivity Bundle.
( ), Delete OnClick.
On OnClick Action FIRST) ListView.
arrayAdapter.remove(arrayAdapter.getItem(position));
listBaglanti.RefreshedPositions(position);
arrayAdapter.notifyDataSetChanged();
SECOND)
public void RefreshedPositions(int position)
{
list.remove(list.get(position));
kimdenlist.remove(kimdenlist.get(position));
konulist.remove(konulist.get(position));
}
THIRD) "" arraylists.
bodylistRefresh = baglan.list;
kimdenlisteRefresh = baglan.kimdenlist;
konulisteRefresh = baglan.konulist;
) "" MobilEpostaActivity (, ListeleAcitivity)
MobilEpostaActivity mobilObject = new MobilEpostaActivity();
mobilObject.setKonuList(konulisteRefresh);
mobilObject.setKimdenList(kimdenlisteRefresh);
mobilObject.setBodyList(bodylistRefresh);
, , . , , . ;
: 3 Merve. : 0,1,2

"": ListView position = 1 . GoruntuleActivity.
