Reputation: 3732
I'm alpha testing an app and so for the first time people are looking at it on multiple devices. One person told me that buttons on his screen were getting cut off.
The weird thing is - we're using the same device. We're both using a Samsung Galaxy S3, so our screen resolutions should be the same.
Screenshots and XML included below. Differences on Right: text is bigger, homemade ellipses is missing, Settings button is cut off
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.farmsoft.lunchguru.app.Pick_Restaurant"
android:layout_height="match_parent"
android:layout_width="match_parent">
<LinearLayout
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"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/PickRest_Header"
android:textStyle="bold"
android:textSize="20sp"
android:gravity="center_horizontal"
android:id="@+id/Lbl_Title"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/PickRest_CompanionHdr"/>
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/Companion_Box">
</TableLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="right"
android:orientation="horizontal">
<Button
android:layout_width="45dp"
android:layout_height="30dp"
android:text="•••"
android:gravity="top"
android:id="@+id/More_Companions"
android:onClick="onClick_More_Companions"/>
</LinearLayout>
<Space
android:layout_width="0dip"
android:layout_height="35dp" />
<com.farmsoft.lunchguru.utils.ListButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/PickRest_Recommend_Button"
android:id="@+id/Recommend_Button"
android:onClick="onClick_Recommend"
android:enabled="false"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/OR"
android:gravity="center_horizontal"
android:textSize="10pt"
android:textStyle="bold"/>
<com.farmsoft.lunchguru.utils.ListButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/PickRest_Nearby_Button"
android:id="@+id/Nearby_Button"
android:onClick="onClick_Nearby"
android:enabled="false"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/OR"
android:gravity="center_horizontal"
android:textSize="10pt"
android:textStyle="bold"/>
<com.farmsoft.lunchguru.utils.ListButton
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/PickRest_Search_Button"
android:id="@+id/Search_Button"
android:onClick="onClick_Search"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/Lbl_Version"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/Lbl_Coordinates"
android:text="@string/PickRest_Coordinates_Load"/>
<Space
android:layout_width="0dip"
android:layout_height="35dp" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/PickRest_IAteThere_Button"
android:id="@+id/Attend_Button"
android:onClick="onClick_Attend"
android:visibility="gone"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/Ratings_Button"
android:text="@string/PickRest_Rating_Button"
android:onClick="onClick_Ratings"
android:enabled="false"/>
<Space
android:layout_width="0dp"
android:layout_height="0dip"
android:layout_weight="1" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/Settings_Button"
android:text="@string/PickRest_Settings_Button"
android:onClick="onClick_Settings"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/Connections_Button"
android:text="@string/PickRest_Connections_Button"
android:onClick="onClick_Connections"/>
<Space
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
</LinearLayout>
</LinearLayout>
</ScrollView>
Upvotes: 2
Views: 1314
Reputation: 14274
You're doing everything correctly, by using sp
to specify font size. This will scale the fonts you've chosen based on the system-wide font-scale. One of the users has increased the system-wide font-size. On AOSP phones, this is in Settings/Display/Font Size. Should be in a similar spot for Samsung devices.
Upvotes: 1