views:

49

answers:

4

Hi All,

i need to place two text box in such a way that it sloud look like this..

===================

Username contents contents contents contents
contents contents contents contents contents contents
contents contents contents contents contents contents

====================

Here, the Username is one TextView which is Clickable and "contents" is another TextView.

i had tried with do as above but i couldn't get as desired result..

===================

Username contents contents contents contents
                   contents contents contents contents contents contents
                   contents contents contents contents contents contents

====================

Pls help me out through this...

Thanks.

A: 

[edit] misunderstood the question... I doubt it can be done like you want it to be done. I would suggest to do your username above the content in a single line..

WarrenFaith
A: 

Have you tried a TableLayout?

TomS
A: 

This is kind of a cheap way to do it, but you could palce two text boxes on top of each other and append the contents to have as many spaces as the user name so essentially you would have:

String usrName = "Username";
String contentText = "";
for(int i = 0; int < usrName.length; i++) {
     contentText = contentText  + " ";
}

contentText = contentText + "The content I want";
TV1.setText(usrName);
TYV2.setText(contentText);
CornCat
Thnks man for the solution...It worked. But it takes same spaces for all the username even if one username length is greater.
RATTLESNAKE
+1  A: 

I solved similar Problems by Using: TV1.setText(Html.fromHtml("<b><font color=#ff0000> Username" +"</font></b> content content content content"));

2red13
still not making the "username" clickable but the content not
WarrenFaith