IT. Expert System.

Android Reference

ActivityChooserView


android.widget

Class ActivityChooserView

  • All Implemented Interfaces:
    Drawable.Callback, AccessibilityEventSource, KeyEvent.Callback, ViewManager, ViewParent, ActivityChooserModel.ActivityChooserModelClient


    public class ActivityChooserView
    extends ViewGroup
    implements ActivityChooserModel.ActivityChooserModelClient
    This class is a view for choosing an activity for handling a given Intent.

    The view is composed of two adjacent buttons:

    • The left button is an immediate action and allows one click activity choosing. Tapping this button immediately executes the intent without requiring any further user input. Long press on this button shows a popup for changing the default activity.
    • The right button is an overflow action and provides an optimized menu of additional activities. Tapping this button shows a popup anchored to this view, listing the most frequently used activities. This list is initially limited to a small number of items in frequency used order. The last item, "Show all..." serves as an affordance to display all available activities.

    • Constructor Detail

      • ActivityChooserView

        public ActivityChooserView(Context context)
        Create a new instance.
        Parameters:
        context - The application environment.
      • ActivityChooserView

        public ActivityChooserView(Context context,
                           AttributeSet attrs)
        Create a new instance.
        Parameters:
        context - The application environment.
        attrs - A collection of attributes.
      • ActivityChooserView

        public ActivityChooserView(Context context,
                           AttributeSet attrs,
                           int defStyle)
        Create a new instance.
        Parameters:
        context - The application environment.
        attrs - A collection of attributes.
        defStyle - The default style to apply to this view.
    • Method Detail

      • setExpandActivityOverflowButtonDrawable

        public void setExpandActivityOverflowButtonDrawable(Drawable drawable)
        Sets the background for the button that expands the activity overflow list. Note: Clients would like to set this drawable as a clue about the action the chosen activity will perform. For example, if a share activity is to be chosen the drawable should give a clue that sharing is to be performed.
        Parameters:
        drawable - The drawable.
      • setExpandActivityOverflowButtonContentDescription

        public void setExpandActivityOverflowButtonContentDescription(int resourceId)
        Sets the content description for the button that expands the activity overflow list. description as a clue about the action performed by the button. For example, if a share activity is to be chosen the content description should be something like "Share with".
        Parameters:
        resourceId - The content description resource id.
      • setProvider

        public void setProvider(ActionProvider provider)
        Set the provider hosting this view, if applicable.
      • showPopup

        public boolean showPopup()
        Shows the popup window with activities.
        Returns:
        True if the popup was shown, false if already showing.
      • dismissPopup

        public boolean dismissPopup()
        Dismisses the popup window with activities.
        Returns:
        True if dismissed, false if already dismissed.
      • isShowingPopup

        public boolean isShowingPopup()
        Gets whether the popup window with activities is shown.
        Returns:
        True if the popup is shown.
      • onDetachedFromWindow

        protected void onDetachedFromWindow()
        Description copied from class: View
        This is called when the view is detached from a window. At this point it no longer has a surface for drawing.
        Overrides:
        onDetachedFromWindow in class View
        See Also:
        View.onAttachedToWindow()
      • onLayout

        protected void onLayout(boolean changed,
                    int left,
                    int top,
                    int right,
                    int bottom)
        Description copied from class: ViewGroup
        Called from layout when this view should assign a size and position to each of its children. Derived classes with children should override this method and call layout on each of their children.
        Specified by:
        onLayout in class ViewGroup
        Parameters:
        changed - This is a new size or position for this view
        left - Left position, relative to parent
        top - Top position, relative to parent
        right - Right position, relative to parent
        bottom - Bottom position, relative to parent
      • setOnDismissListener

        public void setOnDismissListener(PopupWindow.OnDismissListener listener)
        Sets a listener to receive a callback when the popup is dismissed.
        Parameters:
        listener - The listener to be notified.
      • setInitialActivityCount

        public void setInitialActivityCount(int itemCount)
        Sets the initial count of items shown in the activities popup i.e. the items before the popup is expanded. This is an upper bound since it is not guaranteed that such number of intent handlers exist.
        Parameters:
        itemCount - The initial popup item count.
      • setDefaultActionButtonContentDescription

        public void setDefaultActionButtonContentDescription(int resourceId)
        Sets a content description of the default action button. This resource should be a string taking one formatting argument and will be used for formatting the content description of the button dynamically as the default target changes. For example, a resource pointing to the string "share with %1$s" will result in a content description "share with Bluetooth" for the Bluetooth activity.
        Parameters:
        resourceId - The resource id.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 205 / 159232605. Delta: 0.05584 с