Are there any ways to put view slightly outside its parent layout?
You can't put the Green part in Layout X, because it can not be drawn outside its parents.
So, you should implements a RelativeLayout or FrameLayout (root Layout) as the parents of all of these Views.
And Put the Green View as the childView of the root Layout.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout_root"
android:layout_width="fill_parent"
android:layout_height="200dp"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/layout_dark_grey"
android:layout_width="100dp"
android:layout_height="match_parent"
android:orientation="vertical" >
</LinearLayout>
<LinearLayout
android:id="@+id/layout_orange"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_toRightOf="@id/layout_dark_grey"
android:orientation="vertical" >
</LinearLayout>
<RelativeLayout
android:id="@+id/layout_green"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_centerVertical="true"
android:layout_toLeftOf="300dp" >
</RelativeLayout>
</RelativeLayout>
Use -
android:clipChildren="false"
android:clipToPadding="false"
in every parent of your child view, then you put 'left margin' of your view to be negative,which will put your child view outside of parent view and will not even clip the view.