[英]How to place close button of drawer layout such a way that ejecting half portion towards outside as seen in picture
You'll need to use a overlay layout like Relativelayout 您需要使用像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>
Make two different horizontal layout and add the arrow button in first horizontal layout according to the position. 制作两个不同的水平布局,并根据位置在第一个水平布局中添加箭头按钮。 The remaining things add in second horizontal layout. 其余的东西添加第二个水平布局。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.