I'm pretty new with Android development in general. Now we have a UI designer who lets say provided a UI design in photoshop with a template of 720x1280 (xhdpi). So then I take the measurement in pixel and then divide them by 2 to bring it back to mdpi.
When I run the app on phone that doesn't have soft buttons, it matches perfectly with the design provided by the UI designer.
But when the app is ran on phone that have the soft buttons, like the HTC m8, the soft buttons hides the bottom of the app.
Is there a way to fix this issue?
Should the designer make 2 UI design? 1 without soft buttons and 1 without soft buttons? Then in my app I should detect which UI to use? Is there a better solution than this?
Here is an example of my issue :
So the left, is the UI design, the middle is running on phone without soft buttons, and the right is running on the phone with soft buttons.
And here is the xml if you are interested
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<View
android:layout_width="match_parent"
android:layout_height="450dp"
android:background="@android:color/holo_blue_dark">
</View>
<View
android:layout_width="match_parent"
android:layout_height="116dp"
android:padding="10dp"
android:background="@android:color/holo_red_dark">
</View>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@android:color/holo_blue_dark">
</View>
Any help with this is appreciated,