this thing is driving me crazy!!

by Maryam Naveed » Mon, 07 Jul 2008 12:04:28 GMT


Sponsored Links
 hey all!!
i have a little question??
how can integers be displayed on the screen??
do i have to type cast  it??
i have a simple loop for adding an integer and at the end it displays that
value??
but i simply cant do that??
please help meeeeeeeeeeeeeeeeee:D!!
regards
maryam

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



this thing is driving me crazy!!

by Muhammad Farhan Bashir » Tue, 08 Jul 2008 17:19:46 GMT


 Salam,
           I think you have already answered your question.Definitely you
have to type cast the integer to the string if the setText function did not
take values other than string.






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


Sponsored Links


this thing is driving me crazy!!

by Maryam Naveed » Wed, 09 Jul 2008 10:23:58 GMT


 thnx!! alot:D
type casting is teh laimest thing to do:(
but i think no other option then

On Tue, Jul 8, 2008 at 1:36 PM, Muhammad Farhan Bashir <





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



this thing is driving me crazy!!

by Casey Borders » Wed, 09 Jul 2008 14:48:10 GMT


 It's not really a typecast, you have to use the String.valueOf() static
method.  It will take a whole host of types and return their string
equivalent.







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



Other Threads

1. page flipping not supported issue

Hi all,

I am trying to port eclair on beagle board using latest eclair source code.
I have checked out the latest source code and built android root file
system.
I am facing below page flipping problem :

bash-3.2# I/DEBUG   (  829): de{*filter*}d: Jan 13 2010 14:59:23
I/vold    (  828): Android Volume Daemon version 2.0
E/vold    (  828): Unable to chdir to /sys/class/mmc_host/mmc0/slot_name
(Not a directory)
E/vold    (  828): Error bootstrapping card
'/sys/class/mmc_host/mmc0/slot_name' (Not a directory)
I/vold    (  828): New MMC card 'SDM  ' (serial 30109) added @
/devices/platform/mmci-omap-hs.0/mmc_host/mmc0/mmc0:0002
I/vold    (  828): Disk (blkdev 179:0), 3930112 secs (1919 MB) 2 partitions
I/vold    (  828): New blkdev 179.0 on media SDM  , media path
/devices/platform/mmci-omap-hs.0/mmc_host/mmc0/mmc0:0002, Dpp2
I/vold    (  828): Partition (blkdev 179:1), 963837 secs (470 MB) type 0xc
I/vold    (  828): New blkdev 179.1 on media SDM  , media path
/devices/platform/mmci-omap-hs.0/mmc_host/mmc0/mmc0:0002, Dpp1
I/vold    (  828): Partition (blkdev 179:2), 963900 secs (470 MB) type 0x83
I/vold    (  828): New blkdev 179.2 on media SDM  , media path
/devices/platform/mmci-omap-hs.0/mmc_host/mmc0/mmc0:0002, Dpp0
E/vold    (  828): Unable to open '/sys/class/switch' (No such file or
directory)
D/vold    (  828): Bootstrapping complete
D/AndroidRuntime(  831):
D/AndroidRuntime(  831): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime(  831): CheckJNI is ON
D/AndroidRuntime(  831): --- registering native functions ---
I/        (  832): ServiceManager: 0xad08
W/AudioHardwareInterface(  832): Using stubbed audio hardware. No sound will
be produced.
D/AudioHardwareInterface(  832): setMode(NORMAL)
I/CameraService(  832): CameraService started: pid=832
I/AudioFlinger(  832): AudioFlinger's thread 0xb3a0 ready to run
I/SamplingProfilerIntegration(  831): Profiler is disabled.
I/Zygote  (  831): Preloading classes...
D/dalvikvm(  831): GC freed 791 objects / 50440 bytes in 3ms
D/dalvikvm(  831): GC freed 255 objects / 16392 bytes in 3ms
D/dalvikvm(  831): GC freed 302 objects / 19392 bytes in 4ms
D/dalvikvm(  831): GC freed 222 objects / 14224 bytes in 4ms
D/dalvikvm(  831): GC freed 415 objects / 26376 bytes in 5ms
D/skia    (  831): ------ build_power_table 1.4
D/skia    (  831): ------ build_power_table 0.714286
D/dalvikvm(  831): GC freed 423 objects / 29176 bytes in 5ms
D/dalvikvm(  831): Trying to load lib /system/lib/libmedia_jni.so 0x0
D/dalvikvm(  831): Added shared lib /system/lib/libmedia_jni.so 0x0
D/dalvikvm(  831): Trying to load lib /system/lib/libexif.so 0x0
D/dalvikvm(  831): Added shared lib /system/lib/libexif.so 0x0
D/dalvikvm(  831): GC freed 2281 objects / 119200 bytes in 7ms
D/dalvikvm(  831): Trying to load lib /system/lib/libmedia_jni.so 0x0
D/dalvikvm(  831): Shared lib '/system/lib/libmedia_jni.so' already loaded
in same CL 0x0
D/dalvikvm(  831): Trying to load lib /system/lib/libmedia_jni.so 0x0
D/dalvikvm(  831): Shared lib '/system/lib/libmedia_jni.so' already loaded
in same CL 0x0
D/dalvikvm(  831): Trying to load lib /system/lib/libmedia_jni.so 0x0
D/dalvikvm(  831): Shared lib '/system/lib/libmedia_jni.so' already loaded
in same CL 0x0
D/dalvikvm(  831): Trying to load lib /system/lib/libmedia_jni.so 0x0
D/dalvikvm(  831): Shared lib '/system/lib/libmedia_jni.so' already loaded
in same CL 0x0
D/dalvikvm(  831): GC freed 3790 objects / 197008 bytes in 13ms
D/dalvikvm(  831): GC freed 463 objects / 26368 bytes in 12ms
D/dalvikvm(  831): GC freed 292 objects / 16976 bytes in 13ms
D/dalvikvm(  831): GC freed 204 objects / 11496 bytes in 14ms
D/dalvikvm(  831): GC freed 178 objects / 9536 bytes in 15ms
D/dalvikvm(  831): Trying to load lib /system/lib/libsrec_jni.so 0x0
D/dalvikvm(  831): Added shared lib /system/lib/libsrec_jni.so 0x0
D/dalvikvm(  831): Trying to load lib /system/lib/libsrec_jni.so 0x0
D/dalvikvm(  831): Shared lib '/system/lib/libsrec_jni.so' already loaded in
same CL 0x0
D/dalvikvm(  831): GC freed 294 objects / 34656 bytes in 15ms
D/dalvikvm(  831): GC freed 123 objects / 24528 bytes in 22ms
D/dalvikvm(  831): GC freed 337 objects / 38424 bytes in 23ms
D/dalvikvm(  831): GC freed 418 objects / 25856 bytes in 23ms
D/dalvikvm(  831): Trying to load lib /system/lib/libwebcore.so 0x0
D/dalvikvm(  831): Added shared lib /system/lib/libwebcore.so 0x0
D/dalvikvm(  831): GC freed 432 objects / 25120 bytes in 24ms
D/dalvikvm(  831): GC freed 489 objects / 30712 bytes in 24ms
D/dalvikvm(  831): GC freed 349 objects / 28888 bytes in 24ms
D/dalvikvm(  831): GC freed 309 objects / 21792 bytes in 25ms
D/dalvikvm(  831): GC freed 913 objects / 79760 bytes in 29ms
D/dalvikvm(  831): GC freed 664 objects / 35928 bytes in 28ms
D/dalvikvm(  831): GC freed 709 objects / 41240 bytes in 29ms
D/dalvikvm(  831): GC freed 735 objects / 40608 bytes in 29ms
D/dalvikvm(  831): GC freed 14135 objects / 479168 bytes in 35ms
D/dalvikvm(  831): GC freed 10579 objects / 452136 bytes in 36ms
D/dalvikvm(  831): GC freed 10694 objects / 466552 bytes in 39ms
D/dalvikvm(  831): GC freed 7540 objects / 463424 bytes in 39ms
D/dalvikvm(  831): GC freed 8166 objects / 464048 bytes in 40ms
D/dalvikvm(  831): GC freed 8640 objects / 522424 bytes in 40ms
D/dalvikvm(  831): GC freed 6840 objects / 377848 bytes in 40ms
D/dalvikvm(  831): GC freed 847 objects / 51176 bytes in 38ms
D/dalvikvm(  831): GC freed 540 objects / 38720 bytes in 38ms
D/dalvikvm(  831): GC freed 460 objects / 31368 bytes in 38ms
D/dalvikvm(  831): GC freed 426 objects / 29864 bytes in 38ms
I/Zygote  (  831): ...preloaded 1942 classes in 5183ms.
D/dalvikvm(  831): GC freed 117 objects / 14864 bytes in 38ms
I/Zygote  (  831): Preloading resources...
D/dalvikvm(  831): GC freed 5 objects / 224 bytes in 38ms
D/dalvikvm(  831): GC freed 327 objects / 16632 bytes in 39ms
D/dalvikvm(  831): GC freed 269 objects / 12656 bytes in 40ms
I/Zygote  (  831): ...preloaded 48 resources in 427ms.
I/Zygote  (  831): ...preloaded 15 resources in 10ms.
D/dalvikvm(  831): GC freed 114 objects / 8672 bytes in 39ms
D/dalvikvm(  831): GC freed 206 objects / 8112 bytes in 39ms
D/dalvikvm(  831): GC freed 24 objects / 936 bytes in 39ms
I/dalvikvm(  831): Splitting out new zygote heap
I/dalvikvm(  831): System server process 841 has been created
I/Zygote  (  831): Accepting command socket connections
D/dalvikvm(  841): Trying to load lib /system/lib/libandroid_servers.so 0x0
D/dalvikvm(  841): Added shared lib /system/lib/libandroid_servers.so 0x0
E/BatteryService(  841): Could not open /sys/class/power_supply
I/sysproc (  841): Entered system_init()
I/sysproc (  841): ServiceManager: 0x13dc68
I/SurfaceFlinger(  841): SurfaceFlinger is starting
I/SurfaceFlinger(  841): SurfaceFlinger's main thread ready to run.
Initializing graphics H/W...
W/gralloc (  841): page flipping not supported (yres_virtual=768,
requested=1536)
I/gralloc (  841): using (fd=23)
I/gralloc (  841): id           = omapfb
I/gralloc (  841): xres         = 1024 px
I/gralloc (  841): yres         = 768 px
I/gralloc (  841): xres_virtual = 1024 px
I/gralloc (  841): yres_virtual = 768 px
I/gralloc (  841): bpp          = 16
I/gralloc (  841): r            = 11:5
I/gralloc (  841): g            =  5:6
I/gralloc (  841): b            =  0:5
I/gralloc (  841): width        = 163 mm (159.568100 dpi)
I/gralloc (  841): height       = 122 mm (159.895081 dpi)
I/gralloc (  841): refresh rate = 63.61 Hz


Any help will be highly appreciated.

Thanks & Regards,
Deepak

2. Videogame efficency

Hi everyone!

I will work in an Android videogame soon. It will need a lot of
artwork which means that will have a few image resources.
Mi question is about the loading process of the application and its
memory optimizations.

About the pictures:
How does the VM handle the drawable resources or the classes of the
application that are not used yet, I mean, does the application load
everything at once or just under demand?

About the unused classes:
Does the declaration of unused classes consume memory or are them just
loaded when I create an instance of them?
If some clases have a lot of fixed static data (for example, preloaded
locations for a map) is all that data consuming memory when the class
is not used or its loaded by demand?

Thank you very much in advance.
Sorry for my bad english.

Best regards.

Miguel

3. Reading and writing to same file.

4. How to port Android Application in HTC Hero Device.

5. ListView issue

6. Kernel driver for National Instruments USB-6251 device

7. Finding if softkeyboard is visible in landscape mode