So I have an image here and I have created multiple copies of the image by putting them into different drawable folders.
<ImageView
android:id="@+id/Profile_Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
android:contentDescription="@string/profile_button"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/profile_bar"
android:focusable="true" />
Now my problem is the design of my app looks perfect on some screen sizes, but for others, it does not look good.
For example, the design of my app looks perfect on the Nexus 5, but when I change to the Pixel, it messes up even though the screen size is the same. I have learned the dpi is different which is why it's messing up.
So, how do I support the same screen size with different dpi?
Edit: Link to what screen looks like on Nexus 5 and Pixel - https://i.stack.imgur.com/w2okl.jpg
Edit 2: XML code for how I have decided to design my three images. The design is correct now, except for one thing. Instead of appearing at the top of the screen, the three images appear in the center of the screen. If I can move these images to the top, my problem would be fixed.
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<ImageView
android:id="@+id/Profile_Button"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:clickable="true"
android:contentDescription="@string/profile_button"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/profile_bar"
android:focusable="true" />
<ImageView
android:id="@+id/Game_Button"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:clickable="true"
android:contentDescription="@string/game_button"
app:layout_constraintEnd_toStartOf="@+id/Messages_Button"
app:layout_constraintStart_toEndOf="@+id/Profile_Button"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/podium_bar"
android:focusable="true" />
<ImageView
android:id="@+id/Messages_Button"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:clickable="true"
android:contentDescription="@string/messages_button"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/messages_bar"
android:focusable="true" />
</LinearLayout>