0
當我創建了一個自定義標題爲我使用的RelativeLayout創建一個動態可擴展的佈局和擴展
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/header"
android:layout_width="match_parent"
android:layout_height="60dp"
android:background="@drawable/header_bg">
<RelativeLayout
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginEnd="25dp">
<ImageButton
android:id="@+id/header_overflow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/header_overflow" />
</RelativeLayout>
</RelativeLayout>
Android應用我想有它擴大,併成爲填充按鈕上時,擴展部分添加按鈕上面的ImageButton被按下。正是這樣:示
:單擊按鈕之前和之後(在原來的程序,我試圖複製)。忽略塗鴉,因爲它不是我的屏幕截圖
這是可能的Android?如果是這樣,我該怎麼做呢?
謝謝!我甚至搜索了「Android展開式佈局」,但沒有發現任何東西 – TheDiamondYT
如果您覺得這有幫助,請隨時投票並將其選爲正確答案 –