我想在工廠內部實現類似actionLayout
的東西。我在菜單項中使用了actionLayout
,但它似乎沒有與晶圓廠合作。在工廠內使用actionlaayout在Android中
因此,這裏是我如何使用它裏面的菜單:
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/action"
android:title=""
app:showAsAction="ifRoom"
app:actionLayout="@layout/someLayout"
/>
.....
其中someLayout
只是一個相對佈局。這樣做是爲了晶圓廠不起作用:
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|right"
app:actionLayout="@layout/someLayout"
app:fabSize="normal"/>
我可以使用actionLayout
在工廠還是有它的方法嗎?
我想這樣做的原因是因爲我想使用this Android Library並在Fab中插入按鈕。
應用:actionLayout =「@佈局/ lsomeLayout「.IS佈局名稱corect表示lsomeLayout ?? –
@NarenderReddy抱歉,意外輸入:)已將其刪除 –
FloatingActionButton視圖本身沒有這樣的屬性。 https://developer.android.com/reference/android/support/design/widget/FloatingActionButton.html你想達到什麼目標? FABs應該很簡單,所以我想知道爲什麼你想在其中放置一個RelativeLayout? –