Zoom 1 jari

by Arief Hardianto » Wed, 21 Apr 2010 16:17:36 GMT


Sponsored Links
 Beda jempol kali ? :p
*lg nyoba pke jempol kaki...




koq gw ga bisa yak? -____-"
padahal sama2 dah di CM-5.0.6..

btw, gw sih biasa zoom 1 jari pake double click, huehe.. tapi zoom level-nya
gak bisa diatur kyk klo pake pinch-to-zoom..



On Wed, Apr 21, 2010 at 3:02 PM, lucky sebastian <9b.andr...@gmail.com>



-- 
"



Other Threads

1. Application-wide resources.. how to achieve?

Hi all,

So I'm struggling a bit with what is probably a fairly basic concept..
Activity Lifecycle.

I have read a bunch of thread on the topic, and I feel I understand
well both the functionality, and rationale behind the lifecycle model
implemented for Activities, but it raises a bit of a problem for me.

My app (game) has a couple of distinct Activities for various
sections:

1. The TitleActivity is a very small Activity that just launches a
GLSurfaceView and renders a startup logo.  I use this to detect the
OpenGL capabilities of the device (eg so I know if it's using a
software renderer)

2. The LaunchActivity is the main menu screen where the user can
access options etc and start a game

3. The GameActivity will either launches a GLSurfaceView or a standard
View depending on hardware capabilties.

The issue I am having is that I want to pre-load some "slow-to-load"
resources, specifically audio, in the Title Activity so when the
Launch Activity renders I can play some background music.

I have the concept of a "media library" which I use throughout the
game.  Because of memory limitations in the SoundPool, I have limited
this to only absolute real-time sounds and all others are played using
mulitple instances of MediaPlayer.  Hence my media library has a bunch
of pre-loaded MediaPlayer instances which I access regularly during
game play.. so it makes sense to have a centralized access point for
all audio.

All fine, however the problem is that when I launch one activity from
another.. for example the TitleActivity starts the LaunchActivity (via
a call to startActivity(Intent...)), the former goes through the
onDestroy stage of its lifecycle.

Now logically I had assumed that if I allocate a bunch of resources in
the onCreate of an Activity, I should clean them up in the onDestroy,
however in the case of my "media library" if I load up the audio files
in the onCreate of my TitleActivity they will be torn down when the
LaunchActivity is started because the TitleActivity will have its
onDestroy() method called.

So.. the question is...

Is it possible to have data bound to the lifecycle of the entire
application?  I'm trying to avoid two scenarios:

1. Loading up all resources and tearing them down again every time the
Activity is created/destroyed
2. Splitting up the resources based on Activity.

In the latter case (2) I could minimize the load time by limiting the
resources loaded based on the Activity, but this means I need to know
ahead of time which resources that activity will need.. which is a
pain.  In the former case (1) my load time for each level of the game
will be blown out because I have to completely reload the world when
it hasn't actually changed.

As you've probably guessed, my media library is just sitting in static
scope.. basically a poor-man's singleton.

Ideally I would like to be able to setup and tear down these resources
when the entire application is created or destroyed.

Is this even possible?  And if not does anyone have a pattern that
makes sense for this?  (besides having one monster Activity where
everything else is a View)

I also have some background threads that suffer the same problem.
That is, do I have to start and stop them with every Activity start/
stop?

Thanks!

-- 

2. Mechanism to ensure request comes from my app

If I have my app fetching content from my server, what mechanism
should I use on my server to ensure that its my app making the
request?

Is there any way that I can sign the request to using my app's
signature to show its come from my app and not from a stolen version
or copycat? I suspect the answer is no, but I'm looking for
suggestions.

William

-- 

3. When is a right time to start placing ads in app (share your experience)

4. Programatically gain access to phone dialer timer

5. Problem in getting smooth gallery scrolling..

6. Microphone for demoing speech recognition?

7. build script can't find aapt even though it's there.