[英]How to place close button of drawer layout such a way that ejecting half portion towards outside as seen in picture
您需要使用像Relativelayout這樣的疊加布局
<RelativeLayout>
<View
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginTop="48dp"(40 is height of view at top plus 8dp is half height of this own view)
android:marginLeft="8dp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:marginLeft="16dp">
<View
android:layout_width="wrap_content"
android:layout_height="40dp" />
<View
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</RelativeLayout>
制作兩個不同的水平布局,並根據位置在第一個水平布局中添加箭頭按鈕。 其余的東西添加第二個水平布局。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.