Browse Source

[공통][New] 액션 바 - 스크롤 -> 비스크롤 설정 하면 투명 액션 바가 보여지지 않던 버그 수정

hyodong.min 7 years ago
parent
commit
c1a6ab3ed4

+ 5 - 3
app/src/main/java/kr/co/zumo/app/lifeplus/helper/ActionBarHelper.java

@@ -168,6 +168,8 @@ public class ActionBarHelper extends Helper {
         containerLayoutParams.setBehavior(null);
       }
       else {
+        params.setScrollFlags(0);
+        appBarLayoutParams.setBehavior(null);
         containerLayoutParams.setBehavior(null);
       }
     }
@@ -285,9 +287,9 @@ public class ActionBarHelper extends Helper {
 
     // Custom Actionbar 를 사용하기 위해 CustomEnabled 을 true 시키고 필요 없는 것은 false 시킨다
     actionBar.setDisplayShowCustomEnabled(true);
-    actionBar.setDisplayHomeAsUpEnabled(false);      //액션바 아이콘을 업 네비게이션 형태로 표시합니다.
-    actionBar.setDisplayShowTitleEnabled(false);    //액션바에 표시되는 제목의 표시유무를 설정합니다.
-    actionBar.setDisplayShowHomeEnabled(false);      //홈 아이콘을 숨김처리합니다.
+//    actionBar.setDisplayHomeAsUpEnabled(false);      //액션바 아이콘을 업 네비게이션 형태로 표시합니다.
+//    actionBar.setDisplayShowTitleEnabled(false);    //액션바에 표시되는 제목의 표시유무를 설정합니다.
+//    actionBar.setDisplayShowHomeEnabled(false);      //홈 아이콘을 숨김처리합니다.
     actionBar.setCustomView(view);
 
     actionBar.setDisplayOptions(android.app.ActionBar.DISPLAY_SHOW_CUSTOM);

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

@@ -27,7 +27,7 @@ import kr.co.zumo.app.lifeplus.util.ResourceUtil;
  * @since 2018. 10. 24.
  */
 public class NavigationBar {
-  private View view;
+  private View navigationView;
 
   private TextView actionBarTitle;
   private ImageView imageBi;
@@ -56,7 +56,7 @@ public class NavigationBar {
   private NavigationBar(Context context) {
 
     LayoutInflater inflater = LayoutInflater.from(context);
-    this.view = inflater.inflate(R.layout.action_bar, null);
+    this.navigationView = inflater.inflate(R.layout.action_bar, null);
 
     init();
   }
@@ -65,25 +65,25 @@ public class NavigationBar {
   private void init() {
     clickListenerMap = new HashMap<>();
 
-    imageBi = view.findViewById(R.id.image_bi);
-    viewUnderline = view.findViewById(R.id.view_underline);
-
-    actionBarTitle = view.findViewById(R.id.action_bar_title);
-    buttonArrow = view.findViewById(R.id.image_view_open_arrow);
-    buttonSearch = view.findViewById(R.id.image_view_search);
-    buttonMenu = view.findViewById(R.id.image_view_menu);
-    buttonBack = view.findViewById(R.id.image_view_back);
-    buttonHome = view.findViewById(R.id.image_view_home);
-    buttonNotification = view.findViewById(R.id.image_view_notification);
-    buttonSetting = view.findViewById(R.id.image_view_setting);
-    buttonClose = view.findViewById(R.id.image_view_close);
-    textButton = view.findViewById(R.id.text_sub);
-    buttonTrash = view.findViewById(R.id.image_view_trash);
-    buttonConfirm = view.findViewById(R.id.image_view_confirm);
-    buttonShare = view.findViewById(R.id.image_view_share);
-    buttonLike = view.findViewById(R.id.image_view_like);
-    buttonBookmark = view.findViewById(R.id.image_view_bookmark);
-    viewBackground = view.findViewById(R.id.layout_background);
+    imageBi = navigationView.findViewById(R.id.image_bi);
+    viewUnderline = navigationView.findViewById(R.id.view_underline);
+
+    actionBarTitle = navigationView.findViewById(R.id.action_bar_title);
+    buttonArrow = navigationView.findViewById(R.id.image_view_open_arrow);
+    buttonSearch = navigationView.findViewById(R.id.image_view_search);
+    buttonMenu = navigationView.findViewById(R.id.image_view_menu);
+    buttonBack = navigationView.findViewById(R.id.image_view_back);
+    buttonHome = navigationView.findViewById(R.id.image_view_home);
+    buttonNotification = navigationView.findViewById(R.id.image_view_notification);
+    buttonSetting = navigationView.findViewById(R.id.image_view_setting);
+    buttonClose = navigationView.findViewById(R.id.image_view_close);
+    textButton = navigationView.findViewById(R.id.text_sub);
+    buttonTrash = navigationView.findViewById(R.id.image_view_trash);
+    buttonConfirm = navigationView.findViewById(R.id.image_view_confirm);
+    buttonShare = navigationView.findViewById(R.id.image_view_share);
+    buttonLike = navigationView.findViewById(R.id.image_view_like);
+    buttonBookmark = navigationView.findViewById(R.id.image_view_bookmark);
+    viewBackground = navigationView.findViewById(R.id.layout_background);
 
     setClickListener(buttonBack);
     setClickListener(buttonSearch);
@@ -349,23 +349,23 @@ public class NavigationBar {
    * show
    */
   public void show() {
-    setViewVisible(view, true, View.GONE);
+    setViewVisible(navigationView, true, View.GONE);
   }
 
   /**
    * hide
    */
   public void hide() {
-    setViewVisible(view, false, View.GONE);
+    setViewVisible(navigationView, false, View.GONE);
   }
 
   /**
-   * view 반환
+   * navigationView 반환
    *
    * @return
    */
   public View getView() {
-    return view;
+    return navigationView;
   }
 
   /**