Hi Fabian,
Actually, your TextView is just fine; all the text "exists" and is wrapping
properly, it has just been rendered off the edge of the screen. It is the
TableLayout that is doing something odd.

(In fact, I found that if I put items following the TableLayout, but still
within the vertical LinearLayout, they don't show, presumably pushed
offscreen right....)

If you leave out the TableLayout, you will find that the TextView is
functioning properly. Perhaps you can use something other than TableLayout
for your app. Here is a working example:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android";
   android:orientation="horizontal"
   android:layout_width="fill_parent"
   android:layout_height="fill_parent"
   >
   <TextView
   android:layout_width="wrap_content"
   android:layout_height="wrap_content"
       android:text="Title:"
   />
   <TextView
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       android:text="Ein ganz langer Text der umgebrochen werden muss, der
so lange ist, dass er auf mindestens 3 zeilen verteilt werden muss"
  />
</LinearLayout>



And here is a puzzling non-working example where the textViews were
duplicated just after the TableLayout....

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android";
   android:orientation="vertical"
   android:layout_width="fill_parent"
   android:layout_height="fill_parent"
   >
   <TableLayout
       android:layout_width="fill_parent"
       android:layout_height="fill_parent"
   >
       <TableRow>
           <TextView
               android:text="Title:"
           />
           <TextView
               android:layout_width="wrap_content"
               android:layout_height="wrap_content"
               android:text="Ein ganz langer Text der umgebrochen werden
muss, der so lange ist, dass er auf mindestens 3 zeilen verteilt werden
muss"
          />
       </TableRow>
   </TableLayout>

   <TextView
   android:layout_width="wrap_content"
   android:layout_height="wrap_content"
       android:text="Title:"
   />
   <TextView
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       android:text="Ein ganz langer Text der umgebrochen werden muss, der
so lange ist, dass er auf mindestens 3 zeilen verteilt werden muss"
  />

</LinearLayout>





On Tue, Sep 22, 2009 at 6:18 AM, Fabian Sturm <f...@rtfs.org> wrote:

>
> Hi!
>
> I have a very simple layout, a table with a single row containing two
> textviews. The first textview has a short text and the second a long
> text which needs to be wrapped around.
>
> Unfortunately the wrap around does not work. In the first line of the
> wrapped text the last word is missing a letter and in the second line
> another letter is missing and even the word "3" is missing.
> So I get the text:
>
> "Ein ganz langer Text der umgebrochen werde
>  muss, der so lange ist, dass er auf mindesten
>  zeilen verteilt werden muss"
>
> instead of this text:
>
> "Ein ganz langer Text der umgebrochen
>  werden muss, der so lange ist, dass
>  er auf mindestens 3 zeilen verteilt
>  werden muss"
>
> Any ideas what I need to activate for the correct wrap around?
> I tried many layout parameters but none helped.
>
> I know I could get the same layout easier, but this is just a broken
> down example. I want to use a table with maybe 5 rows and 2 columns
> later on.
>
> Thanks a lot, Fabian
>
>
> <?xml version="1.0" encoding="utf-8"?>
> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android";
>    android:orientation="vertical"
>    android:layout_width="fill_parent"
>    android:layout_height="fill_parent"
>    >
>    <TableLayout
>        android:layout_width="fill_parent"
>        android:layout_height="fill_parent"
>    >
>        <TableRow>
>            <TextView
>                android:text="Title:"
>            />
>            <TextView
>                android:layout_width="wrap_content"
>                android:layout_height="wrap_content"
>                android:text="Ein ganz langer Text der umgebrochen
> werden muss, der so lange ist, dass er auf mindestens 3 zeilen verteilt
> werden muss"
>           />
>        </TableRow>
>    </TableLayout>
> </LinearLayout>
>
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to