mirror of
https://github.com/ClaytonWWilson/Listify.git
synced 2025-12-15 18:28:47 +00:00
Can now remove sharee from sharee list
This commit is contained in:
parent
19c925700a
commit
5e48ba90ff
@ -45,6 +45,8 @@ public class ListSharees extends AppCompatActivity implements Requestor.Receiver
|
||||
MyAdapter myAdapter;
|
||||
Requestor requestor;
|
||||
|
||||
Button removeSharee;
|
||||
|
||||
ArrayList<String> lShareeEmails = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
@ -107,11 +109,19 @@ public class ListSharees extends AppCompatActivity implements Requestor.Receiver
|
||||
View listproduct = layoutInflater.inflate(R.layout.shopping_list_sharee_entry, parent,false);
|
||||
|
||||
TextView shareeEmail = listproduct.findViewById(R.id.textView14);
|
||||
|
||||
if(!lShareeEmails.isEmpty()) {
|
||||
shareeEmail.setText(lShareeEmails.get(position));
|
||||
}
|
||||
|
||||
removeSharee = (Button) listproduct.findViewById(R.id.button4);
|
||||
removeSharee.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
lShareeEmails.remove(position);
|
||||
myAdapter.notifyDataSetChanged();
|
||||
}
|
||||
});
|
||||
|
||||
return listproduct;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user