xml - Android - Text wraps in designer and emulator but not on device -
beginner android developer. i'm using eclipse write , design app.
suddenly, textviews have stopped wrapping text on physical android device. alert dialogs no longer wrap well. wrapping works correctly in designer , in emulator.
they wrapped correctly on device last time tested it. since doing so, i've added new activity few buttons on it. don't believe changed on main menu activity, below:
<scrollview 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"> <relativelayout android:id="@+id/textviewredeem" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingbottom="@dimen/activity_vertical_margin" android:paddingleft="@dimen/activity_horizontal_margin" android:paddingright="@dimen/activity_horizontal_margin" android:paddingtop="@dimen/activity_vertical_margin" tools:context=".activitymainmenu" > <button android:id="@+id/buttonquickstart" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignparentleft="true" android:layout_alignparenttop="true" android:onclick="handlequickstart" android:text="@string/buttonquickstart" /> <button android:id="@+id/buttonload" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignleft="@+id/textviewload" android:layout_alignright="@+id/buttonquickstart" android:layout_below="@+id/textviewnew" android:layout_margintop="18dp" android:onclick="handleload" android:text="@string/buttonload" /> <button android:id="@+id/buttonredeemcode" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignleft="@+id/textviewload" android:layout_below="@+id/textviewload" android:layout_margintop="14dp" android:onclick="handleredeem" android:text="@string/buttonredeemcode" /> <button android:id="@+id/buttonnew" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignleft="@+id/textviewquickstart" android:layout_alignright="@+id/buttonquickstart" android:layout_below="@+id/textviewquickstart" android:layout_margintop="18dp" android:onclick="handlenew" android:text="@string/buttonnew" /> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignleft="@+id/buttonredeemcode" android:layout_below="@+id/buttonredeemcode" android:text="@string/defineredeem" android:textappearance="?android:attr/textappearancemedium" android:singleline="false"/> <textview android:id="@+id/textviewquickstart" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignleft="@+id/buttonquickstart" android:layout_below="@+id/buttonquickstart" android:text="@string/definequickstart" android:textappearance="?android:attr/textappearancemedium" android:singleline="false"/> <textview android:id="@+id/textviewnew" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignleft="@+id/buttonnew" android:layout_below="@+id/buttonnew" android:text="@string/definenew" android:textappearance="?android:attr/textappearancemedium" android:singleline="false"/> <textview android:id="@+id/textviewload" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignleft="@+id/textviewnew" android:layout_below="@+id/buttonload" android:text="@string/defineload" android:textappearance="?android:attr/textappearancemedium" android:singleline="false" />
the avd i'm using 3.2" hvga slider android 4.3. actual device i'm testing app on samsung s7500l android 2.3.6 , 3.65" screen.
// try <?xml version="1.0" encoding="utf-8"?> <scrollview xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingbottom="@dimen/activity_vertical_margin" android:paddingleft="@dimen/activity_horizontal_margin" android:paddingright="@dimen/activity_horizontal_margin" android:paddingtop="@dimen/activity_vertical_margin" tools:context=".activitymainmenu" > <linearlayout android:id="@+id/textviewredeem" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center" android:layout_margintop="5dp" android:orientation="vertical"> <button android:id="@+id/buttonquickstart" android:layout_width="wrap_content" android:layout_height="wrap_content" android:onclick="handlequickstart" android:text="@string/buttonquickstart" /> <textview android:id="@+id/textviewquickstart" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/definequickstart" android:textappearance="?android:attr/textappearancemedium"/> <button android:id="@+id/buttonnew" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margintop="18dp" android:onclick="handlenew" android:text="@string/buttonnew" /> <textview android:id="@+id/textviewnew" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/definenew" android:textappearance="?android:attr/textappearancemedium"/> <button android:id="@+id/buttonload" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margintop="18dp" android:onclick="handleload" android:text="@string/buttonload" /> <textview android:id="@+id/textviewload" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/defineload" android:textappearance="?android:attr/textappearancemedium"/> <button android:id="@+id/buttonredeemcode" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margintop="14dp" android:onclick="handleredeem" android:text="@string/buttonredeemcode" /> <textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/defineredeem" android:textappearance="?android:attr/textappearancemedium"/> </linearlayout> </scrollview>
Comments
Post a Comment