Saturday, October 30, 2010

[android-developers] Re: multiple text view

here is the case
i create a button to launch the application
n then it will return the result

i tried to use the xml to view all the data
but the button appear...
how do i disable the button when i want to display the text view?

On Oct 28, 6:35 pm, Kostya Vasilyev <kmans...@gmail.com> wrote:
> There is only one contentview, but it can contain many other views.
>
> Your setContentView should use a layout, defined in xml.
>
> Modify the layout generated by Android tools when you were creating your
> project - main.xml - and addtextviews there.
>
> -- Kostya
>
> 28.10.2010 13:46, zenous пишет:
>
>
>
> > im doing android programming
> > but im not so pro in java
> > im still in learning process on java
>
> > here is my code
>
> > TextView tv = new TextView(this);
> > tv.setText("line1");
> > setContentView(tv);
>
> > TextView tv2 = new TextView(this);
> > tv3.setText("line2");
> > setContentView(tv2);
>
> > TextView tv3 = new TextView(this);
> > tv3.setText("line3");
> > setContentView(tv3);
>
> > instead of getting
>
> > line1
> > line2
> > line3
>
> > i get line3 only
>
> > line3
>
> > any idea?
>
> --
> Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate