Bug 1140210 - Add class comment to MenuItemSwitcherLayout. r=liuche draft
authorMichael Comella <michael.l.comella@gmail.com>
Thu, 15 Oct 2015 14:48:37 -0700
changeset 301187 565f0bae6073978bd3f11f4c44e9ead95613addb
parent 301186 ba526e7805931ea74c37ef577e22d6e02e28c087
child 301188 a9b003517a26da356e7f134e10c9a4b4c0931691
push id6417
push usermichael.l.comella@gmail.com
push dateThu, 15 Oct 2015 21:58:47 +0000
reviewersliuche
bugs1140210
milestone44.0a1
Bug 1140210 - Add class comment to MenuItemSwitcherLayout. r=liuche
mobile/android/base/menu/MenuItemSwitcherLayout.java
--- a/mobile/android/base/menu/MenuItemSwitcherLayout.java
+++ b/mobile/android/base/menu/MenuItemSwitcherLayout.java
@@ -15,16 +15,23 @@ import android.annotation.TargetApi;
 import android.content.Context;
 import android.graphics.drawable.Drawable;
 import android.util.AttributeSet;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.widget.ImageButton;
 import android.widget.LinearLayout;
 
+/**
+ * This class is a container view for menu items that:
+ *   * Shows text if there is enough space and there are
+ *     no action buttons ({@link #mActionButtons}).
+ *   * Shows an icon if there is not enough space for text,
+ *     or there are action buttons.
+ */
 public class MenuItemSwitcherLayout extends LinearLayout
                                     implements GeckoMenuItem.Layout,
                                                View.OnClickListener {
     private final MenuItemDefault mMenuItem;
     private final MenuItemActionBar mMenuButton;
     private final List<ImageButton> mActionButtons;
     private final List<View.OnClickListener> mActionButtonListeners = new ArrayList<View.OnClickListener>();