How to refresh a "Form"

by Giorgio Torres » Sat, 23 Apr 2011 06:32:48 GMT


Sponsored Links
 Hi, i'm new in android development and I've just completed the tutorial at
developer.android.com.
I'm a J2ME programmer, and I think i have some habits from it.
First of all, it was hard to familiarize with android's UI building way, and
i have some vicious inherited from J2ME's programming way.

I'm trying to build an app which one of the views are refreshed at runtime.
I've created a class "MyForm" that inherits View, and at onCreate method I
setContentView(MyForm). And i'm doing
this with all of my app's "form".

I would like to know android's best way to do what i'm trying.

-- 
Giorgio Prmola F. G. Torres
Graduando em Cincia da Computao
Universidade Federal de Viosa

< http://www.facebook.com/giorgio.torres> ;
< http://br.linkedin.com/in/giorgiotorres> ;
  < http://www.twitter.com/gprimola> ;
< http://www.flickr.com/photos/bygior> ;
< http://www.orkut.com.br/Main #Profile?uid=5773068796254932973>

-- 



Re: How to refresh a "Form"

by TreKing » Tue, 26 Apr 2011 05:12:10 GMT


 




I don't think your question is very clear. However, off the bat I would say
you do not need a "MyForm" class that extends View. You just need a layout
defined in XML that lays out your form and you can set that as the content
for your view. As for "refreshing", most things are automatic (like setting
the text on a TextView) but if you need to force refresh you can look at
invalidate().

-------------------------------------------------------------------------------------------------
TreKing < http://sites.google.com/site/rezmobileapps/treking> ; - Chicago
transit tracking app for Android-powered devices

-- 


Sponsored Links


Other Threads

1. Looking for a KML parser ...

Hi,

 

I am looking for a KML parser or a way to use the KML file directly to display 
the location on the map. Any suggestions ? 

 

Cheers,

 

Emre


_________________________________________________________________
New: Messenger sign-in on the MSN homepage
http://go.microsoft.com/?linkid=9677403
--~--~---------~--~----~------------~-------~--~----~

2. reading hardware play/pause (start/end) button

I have an idea for an app that triggers an action based on the button
press on the headphone adapter dongle that comes with the mytouch/g1.
I'd like to hack the hardware so that some external equipment can
close the switch/create the button press.
My question is: does anyone know what the minimum time the switch has
to be closed in order for the hardware/OS to recognize a button press?
I believe the hardware in question will close its contacts for only  a
few milliseconds, so if the phone can't read a press/closure that
short, I'll have to add some hardware (which I'd like to avoid if
possible).

Thanks,

Paul Archer

--~--~---------~--~----~------------~-------~--~----~

3. screen orientation not honoured when called from "share" ?

4. Portuguese locale on SDK 1.5 r3 emulator

5. Replacing System Libraries.

6. Can you sell country-specific apps independently

7. problems getting started