I have the following layouts in my android project. Because I want to support the view for different devices and tabs for Android.
layout-large layout-normal layout-small layout-xlarge
In the Gradle app, it has been installed since min. 9-22.
When I test on 5-inch phones, 7-inch tablets, and phones smaller than 5 inches, I see a 5-inch phone and a 7-inch tablet, it always uses a βbig layoutβ, so there are 2 buttons located in the center of the screen horizontally does not give the correct distance in the tablet; it shows at the correct interval in the 5-inch phone, as expected. Could you advise me how to take care of the layout of the buttons in order to support a 5-inch phone and a 7-inch layout with a single layout. Looking back, there are so many suggestions and a lot to get confused ... When I looked at the link to the android, the link of the Android developer could not understand much.
layout large.xml
<RelativeLayout 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:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MyActivity" android:background="@drawable/bg"> <Button android:layout_width="70px" android:layout_height="70px" android:id="@+id/PlayPauseButton" android:onClick="doClick" android:layout_marginLeft="81dp" android:layout_marginStart="81dp" android:layout_marginBottom="169dp" android:layout_alignParentBottom="true" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" /> <Button android:layout_width="70px" android:layout_height="70px" android:id="@+id/StopButton" android:onClick="stopAudio" android:layout_alignTop="@+id/PlayPauseButton" android:layout_alignParentRight="true" android:layout_alignParentEnd="true" android:layout_marginRight="102dp" android:layout_marginEnd="102dp" /> </RelativeLayout>
UPDATED:
I ask my question even more simple. I have a 3.2-inch phone, 4.2-inch phone, 4.3-inch phone, 4.5-inch phone, 5-inch phone and one 7-inch tablet / I want to support my application in all these devices . I set min 9 max 22 to gradle. What should I do now to create the "layout" and "drawable" folders? I am embarrassed to see links in android and other forum links. I have a Relative Layout in all layouts and it is set with match_parent width and height. Should I even set the static width and height here? - Stella right now
android
Stella
source share