From 58a645b6ed39d11fd8a5bf986a40c8f58c5a67f0 Mon Sep 17 00:00:00 2001 From: Yuriy Kolbasinskiy Date: Thu, 14 Apr 2016 11:56:23 +0700 Subject: [PATCH] Fix clearItemsMethod: now it clears all items --- .../main/java/org/telegram/ui/ActionBar/ActionBarMenu.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/ActionBarMenu.java b/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/ActionBarMenu.java index 374c1ee3a..382d0a1c6 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/ActionBarMenu.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ActionBar/ActionBarMenu.java @@ -112,8 +112,8 @@ public class ActionBarMenu extends LinearLayout { } public void clearItems() { - for (int a = 0; a < getChildCount(); a++) { - View view = getChildAt(a); + while(getChildCount() > 0) { + View view = getChildAt(0); removeView(view); } }