Im developing an app and have situation like this:

I have 2 buttons from images and they have to fit whole screen. So ive used linear layout and gave layout_weight to 1 to both. However as u can see from my sketch theyre not rectngular so the one on right has to have negative left margin to look like on sketch. But images are dynamically scaled so margin amount depends in screen size. I tried to create multiplied dimen files for ldpi, mdpi, hdpi etc but only looking in preview 2 hdpi screens it doesnt look the same. Knowing orginal size margin is there any way to scale it properly on all screens?
Regards
Edit: Ofc I'm using dp units. But like I said it's not the same for all screens with the same dpi. For example:
values-xhdpi/dimens.xml:
<resources>
<dimen name="button_margin">-23dp</dimen>
</resources>
Nexus 10 2560x1600 xhdpi:

Galaxy Nexus 720x1280 xhdpi:

And my layout:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/riderstabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<ImageView
android:id="@+id/btn1"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:checked="true"
android:layout_weight="1"
android:scaleType="fitXY"
android:adjustViewBounds="true"
android:src="@drawable/btn1" />
<ImageView
android:id="@+id/btn2"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:layout_weight="1"
android:layout_marginLeft="@dimen/button_margin"
android:scaleType="fitXY"
android:adjustViewBounds="true"
android:src="@drawable/btn2" />
</LinearLayout>
<android.support.v4.view.ViewPager
android:id="@+id/list"
android:background="@android:color/transparent"
android:layout_weight="7"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</android.support.v4.view.ViewPager>
</LinearLayout>
Edit:
I've discovered that there's another category of screen sizes.
As documenatation says: sizes: small, normal, large, and xlarge densities: ldpi (low), mdpi (medium), hdpi (high), and xhdpi (extra high) [i think there's xxhdpi, xxxhdpi and tvhdpi too].
So I have 2 buttons: 262x46 first and 404x46 second. -26 pixels is the orginal margin for the second button to perfect match. (so sum is 404+262-26=640).
I've found some factors for densities: ldpi - 0.75 mdpi - 1.0 hdpi - 1.5 xhdpi - 2.0 xxhdpi - 3.0 xxxhdpi - 4.0
But when I for example guessed right margin for mdpi and multiplied it by 1.5 for hdpi it's not scaled properly (as for looking in preview in eclipse). And there comes screen sizes so it's even more complicated.
dpfor the margin, you could easily achieve what you're describing - SDJMcHattie