Note that there are some explanatory texts on larger screens.

plurals
  1. POTextView won't break text
    primarykey
    data
    text
    <p>I am having trouble with textView not breaking line before ICS. In ICS (i belive honeycomb works as well but i havent tried it tho) the text inside textView breaks nicely but in gingerbread and below text just keeps going in one line. Any ideas how to fix this?</p> <p>I am using a viewpager and this is the layout for each screen. I am using custom textView just to add custom font, hope thats not the problem.</p> <p>pager_item.xml:`</p> <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" android:orientation="vertical" android:padding="20dp" &gt; &lt;com.ursus.absolution.startme.MyTextView android:id="@+id/message_textview" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/quotes_background" android:gravity="center" android:textColor="#585858" android:textSize="25dp" /&gt; &lt;com.ursus.absolution.startme.MyTextView android:id="@+id/author_textview" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center" android:textColor="#585858" android:textSize="20dp" /&gt; &lt;/LinearLayout&gt;` In ICS _____________ | | | | | "This is | | my cool | | text" | | | |___________| In gingerbread and below _____________ | | | | | "This is my cool text" | | | | | | |___________| </code></pre> <p>Sorry im new i cant post pictures. Thanks in advance, hope you guys get it.</p> <p><em><strong>///////UPDATE///////////////</em></strong></p> <p>Okay guys, this is very interesting.. i tried all your suggestions however neither has worked, so i started a new blank project and just put a textview into layout with really long string and it wrapped just fine.</p> <p>So, i dont know how is this possible, but its the custom theme to style the actionbar doing this, when i comment it out in the manifest it works just fine, <strong>however the system holo theme seems doing this aswell</strong></p> <p>AndroidManifest.xml</p> <pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.ursus.absolution.startme" android:versionCode="1" android:versionName="1.0" &gt; &lt;uses-sdk android:minSdkVersion="8" android:targetSdkVersion="15" /&gt; &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt; &lt;uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE" /&gt; &lt;application android:icon="@drawable/iconn" android:label="@string/app_name" android:theme="@style/Theme.myStyle" &gt; &lt;activity android:name=".MainActivity" android:label="@string/title_activity_main" &gt; &lt;/activity&gt; &lt;activity android:name=".SplashScreenActivity" android:label="@string/title_activity_main" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" &gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.MAIN" /&gt; &lt;category android:name="android.intent.category.LAUNCHER" /&gt; &lt;/intent-filter&gt; &lt;/activity&gt; &lt;/application&gt; </code></pre> <p></p> <p>styles.xml</p> <pre><code>&lt;resources&gt; &lt;style name="Theme.myStyle" parent="@android:style/Theme.Holo"&gt; &lt;item name="android:actionBarStyle"&gt;@style/mycoolstyle_transparent_ActionBar&lt;/item&gt; &lt;/style&gt; &lt;style name="mycoolstyle_transparent_ActionBar" parent="@android:style/Widget.Holo.ActionBar"&gt; &lt;item name="android:background"&gt;@drawable/transparent_actionbar&lt;/item&gt; &lt;/style&gt; </code></pre> <p></p> <p>...so when I add android:theme="@style/Theme.myStyle" in the manifest the textviews misbehave <em>however when i add android:theme="@android:style/Theme.Holo" instead, as i normally would to force holo theme, it missbehave aswell</em></p> <p>weird.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload