Animating layout.

by avigadl » Sat, 17 Jul 2010 02:27:17 GMT


Sponsored Links
 I would like to apply an animation to a layout. However, I need to
apply  different animation to each one of its child
viewsimultenously.
How should I do it?

--



Other Threads

1. Potential bug in the implementation of AppWidgets

Hi

We have discovered a potential bug in the implementation of
AppWidgets. Here is a simple reproducer.

Attached is the code for an application containing a TestActivity and
a TestWidget. TestActivity extends MapActivity and TestWidget is a
simple widget provider which updates a TextView every 2 seconds.
Now if the TestActivity is launched with no instance of TestWidget
running, it works just fine. But if the TestActivity is launched after
placing the TestWidget on the home, it results in
ClassNotFoundException. Here is what we get:

I/ActivityManager(  584): Starting activity: Intent
{ action=android.intent.action.MAIN categories=
{android.intent.category.LAUNCHER} flags=0x10200000 comp=
{com.example.test/com.example.test.TestActivity} }
W/dalvikvm( 1441): Unable to resolve superclass of Lcom/example/test/
TestActivity; (15)
W/dalvikvm( 1441): Link of class 'Lcom/example/test/TestActivity;'
failed
D/AndroidRuntime( 1441): Shutting down VM
W/dalvikvm( 1441): threadid=3: thread exiting with uncaught exception
(group=0x4000fe70)
E/AndroidRuntime( 1441): Uncaught handler: thread main exiting due to
uncaught exception
E/AndroidRuntime( 1441): java.lang.RuntimeException: Unable to
instantiate activity ComponentInfo{com.example.test/
com.example.test.TestActivity}: java.lang.ClassNotFoundException:
com.example.test.TestActivity in loader
dalvik.system.pathclassloa...@49a52110
E/AndroidRuntime( 1441):     at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2194)
E/AndroidRuntime( 1441):     at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2284)
E/AndroidRuntime( 1441):     at android.app.ActivityThread.access$1800
(ActivityThread.java:112)
E/AndroidRuntime( 1441):     at android.app.ActivityThread
$H.handleMessage(ActivityThread.java:1692)
E/AndroidRuntime( 1441):     at android.os.Handler.dispatchMessage
(Handler.java:99)
E/AndroidRuntime( 1441):     at android.os.Looper.loop(Looper.java:
123)
E/AndroidRuntime( 1441):     at android.app.ActivityThread.main
(ActivityThread.java:3948)
E/AndroidRuntime( 1441):     at java.lang.reflect.Method.invokeNative
(Native Method)
E/AndroidRuntime( 1441):     at java.lang.reflect.Method.invoke
(Method.java:521)
E/AndroidRuntime( 1441):     at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:782)
E/AndroidRuntime( 1441):     at com.android.internal.os.ZygoteInit.main
(ZygoteInit.java:540)
E/AndroidRuntime( 1441):     at dalvik.system.NativeStart.main(Native
Method)
E/AndroidRuntime( 1441): Caused by: java.lang.ClassNotFoundException:
com.example.test.TestActivity in loader
dalvik.system.pathclassloa...@49a52110
E/AndroidRuntime( 1441):     at dalvik.system.PathClassLoader.findClass
(PathClassLoader.java:243)
E/AndroidRuntime( 1441):     at java.lang.ClassLoader.loadClass
(ClassLoader.java:573)
E/AndroidRuntime( 1441):     at java.lang.ClassLoader.loadClass
(ClassLoader.java:532)
E/AndroidRuntime( 1441):     at android.app.Instrumentation.newActivity
(Instrumentation.java:1097)
E/AndroidRuntime( 1441):     at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2186)
E/AndroidRuntime( 1441):     ... 11 more

So it seems we have an inconsistency in the way the class loader works
for the same apk.

WORKS - Launch the application by itself, without invoking the Widget.
DOES NOT WORK - Create a Widget on the Home screen and then launch the
application from the launcher.

The source code for this application (http://www.yousendit.com/
download/TzY3ZGVhZy96NE4zZUE9PQ) has been attached. Hope someone from
the Android team can shed light on this behavior.

BTW, this error is seen on the 1.5r3 SDK. Not sure if this has been
addressed in 1.6 and 2.0 SDKs..

Thanks,
Himanshu.

-- 

2. My appwidget broken Donut when keyboard slide out/in

Hi String,
     I use static var, i will test it.
Hi Jeff,
   Here is my layout file content. it seems will cause confliction
with others:
Thanks for your kindly help.

<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout android:id="@+id/LinearLayout01"
        android:layout_width="72dp" android:layout_height="72dp"
        android:background="@drawable/bg" android:orientation="vertical"
        android:paddingTop="3dp"
        xmlns:android="http://schemas.android.com/apk/res/android">

        <TextView android:text="TextView01"
                android:layout_width="wrap_content" android:textStyle="bold"
                android:layout_height="14sp" android:id="@+id/TVWeeks"
                android:textSize="12sp"
                android:paddingLeft="8dp"
                android:textColor="#000000">
        </TextView>



        <ImageView android:id="@+id/ImageView01"
                android:layout_width="65sp"
                android:src="@drawable/line"
                android:paddingLeft="5dp"
                android:layout_height="2sp">
        </ImageView>
        <TextView android:text="TextView01"
        android:paddingLeft="8dp"
        android:textSize="12sp"
                android:layout_width="wrap_content" android:textColor="#000000"
                android:layout_height="14sp" android:id="@+id/TVHeight">
        </TextView>



        <TextView android:text="TextView01"
        android:textSize="12sp"
        android:paddingLeft="8dp"
                android:layout_width="wrap_content" android:textColor="#000000"
                android:layout_height="16sp" android:id="@+id/TVWeight">
        </TextView>

<ImageView android:id="@+id/ImageView02"
                android:layout_width="65sp"
                android:src="@drawable/line"
                android:paddingLeft="5dp"
                android:layout_height="2sp">
        </ImageView>
        <TextView android:text="TextView01" android:textColor="#000000"
        android:textSize="12sp"

        android:paddingLeft="8dp"
                android:layout_width="wrap_content"
                android:layout_height="16sp"
                android:id="@+id/TVMomWeiAdded">
        </TextView>




</LinearLayout>









-- 

3. MapView on 1.6 very strange behaviour

4. BroadcastReciver in service

5. Application design - using threads

6. Tutorials: creating 9-patch drawables using SDK tools

7. Building opencore 2 outside android