Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
SpecialCyCi committed Feb 6, 2014
1 parent 3a64ca3 commit dd6a52a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ResideMenu/src/com/special/ResideMenu/ResideMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ public void addMenuItem(ResideMenuItem menuItem){
* @param menuItems
*/
public void setMenuItems(List<ResideMenuItem> menuItems){
layout_menu.removeAllViews();
this.menuItems = menuItems;
}

Expand Down Expand Up @@ -214,7 +215,6 @@ private void showOpenMenuRelative(){
@Override
public void onAnimationStart(Animator animation) {
if (isOpened){
layout_menu.removeAllViews();
showMenuDelay();
if (menuListener != null)
menuListener.openMenu();
Expand Down Expand Up @@ -244,7 +244,6 @@ public void onAnimationRepeat(Animator animation) {
};

private void showMenuDelay(){
layout_menu.removeAllViews();
for(int i = 0; i < menuItems.size() ; i ++)
showMenuItem(menuItems.get(i), i);
}
Expand All @@ -257,7 +256,9 @@ private void showMenuDelay(){
*/
private void showMenuItem(ResideMenuItem menuItem,int menu_index){

layout_menu.addView(menuItem);
if(menuItem.getParent() == null)
layout_menu.addView(menuItem);

ViewHelper.setAlpha(menuItem, 0);
AnimatorSet scaleUp = new AnimatorSet();
scaleUp.playTogether(
Expand Down

0 comments on commit dd6a52a

Please sign in to comment.