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?
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.
pager_item.xml:`
<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" >
<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" />
<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" />
</LinearLayout>`
In ICS
_____________
| |
| |
| "This is |
| my cool |
| text" |
| |
|___________|
In gingerbread and below
_____________
| |
| |
| "This is my cool text"
| |
| |
| |
|___________|
Sorry im new i cant post pictures. Thanks in advance, hope you guys get it.
///////UPDATE///////////////
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.
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, however the system holo theme seems doing this aswell
AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ursus.absolution.startme"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE" />
<application
android:icon="@drawable/iconn"
android:label="@string/app_name"
android:theme="@style/Theme.myStyle" >
<activity
android:name=".MainActivity"
android:label="@string/title_activity_main" >
</activity>
<activity
android:name=".SplashScreenActivity"
android:label="@string/title_activity_main"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
styles.xml
<resources>
<style name="Theme.myStyle" parent="@android:style/Theme.Holo">
<item name="android:actionBarStyle">@style/mycoolstyle_transparent_ActionBar</item>
</style>
<style name="mycoolstyle_transparent_ActionBar" parent="@android:style/Widget.Holo.ActionBar">
<item name="android:background">@drawable/transparent_actionbar</item>
</style>
...so when I add android:theme="@style/Theme.myStyle" in the manifest the textviews misbehave however when i add android:theme="@android:style/Theme.Holo" instead, as i normally would to force holo theme, it missbehave aswell
weird.