|
|
@@ -44,6 +44,7 @@ public class NavigationBar {
|
|
|
private TextView textButton;
|
|
|
private View viewUnderline;
|
|
|
private ImageView buttonTrash;
|
|
|
+ private ImageView buttonEdit;
|
|
|
private ImageView buttonConfirm;
|
|
|
private ImageView buttonShare;
|
|
|
private ImageView buttonLike;
|
|
|
@@ -82,6 +83,7 @@ public class NavigationBar {
|
|
|
buttonSetting = navigationView.findViewById(R.id.image_view_setting);
|
|
|
buttonClose = navigationView.findViewById(R.id.image_view_close);
|
|
|
textButton = navigationView.findViewById(R.id.text_sub);
|
|
|
+ buttonEdit = navigationView.findViewById(R.id.image_view_edit);
|
|
|
buttonTrash = navigationView.findViewById(R.id.image_view_trash);
|
|
|
buttonConfirm = navigationView.findViewById(R.id.image_view_confirm);
|
|
|
buttonShare = navigationView.findViewById(R.id.image_view_share);
|
|
|
@@ -198,6 +200,10 @@ public class NavigationBar {
|
|
|
setViewVisible(viewUnderline, isVisible, View.GONE);
|
|
|
}
|
|
|
|
|
|
+ private void setEditVisible(boolean isVisible) {
|
|
|
+ setViewVisible(buttonEdit, isVisible, View.GONE);
|
|
|
+ }
|
|
|
+
|
|
|
private void setTrashVisible(boolean isVisible) {
|
|
|
setViewVisible(buttonTrash, isVisible, View.GONE);
|
|
|
}
|
|
|
@@ -300,6 +306,10 @@ public class NavigationBar {
|
|
|
setConfirmVisible(newBuilder.isVisibleConfirm);
|
|
|
mapClickListener(buttonConfirm, newBuilder.confirmListener);
|
|
|
|
|
|
+
|
|
|
+ setEditVisible(newBuilder.isVisibleEdit);
|
|
|
+ mapClickListener(buttonEdit, newBuilder.editListener);
|
|
|
+
|
|
|
setTrashVisible(newBuilder.isVisibleTrash);
|
|
|
mapClickListener(buttonTrash, newBuilder.trashListener);
|
|
|
|
|
|
@@ -523,6 +533,7 @@ public class NavigationBar {
|
|
|
protected boolean isVisibleClose = false;
|
|
|
protected boolean isVisibleTextButton = false;
|
|
|
protected boolean isVisibleUnderline = false;
|
|
|
+ protected boolean isVisibleEdit = false;
|
|
|
protected boolean isVisibleTrash = false;
|
|
|
protected boolean isVisibleConfirm = false;
|
|
|
protected boolean isVisibleLike = false;
|
|
|
@@ -541,6 +552,7 @@ public class NavigationBar {
|
|
|
protected INavigationBarListener closeListener = null;
|
|
|
protected INavigationBarListener textButtonListener = null;
|
|
|
protected INavigationBarListener arrowListener = null;
|
|
|
+ protected INavigationBarListener editListener = null;
|
|
|
protected INavigationBarListener trashListener = null;
|
|
|
protected INavigationBarListener confirmListener = null;
|
|
|
protected INavigationBarListener likeListener = null;
|
|
|
@@ -726,6 +738,18 @@ public class NavigationBar {
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 수정
|
|
|
+ *
|
|
|
+ * @param editListener
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public Builder edit(INavigationBarListener editListener) {
|
|
|
+ this.editListener = editListener;
|
|
|
+ isVisibleEdit = true;
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 휴지통
|
|
|
*
|