Problem with continuos animation of children on long press of keys in a Viewgroup.

by ursnavin » Fri, 06 Mar 2009 15:48:29 GMT


Sponsored Links
 Hi all,

Suppose,If the user long presses a key,the animation should run till
the keyup...

For this i tried starting the animation on a new thread with a lock on
a flag variable,till the first animation ends.

Now when the user is still pressing his key,the thread is created with
the nxt animation in it....

On keyup the main thread gets the lock on the flag variable,and relays
the child views in thier new position....

This logic seems to work fine,but after some duration the animation
stops and the application simply hangs,

Is there something that i am missing here.....It would be great if
anyone can tell whether the approach followed is correct or should i
do something else???
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Contradictory documentation - Is it ok to override ViewGroups.invalidateChildInParent() ?

The SDK reference documentation (from the comment in the class) says
it isn't, but it's not declared as final as the other non-overridable
functions are in ViewGroup.  Whilst this isn't a reason to doubt the
documentation by itself, one of the SDK examples overrides it:

http://developer.android.com/guide/samples/ApiDemos/src/com/example/android/apis/graphics/PictureLayout.html

It is also the only way currently to get notified of a child View
being invalidated.

Can someone please confirm whether this is intended for overriding or
not?

Cheers
Simon

-- 

2. 2.0 AccountManager - Implementing a new account type with Google, Facebook and Exchange

I'm trying to hook up a new account for an application to use that
will ultimately sync PIM data.  The application is already working for
API levels 3 & 4, but at API 5, I'm having some trouble with the
introduction of accounts and the AccountManager.

I've searched the groups and the docs and gotten part way there, but
for some reason there isn't any I can get an actual account created.
I've tried both on the Moto Droid and in the emulator.

I have a service that implements everything as required by the
documentation for AbstractAccountAuthenticator. I've confirmed that my
account is not present my iterating the results from
AccountManager.getAccounts().

My service's authenticator shows up in when I iterate the result from
AccountManager.getAuthenticatorTypes().  The name and package are both
listed.

But when I have an activity call to add an account with AddAccount,
the call returns, but the future bundle never finishes.  There is
nothing in logs indicates anything is happening and it's almost as if
there is an Intent fired by the call to addAccount() that I'm not
setup to catch.

Since the eclair source isn't available yet, I can't look into it on
my own and I'm asking for some help from people who know this part of
2.0 or have access to the source to help me find what I am missing.

In my activity, after using an initialized AccountManager to check my
account, I call to set one up:

private final static String MY_ACCOUNT_TYPE = "com.mydomain";
AccountManager am = AccountManager.get(context);
AccountManagerFuture<Bundle> future;
Bundle result;

future = am.addAccount(MS_ACCOUNT_TYPE, null, null, null, null, null,
null);

Log.d(TAG, "returned from am.AddAccount");
try {
    result = future.getResult();
} catch ....

When run, getResult() never finishes, ultimately blocking my activity
until it's stopped.  I don't know where the system goes after my call
to getResult().

The service I have created is configured just the like example from
the docs:
    <service android:enabled="true"
        android:exported="true" android:name="AccountService"
android:label="Sync Account">
        <intent-filter>
                <action android:name="android.accounts.AccountAuthenticator" />
         </intent-filter>
                <meta-data android:name="android.accounts.AccountAuthenticator"
             android:resource="@xml/authenticator" />
    </service>

I'm wondering if there is a different intent I need to catch for
account creation.  All of the service's lifecycle methods have
overrides and logging.  It doesn't look as if my authenticator service
is ever instantiated.

The only other question I had was in AbstractAccountAuthenticator
because the docs read that you must extend this class and return the
correct value for getIBinder().  Since you can't extend from more than
one class, I assumed this meant I needed to have my
AccountAuthenticator class treat the abstract class as an interface
and the class extends Binder to support the getIBinder() method.

I'd appreciate any insight or help anyone can offer.

Cheers,
Jerry

-- 

3. Hi...

4. Sending raw query or SQLitedatabase.query to a database that only is reachable through ContentResolver

5. Size of display

6. Access voice before sending

7. When was pppd be started?