wrap around with textview in a tablelayout broken

by Fabian Sturm » Tue, 22 Sep 2009 04:21:03 GMT

Sponsored Links

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:text="Ein ganz langer Text der umgebrochen
werden muss, der so lange ist, dass er auf mindestens 3 zeilen verteilt
werden muss"


Other Threads

1. Geocoding


I have two points defined by their coordinates. I'm trying to get the
distance between this points taking in consideration the route (streets).

I did this (Java, it's not javascript) by using webview just like this:

It worked and I got the duration. The problem is: I need to use the returned
value , i.e. directions.getDuration().html, for my Java code.

Have you guys ever had this problem? Is there a way to do this just using
Java code (without webview, I mean).?

Victor Pantoja


2. Avoid restarting background threads on orientation change

I start a number of background threads in my Activity onCreate that do
work to keep the UI free. I was originally destroying these threads in
onDestroy. However, the idea of shutting down and restarting these
background threads every time there is an orientation change seems
like a waste of time to me.

What is the preferred way of avoiding the shutdown of my background
threads on an orientation change? I supposed I could set a flag in
onSaveInstanceState and then not destroy my threads if this flag is
set. Is this a valid approach or is there a more standard framework
approach that I am overlooking?



3. javascript on android

4. Android Market Developer Console Bugs feature

5. live blogging froy

6. OOT : Mimpi di siang hari

7. Where can I find the "Android Cloud to Device Messaging" API?