Java 如何查看Android任何控件的**实际**支持的样式属性的完整列表?

Java 如何查看Android任何控件的**实际**支持的样式属性的完整列表?,java,android,xml,android-studio,documentation,Java,Android,Xml,Android Studio,Documentation,如何才能查看Android任何控件的实际支持的样式属性的完整列表 例如,我试图查看可以在ActionMenuViewcontrol的样式中设置哪些属性: 对于重力,你不能。因为重力不是视图的一个属性,它是如何适应父视图的一个属性。因此,这实际上取决于父视图是否支持它。布局重量、布局宽度、布局高度和边距等也一样。ActionMenuView只是扩展了LinearLayoutCompat,并且没有任何特殊属性。您可以在下面看到原始来源 /** * ActionMenuView is a prese

如何才能查看Android任何控件的实际支持的样式属性的完整列表

例如,我试图查看可以在
ActionMenuView
control的样式中设置哪些属性:


对于重力,你不能。因为重力不是视图的一个属性,它是如何适应父视图的一个属性。因此,这实际上取决于父视图是否支持它。布局重量、布局宽度、布局高度和边距等也一样。

ActionMenuView
只是扩展了
LinearLayoutCompat
,并且没有任何特殊属性。您可以在下面看到原始来源

/**
 * ActionMenuView is a presentation of a series of menu options as a View. It provides
 * several top level options as action buttons while spilling remaining options over as
 * items in an overflow menu. This allows applications to present packs of actions inline with
 * specific or repeating content.
 */
public class ActionMenuView extends LinearLayoutCompat implements MenuBuilder.ItemInvoker,
        MenuView {

    private static final String TAG = "ActionMenuView";

    static final int MIN_CELL_SIZE = 56; // dips
    static final int GENERATED_ITEM_PADDING = 4; // dips

    private MenuBuilder mMenu;

    /** Context against which to inflate popup menus. */
    private Context mPopupContext;

    /** Theme resource against which to inflate popup menus. */
    private int mPopupTheme;

    private boolean mReserveOverflow;
    private ActionMenuPresenter mPresenter;
    private MenuPresenter.Callback mActionMenuPresenterCallback;
    MenuBuilder.Callback mMenuBuilderCallback;
    private boolean mFormatItems;
    private int mFormatItemsWidth;
    private int mMinCellSize;
    private int mGeneratedItemPadding;

    OnMenuItemClickListener mOnMenuItemClickListener;

    public ActionMenuView(Context context) {
        this(context, null);
    }

    public ActionMenuView(Context context, AttributeSet attrs) {
        super(context, attrs);
        setBaselineAligned(false);
        final float density = context.getResources().getDisplayMetrics().density;
        mMinCellSize = (int) (MIN_CELL_SIZE * density);
        mGeneratedItemPadding = (int) (GENERATED_ITEM_PADDING * density);
        mPopupContext = context;
        mPopupTheme = 0;
    }

类的非支持版本在文档中有更多信息,包括支持的XML属性。例如:


但是,对于相应类的支持版本,属性似乎无法工作。

谢谢,但我的问题是关于支持属性的列表-不仅仅是关于示例…答案是查看android文档-但它不包括家长查看的任何内容,因此它总是不完整的。这样看来,对这个网站来说也是离题的——请求外部资源是离题的。但是我在Android文档中找不到支持的属性列表。它只显示受支持的方法、常量和字段:然后一个不存在。支持库类的文档不太完整。您还可以查看非支持版本的文档:。但是他们没有为支持库添加它。谷歌和混沌一样。
/**
 * ActionMenuView is a presentation of a series of menu options as a View. It provides
 * several top level options as action buttons while spilling remaining options over as
 * items in an overflow menu. This allows applications to present packs of actions inline with
 * specific or repeating content.
 */
public class ActionMenuView extends LinearLayoutCompat implements MenuBuilder.ItemInvoker,
        MenuView {

    private static final String TAG = "ActionMenuView";

    static final int MIN_CELL_SIZE = 56; // dips
    static final int GENERATED_ITEM_PADDING = 4; // dips

    private MenuBuilder mMenu;

    /** Context against which to inflate popup menus. */
    private Context mPopupContext;

    /** Theme resource against which to inflate popup menus. */
    private int mPopupTheme;

    private boolean mReserveOverflow;
    private ActionMenuPresenter mPresenter;
    private MenuPresenter.Callback mActionMenuPresenterCallback;
    MenuBuilder.Callback mMenuBuilderCallback;
    private boolean mFormatItems;
    private int mFormatItemsWidth;
    private int mMinCellSize;
    private int mGeneratedItemPadding;

    OnMenuItemClickListener mOnMenuItemClickListener;

    public ActionMenuView(Context context) {
        this(context, null);
    }

    public ActionMenuView(Context context, AttributeSet attrs) {
        super(context, attrs);
        setBaselineAligned(false);
        final float density = context.getResources().getDisplayMetrics().density;
        mMinCellSize = (int) (MIN_CELL_SIZE * density);
        mGeneratedItemPadding = (int) (GENERATED_ITEM_PADDING * density);
        mPopupContext = context;
        mPopupTheme = 0;
    }