mirror of
https://github.com/ClaytonWWilson/Listify.git
synced 2026-03-10 18:55:03 +00:00
Can now remove sharee from sharee list
This commit is contained in:
@@ -45,6 +45,8 @@ public class ListSharees extends AppCompatActivity implements Requestor.Receiver
|
|||||||
MyAdapter myAdapter;
|
MyAdapter myAdapter;
|
||||||
Requestor requestor;
|
Requestor requestor;
|
||||||
|
|
||||||
|
Button removeSharee;
|
||||||
|
|
||||||
ArrayList<String> lShareeEmails = new ArrayList<>();
|
ArrayList<String> lShareeEmails = new ArrayList<>();
|
||||||
|
|
||||||
@Override
|
@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);
|
View listproduct = layoutInflater.inflate(R.layout.shopping_list_sharee_entry, parent,false);
|
||||||
|
|
||||||
TextView shareeEmail = listproduct.findViewById(R.id.textView14);
|
TextView shareeEmail = listproduct.findViewById(R.id.textView14);
|
||||||
|
|
||||||
if(!lShareeEmails.isEmpty()) {
|
if(!lShareeEmails.isEmpty()) {
|
||||||
shareeEmail.setText(lShareeEmails.get(position));
|
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;
|
return listproduct;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user