可以定制Android弹出菜单吗?

可以定制Android弹出菜单吗?,android,android-layout,android-view,android-menu,Android,Android Layout,Android View,Android Menu,是否可以自定义弹出菜单布局?我只需要圆角,是否可以定制库存布局?对于自定义布局,不要使用弹出菜单,可选选项是 并在res/layout文件夹中创建此my\u popupwindow\u layout.xml文件,用于为popupwindow充气自定义布局 <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation

是否可以自定义弹出菜单布局?我只需要圆角,是否可以定制库存布局?

对于自定义布局,不要使用弹出菜单,可选选项是

并在
res/layout
文件夹中创建此
my\u popupwindow\u layout.xml
文件,用于为popupwindow充气自定义布局

  <LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal" >

    <Button
        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Window test" />
</LinearLayout>

更好地使用popupwindow简易解决方案:
  <LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal" >

    <Button
        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Window test" />
</LinearLayout>