gecko-dev/mobile/android/base/menu/QuickShareBarActionView.java
Michael Comella 6e88edbbc5 Bug 1127445 - Add quick share bar (i.e. third row) to toolbar menu. r=margaret
The bar should not appear when there are no items in the quick share history.

Note: I only somewhat understand some of the code added in GeckoMenu - I
pattern matched mSecondary* onto mQuickShare*.

--HG--
extra : rebase_source : 505feee750c275e11a9b16a18680f6237d35d7ac
2015-03-05 18:59:01 -08:00

37 lines
1.4 KiB
Java

/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.gecko.menu;
import android.annotation.TargetApi;
import android.content.Context;
import android.util.AttributeSet;
import org.mozilla.gecko.R;
/**
* A MenuItemActionView without the default child views.
*
* A better implementation would have the non-child view implementation as the parent of
* MenuItemActionView, but this is simpler and faster to implement for something intended to be
* uplifted, and this implementation will soon be replaced with the old implementation for adding
* the share plane to the menu (see https://bug1122302.bugzilla.mozilla.org/attachment.cgi?id=8572126).
*/
public class QuickShareBarActionView extends MenuItemActionView {
public QuickShareBarActionView(Context context, AttributeSet attrs) {
this(context, attrs, R.attr.menuItemActionViewStyle);
}
@TargetApi(14)
public QuickShareBarActionView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
// We remove the views so they are visible, but note that
// the child still does some computation on them.
removeAllViews();
}
}