这个问题与这个问题有关:android.R.simple_spinner_item
由于我的声望不高,无法发表评论,我有一个额外的问题:
如果我复制并粘贴android.R.simple_spinner_item布局,则会在某些情况下出现错误。
如果我复制并粘贴android.R.simple_spinner_item布局,则会在某些情况下出现错误。
android:layout_height="?android:attr/dropdownListPreferredItemHeight"
报错信息为"error: Error: Attribute is not public. (at 'layout_height' with value '?android:attr/dropdownListPreferredItemHeight')。"
我刚刚添加了android:gravity="right"
以将下拉菜单项对齐到右侧。
请问如何解决这个错误?
android:layout_height="wrap_content"
。由于dropdownListPreferredItemHeight
不是公共的,因此不能使用它。 - MysticMagicϡ