|
@@ -416,7 +416,6 @@ public class NavigationBar {
|
|
|
* public
|
|
* public
|
|
|
***********************************/
|
|
***********************************/
|
|
|
/**
|
|
/**
|
|
|
- * show
|
|
|
|
|
*/
|
|
*/
|
|
|
public void show() {
|
|
public void show() {
|
|
|
navigationView.setVisibility(View.VISIBLE);
|
|
navigationView.setVisibility(View.VISIBLE);
|
|
@@ -491,18 +490,31 @@ public class NavigationBar {
|
|
|
public void setLiked(boolean isChecked, boolean isAnim) {
|
|
public void setLiked(boolean isChecked, boolean isAnim) {
|
|
|
BlackWhite blackWhite = getBlackWhite(buttonLike);
|
|
BlackWhite blackWhite = getBlackWhite(buttonLike);
|
|
|
blackWhite.setChecked(isChecked);
|
|
blackWhite.setChecked(isChecked);
|
|
|
|
|
+ LikeAnimation likeAnimation = new LikeAnimation();
|
|
|
|
|
+ int drawableRes;
|
|
|
|
|
+ if (isWhite) {
|
|
|
|
|
+ drawableRes = R.drawable.icon_header_like_wh_off;
|
|
|
|
|
+ }
|
|
|
|
|
+ else {
|
|
|
|
|
+ drawableRes = R.drawable.icon_header_like_bk_off;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if (isChecked) {
|
|
if (isChecked) {
|
|
|
if (isAnim) {
|
|
if (isAnim) {
|
|
|
- LikeAnimation likeAnimation = new LikeAnimation();
|
|
|
|
|
- likeAnimation.show(buttonLike);
|
|
|
|
|
|
|
+ likeAnimation.onAnimationShow(buttonLike);
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
|
buttonLike.setImageResource(R.drawable.icon_header_like_wh_on);
|
|
buttonLike.setImageResource(R.drawable.icon_header_like_wh_on);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
|
- buttonLike.setImageResource(R.drawable.icon_header_like_wh_off);
|
|
|
|
|
- blackWhite.change(isWhite);
|
|
|
|
|
|
|
+ if (isAnim) {
|
|
|
|
|
+ likeAnimation.offAnimationShow(buttonLike, drawableRes);
|
|
|
|
|
+ }
|
|
|
|
|
+ else {
|
|
|
|
|
+ buttonLike.setImageResource(R.drawable.icon_header_like_wh_off);
|
|
|
|
|
+ blackWhite.change(isWhite);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -518,18 +530,32 @@ public class NavigationBar {
|
|
|
public void setBookmarked(boolean isChecked, boolean isAnim) {
|
|
public void setBookmarked(boolean isChecked, boolean isAnim) {
|
|
|
BlackWhite blackWhite = getBlackWhite(buttonBookmark);
|
|
BlackWhite blackWhite = getBlackWhite(buttonBookmark);
|
|
|
blackWhite.setChecked(isChecked);
|
|
blackWhite.setChecked(isChecked);
|
|
|
|
|
+ BookmarkAnimation bookmarkAnimation = new BookmarkAnimation();
|
|
|
|
|
+ int drawableRes;
|
|
|
|
|
+ if (isWhite) {
|
|
|
|
|
+ drawableRes = R.drawable.icon_header_bookmark_wh_off;
|
|
|
|
|
+ }
|
|
|
|
|
+ else {
|
|
|
|
|
+ drawableRes = R.drawable.icon_header_bookmark_bk_off;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if (isChecked) {
|
|
if (isChecked) {
|
|
|
if (isAnim) {
|
|
if (isAnim) {
|
|
|
- BookmarkAnimation bookmarkAnimation = new BookmarkAnimation();
|
|
|
|
|
- bookmarkAnimation.show(buttonBookmark);
|
|
|
|
|
|
|
+ bookmarkAnimation.onAnimationShow(buttonBookmark);
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
|
|
|
+ bookmarkAnimation.offAnimationShow(buttonBookmark, drawableRes);
|
|
|
buttonBookmark.setImageResource(R.drawable.icon_header_bookmark_wh_on);
|
|
buttonBookmark.setImageResource(R.drawable.icon_header_bookmark_wh_on);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
|
- buttonBookmark.setImageResource(R.drawable.icon_header_bookmark_wh_off);
|
|
|
|
|
- blackWhite.change(isWhite);
|
|
|
|
|
|
|
+ if (isAnim) {
|
|
|
|
|
+ bookmarkAnimation.offAnimationShow(buttonBookmark, drawableRes);
|
|
|
|
|
+ }
|
|
|
|
|
+ else {
|
|
|
|
|
+ buttonBookmark.setImageResource(R.drawable.icon_header_bookmark_wh_off);
|
|
|
|
|
+ blackWhite.change(isWhite);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|