浏览代码

Merge branch 'develop' of https://github.com/swict/LifePlusAndroid into develop

Hasemi 7 年之前
父节点
当前提交
4238f09fa0

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

@@ -637,6 +637,17 @@ public class ActionBarHelper extends Helper {
       return this;
     }
 
+    /**
+     * 점점점 메뉴
+     *
+     * @param dotDotDotListener
+     * @return
+     */
+    public Builder dotDotDot(INavigationBarListener dotDotDotListener) {
+      navigationBarBuilder.dotDotDot(dotDotDotListener);
+      return this;
+    }
+
     private void set() {
       actionBarHelper.set(this);
     }

+ 24 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/helper/NavigationBar.java

@@ -48,6 +48,7 @@ public class NavigationBar {
   private ImageView buttonShare;
   private ImageView buttonLike;
   private ImageView buttonBookmark;
+  private ImageView buttonDotDotDot;
   private View viewBackground;
 
   private boolean isArrowOpened = false;
@@ -86,6 +87,7 @@ public class NavigationBar {
     buttonShare = navigationView.findViewById(R.id.image_view_share);
     buttonLike = navigationView.findViewById(R.id.image_view_like);
     buttonBookmark = navigationView.findViewById(R.id.image_view_bookmark);
+    buttonDotDotDot = navigationView.findViewById(R.id.image_view_dotdotdot);
     viewBackground = navigationView.findViewById(R.id.layout_background);
 
     setClickListener(buttonBack);
@@ -103,6 +105,7 @@ public class NavigationBar {
     setClickListener(buttonShare);
     setClickListener(buttonLike);
     setClickListener(buttonBookmark);
+    setClickListener(buttonDotDotDot);
     setClickListener(imageBi);
 
   }
@@ -215,6 +218,10 @@ public class NavigationBar {
     setViewVisible(buttonBookmark, isVisible, View.GONE);
   }
 
+  private void setDotDotDotVisible(boolean isVisible) {
+    setViewVisible(buttonDotDotDot, isVisible, View.GONE);
+  }
+
   /**
    * 메뉴 버튼 보이기
    *
@@ -305,6 +312,9 @@ public class NavigationBar {
     setBookmarkVisible(newBuilder.isVisibleBookmark);
     mapClickListener(buttonBookmark, newBuilder.bookmarkListener);
 
+    setDotDotDotVisible(newBuilder.isVisibleDotDotDot);
+    mapClickListener(buttonDotDotDot, newBuilder.dotDotDotListener);
+
     setWhiteUi(newBuilder.isWhite);
     builder = newBuilder;
   }
@@ -466,6 +476,7 @@ public class NavigationBar {
     protected boolean isVisibleLike = false;
     protected boolean isVisibleShare = false;
     protected boolean isVisibleBookmark = false;
+    protected boolean isVisibleDotDotDot = false;
     protected int text = R.string.empty_string;
 
     protected INavigationBarListener backListener = null;
@@ -484,6 +495,7 @@ public class NavigationBar {
     protected INavigationBarListener shareListener = null;
     protected INavigationBarListener bookmarkListener = null;
     protected INavigationBarListener logoListener = null;
+    protected INavigationBarListener dotDotDotListener = null;
 
     public Builder(Context context) {
       this.context = context;
@@ -722,6 +734,18 @@ public class NavigationBar {
       return this;
     }
 
+    /**
+     * 점점점 메뉴
+     *
+     * @param dotDotDotListener
+     * @return
+     */
+    public Builder dotDotDot(INavigationBarListener dotDotDotListener) {
+      this.dotDotDotListener = dotDotDotListener;
+      isVisibleDotDotDot = true;
+      return this;
+    }
+
     /**
      * Build NavigationBar
      *

+ 9 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/view/presenter/Presenter.java

@@ -452,6 +452,15 @@ public abstract class Presenter<M extends Model, V extends IView> implements ILi
     throwRuntimeException();
   }
 
+  /**
+   * 닷닷닷 메뉴
+   *
+   * @param actionBar
+   */
+  public void onNavigationClickDotDotDot(NavigationBar actionBar) {
+    throwRuntimeException();
+  }
+
   /***********************************
    * Floating Action Button Listener
    ***********************************/

+ 1 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/contents/ContentsFragment.java

@@ -56,6 +56,7 @@ public class ContentsFragment extends FragmentBase<ContentsPresenter> implements
       .share(actionBar -> presenter.onNavigationClickShare(actionBar))
       .white()
       .transparent()
+      .dotDotDot(actionBar -> presenter.onNavigationClickDotDotDot(actionBar))
       .show();
     this.actionBarHelper = actionBarHelper;
   }

+ 10 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/contents/ContentsPresenter.java

@@ -70,6 +70,7 @@ public class ContentsPresenter extends Presenter<ContentsModel, IContentsView> {
   @Override
   protected void createViewInternal() {
   }
+
   @Override
   protected void destroyInternal() {
     if (null != reviewDialog) {
@@ -186,6 +187,15 @@ public class ContentsPresenter extends Presenter<ContentsModel, IContentsView> {
     view.setBookmarked(model.getContentsBean().isBookmarked());
   }
 
+  /**
+   * 닷닷닷 메뉴
+   *
+   * @param actionBar
+   */
+  public void onNavigationClickDotDotDot(NavigationBar actionBar) {
+    // todo 전체 보기
+  }
+
   /**
    * 좋아요 클릭
    *

+ 18 - 0
app/src/main/res/drawable/icon_header_series_wh.xml

@@ -0,0 +1,18 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="19dp"
+        android:height="19dp"
+        android:viewportWidth="70"
+        android:viewportHeight="70">
+  <path
+    android:fillColor="#FFF"
+    android:fillType="nonZero"
+    android:pathData="M57,57m-5,0a5,5 0,1 1,10 0a5,5 0,1 1,-10 0"/>
+  <path
+    android:fillColor="#FFF"
+    android:fillType="nonZero"
+    android:pathData="M57,35m-5,0a5,5 0,1 1,10 0a5,5 0,1 1,-10 0"/>
+  <path
+    android:fillColor="#FFF"
+    android:fillType="nonZero"
+    android:pathData="M57,13m-5,0a5,5 0,1 1,10 0a5,5 0,1 1,-10 0"/>
+</vector>

+ 17 - 1
app/src/main/res/layout/action_bar.xml

@@ -215,11 +215,27 @@
       android:padding="9dp"
       android:scaleType="center"
       app:layout_constraintBottom_toBottomOf="parent"
-      app:layout_constraintEnd_toEndOf="@+id/guide_end"
+      app:layout_constraintEnd_toStartOf="@+id/image_view_dotdotdot"
       app:layout_constraintTop_toTopOf="parent"
       app:srcCompat="@drawable/icon_bucket_delete"
       />
 
+
+    <ImageView
+      android:id="@+id/image_view_dotdotdot"
+      android:layout_width="29dp"
+      android:layout_height="36dp"
+      android:paddingStart="2dp"
+      android:paddingEnd="9dp"
+      android:paddingTop="9dp"
+      android:paddingBottom="9dp"
+      android:scaleType="center"
+      app:layout_constraintBottom_toBottomOf="parent"
+      app:layout_constraintEnd_toEndOf="@+id/guide_end"
+      app:layout_constraintTop_toTopOf="parent"
+      app:srcCompat="@drawable/icon_header_series_wh"
+      />
+
     <android.support.constraint.Guideline
       android:id="@+id/guide_end"
       android:layout_width="wrap_content"