浏览代码

[공통][New] 액션 바, 확인/휴지통/좋아요/공유/북마크 버튼 추가 2

hyodong.min 7 年之前
父节点
当前提交
462efd0da3

+ 55 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/helper/ActionBarHelper.java

@@ -526,6 +526,61 @@ public class ActionBarHelper extends Helper {
       return this;
     }
 
+    /**
+     * 휴지통
+     *
+     * @param trashListener
+     * @return
+     */
+    public Builder trash(INavigationBarListener trashListener) {
+      navigationBarBuilder.trash(trashListener);
+      return this;
+    }
+
+    /**
+     * 확인
+     *
+     * @param confirmListener
+     * @return
+     */
+    public Builder confirm(INavigationBarListener confirmListener) {
+      navigationBarBuilder.confirm(confirmListener);
+      return this;
+    }
+
+    /**
+     * 북마크
+     *
+     * @param bookmarkListener
+     * @return
+     */
+    public Builder bookmark(INavigationBarListener bookmarkListener) {
+      navigationBarBuilder.bookmark(bookmarkListener);
+      return this;
+    }
+
+    /**
+     * 좋아요
+     *
+     * @param likeListener
+     * @return
+     */
+    public Builder like(INavigationBarListener likeListener) {
+      navigationBarBuilder.like(likeListener);
+      return this;
+    }
+
+    /**
+     * 공유
+     *
+     * @param shareListener
+     * @return
+     */
+    public Builder share(INavigationBarListener shareListener) {
+      navigationBarBuilder.share(shareListener);
+      return this;
+    }
+
     private void set() {
       actionBarHelper.set(this);
     }

+ 19 - 14
app/src/main/java/kr/co/zumo/app/lifeplus/helper/NavigationBar.java

@@ -193,7 +193,7 @@ public class NavigationBar {
     setViewVisible(buttonTrash, isVisible, View.GONE);
   }
 
-  private void setConfrimVisible(boolean isVisible) {
+  private void setConfirmVisible(boolean isVisible) {
     setViewVisible(buttonConfirm, isVisible, View.GONE);
   }
 
@@ -285,7 +285,7 @@ public class NavigationBar {
 
     setUnderlineVisible(newBuilder.isVisibleUnderline);
 
-    setConfrimVisible(newBuilder.isVisibleConfirm);
+    setConfirmVisible(newBuilder.isVisibleConfirm);
     mapClickListener(buttonConfirm, newBuilder.confirmListener);
 
     setTrashVisible(newBuilder.isVisibleTrash);
@@ -317,22 +317,27 @@ public class NavigationBar {
     int color;
     if (isWhite) {
       color = ResourceUtil.getColor(R.color.CFFFFFF);
-      actionBarTitle.setTextColor(color);
-      DrawableCompat.setTint(buttonBack.getDrawable(), color);
-      DrawableCompat.setTint(imageBi.getDrawable(), color);
-      DrawableCompat.setTint(buttonBack.getDrawable(), color);
-      DrawableCompat.setTint(buttonSearch.getDrawable(), color);
-      DrawableCompat.setTint(buttonMenu.getDrawable(), color);
     }
     else {
       color = ResourceUtil.getColor(R.color.C000000);
-      actionBarTitle.setTextColor(color);
-      DrawableCompat.setTint(buttonBack.getDrawable(), color);
-      DrawableCompat.setTint(imageBi.getDrawable(), color);
-      DrawableCompat.setTint(buttonBack.getDrawable(), color);
-      DrawableCompat.setTint(buttonSearch.getDrawable(), color);
-      DrawableCompat.setTint(buttonMenu.getDrawable(), color);
     }
+    actionBarTitle.setTextColor(color);
+    textButton.setTextColor(color);
+    DrawableCompat.setTint(imageBi.getDrawable(), color);
+    DrawableCompat.setTint(buttonBack.getDrawable(), color);
+    DrawableCompat.setTint(buttonSearch.getDrawable(), color);
+    DrawableCompat.setTint(buttonMenu.getDrawable(), color);
+    DrawableCompat.setTint(buttonArrow.getDrawable(), color);
+    DrawableCompat.setTint(buttonHome.getDrawable(), color);
+    DrawableCompat.setTint(buttonNotification.getDrawable(), color);
+    DrawableCompat.setTint(buttonSetting.getDrawable(), color);
+    DrawableCompat.setTint(buttonClose.getDrawable(), color);
+    DrawableCompat.setTint(buttonTrash.getDrawable(), color);
+    DrawableCompat.setTint(buttonConfirm.getDrawable(), color);
+    DrawableCompat.setTint(buttonShare.getDrawable(), color);
+    DrawableCompat.setTint(buttonLike.getDrawable(), color);
+    DrawableCompat.setTint(buttonBookmark.getDrawable(), color);
+
   }
 
   /***********************************