How can i place a button on the edge of a layout. Half button should be on different layout and half on different.
One solution is to give negative margin but this solution is not working with my layout.
Below is the image, look at the navigation button i want exactly the same position for my button. and

You can do that with the app:layout_anchor and app:layout_anchorGravity attributes:
For example with this code,
<ImageButton
android:id="@+id/myImageButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/fab_margin"
android:src="@android:drawable/ic_dialog_email"
app:layout_anchor="@id/toolbar_layout"
app:layout_anchorGravity="bottom|left|end"
/>
you anchor myImageButton at the bottom left of toolbar_layout.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With