mirror of
https://github.com/ClaytonWWilson/Listify.git
synced 2025-12-15 18:28:47 +00:00
Removed share button from sliding lists
This commit is contained in:
parent
c0a93e3684
commit
cf4791badc
@ -79,7 +79,7 @@ public class ShareeSwipeableAdapter extends BaseAdapter {
|
|||||||
holder.swipeLayout = (SwipeRevealLayout)convertView.findViewById(R.id.swipe_layout);
|
holder.swipeLayout = (SwipeRevealLayout)convertView.findViewById(R.id.swipe_layout);
|
||||||
holder.frontView = convertView.findViewById(R.id.front_layout);
|
holder.frontView = convertView.findViewById(R.id.front_layout);
|
||||||
holder.deleteList = convertView.findViewById(R.id.delete_list);
|
holder.deleteList = convertView.findViewById(R.id.delete_list);
|
||||||
holder.shareList = convertView.findViewById(R.id.share_list);
|
// holder.shareList = convertView.findViewById(R.id.share_list);
|
||||||
holder.textView = (TextView) convertView.findViewById(R.id.shopping_list_name);
|
holder.textView = (TextView) convertView.findViewById(R.id.shopping_list_name);
|
||||||
|
|
||||||
convertView.setTag(holder);
|
convertView.setTag(holder);
|
||||||
@ -101,12 +101,12 @@ public class ShareeSwipeableAdapter extends BaseAdapter {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
holder.shareList.setOnClickListener(new View.OnClickListener() {
|
// holder.shareList.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
// @Override
|
||||||
public void onClick(View v) {
|
// public void onClick(View v) {
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
|
||||||
holder.frontView.setOnClickListener(new View.OnClickListener() {
|
holder.frontView.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -79,7 +79,7 @@ public class ShoppingListsSwipeableAdapter extends BaseAdapter {
|
|||||||
holder.swipeLayout = (SwipeRevealLayout)convertView.findViewById(R.id.swipe_layout);
|
holder.swipeLayout = (SwipeRevealLayout)convertView.findViewById(R.id.swipe_layout);
|
||||||
holder.frontView = convertView.findViewById(R.id.front_layout);
|
holder.frontView = convertView.findViewById(R.id.front_layout);
|
||||||
holder.deleteList = convertView.findViewById(R.id.delete_list);
|
holder.deleteList = convertView.findViewById(R.id.delete_list);
|
||||||
holder.shareList = convertView.findViewById(R.id.share_list);
|
// holder.shareList = convertView.findViewById(R.id.share_list);
|
||||||
holder.listName = (TextView) convertView.findViewById(R.id.shopping_list_name);
|
holder.listName = (TextView) convertView.findViewById(R.id.shopping_list_name);
|
||||||
holder.itemCount = (TextView) convertView.findViewById(R.id.shopping_list_item_count);
|
holder.itemCount = (TextView) convertView.findViewById(R.id.shopping_list_item_count);
|
||||||
|
|
||||||
@ -124,41 +124,41 @@ public class ShoppingListsSwipeableAdapter extends BaseAdapter {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
holder.shareList.setOnClickListener(new View.OnClickListener() {
|
// holder.shareList.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
// @Override
|
||||||
public void onClick(View v) {
|
// public void onClick(View v) {
|
||||||
View codeView = inflater.inflate(R.layout.activity_sharedemail, null);
|
// View codeView = inflater.inflate(R.layout.activity_sharedemail, null);
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
// AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
||||||
builder.setView(codeView);
|
// builder.setView(codeView);
|
||||||
builder.setTitle("Share list");
|
// builder.setTitle("Share list");
|
||||||
builder.setMessage("Please enter the email of the user who you want to share the list with.");
|
// builder.setMessage("Please enter the email of the user who you want to share the list with.");
|
||||||
builder.setPositiveButton("Submit", new DialogInterface.OnClickListener() {
|
// builder.setPositiveButton("Submit", new DialogInterface.OnClickListener() {
|
||||||
@Override
|
// @Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
// public void onClick(DialogInterface dialog, int which) {
|
||||||
EditText sharedEmailText = (EditText) codeView.findViewById(R.id.editTextTextSharedEmail);
|
// EditText sharedEmailText = (EditText) codeView.findViewById(R.id.editTextTextSharedEmail);
|
||||||
String sharedEmail = sharedEmailText.getText().toString();
|
// String sharedEmail = sharedEmailText.getText().toString();
|
||||||
ListShare listShare = new ListShare(curList.getListID(), sharedEmail, "Read, Write, Delete, Share", null);
|
// ListShare listShare = new ListShare(curList.getListID(), sharedEmail, "Read, Write, Delete, Share", null);
|
||||||
try {
|
// try {
|
||||||
requestor.putObject(listShare);
|
// requestor.putObject(listShare);
|
||||||
}
|
// }
|
||||||
catch(Exception e) {
|
// catch(Exception e) {
|
||||||
e.printStackTrace();
|
// e.printStackTrace();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
|
// builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
|
||||||
@Override
|
// @Override
|
||||||
public void onClick(DialogInterface dialog, int which) {}
|
// public void onClick(DialogInterface dialog, int which) {}
|
||||||
});
|
// });
|
||||||
AlertDialog dialog = builder.create();
|
// AlertDialog dialog = builder.create();
|
||||||
dialog.show();
|
// dialog.show();
|
||||||
|
//
|
||||||
Toast.makeText(activity, String.format("Share %s", curList.getName()), Toast.LENGTH_SHORT).show();
|
// Toast.makeText(activity, String.format("Share %s", curList.getName()), Toast.LENGTH_SHORT).show();
|
||||||
|
//
|
||||||
// Close the layout
|
// // Close the layout
|
||||||
binderHelper.closeLayout(Integer.toString(curList.getListID()));
|
// binderHelper.closeLayout(Integer.toString(curList.getListID()));
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
|
||||||
holder.frontView.setOnClickListener(new View.OnClickListener() {
|
holder.frontView.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -179,7 +179,7 @@ public class ShoppingListsSwipeableAdapter extends BaseAdapter {
|
|||||||
SwipeRevealLayout swipeLayout;
|
SwipeRevealLayout swipeLayout;
|
||||||
View frontView;
|
View frontView;
|
||||||
View deleteList;
|
View deleteList;
|
||||||
View shareList;
|
// View shareList;
|
||||||
TextView listName;
|
TextView listName;
|
||||||
TextView itemCount;
|
TextView itemCount;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,12 +17,12 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<ImageView
|
<!-- <ImageView-->
|
||||||
android:id="@+id/share_list"
|
<!-- android:id="@+id/share_list"-->
|
||||||
android:src="@drawable/ic_baseline_share_24"
|
<!-- android:src="@drawable/ic_baseline_share_24"-->
|
||||||
android:layout_width="50dp"
|
<!-- android:layout_width="50dp"-->
|
||||||
android:layout_height="50dp"
|
<!-- android:layout_height="50dp"-->
|
||||||
android:background="@color/colorAccent"/>
|
<!-- android:background="@color/colorAccent"/>-->
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/delete_list"
|
android:id="@+id/delete_list"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user