"Pretty" ways to animate a list?

by Keith Wiley » Sat, 28 Mar 2009 09:32:50 GMT


Sponsored Links
 AK Notepad does this nice little thing where, on displaying the file
list, it "unravels" rapidly down the screen.  Are they hacking that
incredibly manually, or are there simple OS calls to make lists
display in various ways?

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



"Pretty" ways to animate a list?

by Carl Whalley » Sat, 28 Mar 2009 21:47:54 GMT


 Look in the API demos: Views | Layout Animation | List cascade

--
Android Academy:  http://www.androidacademy.com 



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


Sponsored Links


"Pretty" ways to animate a list?

by Keith Wiley » Sun, 29 Mar 2009 00:23:28 GMT


 Ah, I was looking in the list section.  I feel silly.

Thank you.
--~--~---------~--~----~------------~-------~--~----~



"Pretty" ways to animate a list?

by Keith Wiley » Sun, 29 Mar 2009 01:33:44 GMT


 So, I can get it to work if I replicate that demo perfectly, which
doesn't assign a context to the layout, it just uses some default.  I
am trying to build off the extended ListActivity example, however, in
which a context is assigned so that a special item is shown in the
list when and only when the list is empty.  When I try to assign the
context, the app crashes.  I pulled over the appropriate anim xml file
of course.  Here's my layout:

<LinearLayout
        xmlns:android=" http://schemas.android.com/apk/res/android" ;
        android:layout_width="fill_parent"
android:layout_height="wrap_content"
        android:layoutAnimation="@anim/slide_top_to_bottom" >

        <ListView
                android:id="@+id/android:list"
                android:layout_width="fill_parent"
android:layout_height="wrap_content" />
        <TextView
                android:id="@+id/android:empty"
                android:layout_width="fill_parent"
                android:layout_height="?android:attr/listPreferredItemHeight"
                android:textAppearance="?android:attr/textAppearanceLarge"
                android:gravity="center_vertical"
                android:paddingLeft="5dip"
                android:paddingRight="5dip"
                android:textColor="#FFFF0000"
                android:text="Nothing to show message goes here" />
</LinearLayout>

And here's my code, which crashes on the setContentView() call and
thus never reaches all the animation initialization below it:

        public void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
                setContentView(R.layout.tablelist_activity);

                AnimationSet set = new AnimationSet(true);

                Animation animation = new AlphaAnimation(0.0f, 1.0f);
                animation.setDuration(50);
                set.addAnimation(animation);

                animation = new TranslateAnimation(
                    Animation.RELATIVE_TO_SELF, 0.0f,Animation.RELATIVE_TO_SELF,
0.0f,
                    Animation.RELATIVE_TO_SELF, 
-1.0f,Animation.RELATIVE_TO_SELF,
0.0f
                );
                animation.setDuration(100);
                set.addAnimation(animation);

                LayoutAnimationController controller =  new 
LayoutAnimationController
(set, 0.5f);
                ListView listView = getListView();
                listView.setLayoutAnimation(controller);

                etc. other setup
}

By the nature of the crash, there is no way to study the problem in
the debugger.  It crashes hard, deep inside Android, where the
backtrace is unfathomable.

Any ideas?
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. alphabetic scrollview navigator

is the scrollview with the alphabetic list on the right and annotated 
scrolling a standard component? or is there any support for 
implementing it? sorry i've not had chance to take a look in the 2.0 
API...


thanks
--
jason.vp.engineering.particle

--

2. menu key unlocks phone

I have an HTC Tattoo handset, and today I noticed that it can be
unlocked by just pressing the menu key, no need to down slide. The
main problem is that when you press the menu key, the phone menu
comes, and it's very easy to make phone calls inadvertently. All it
need is the menu key to be pressed, and something touching a name in
the screen. If the phone is carried in a bag, this can easily happen,
and it does happen :P

In my opinion this could be very easily solved by only allowing the
phone to be unlocked by down-sliding the touch screen, i.e. the
default procedure.

The phone comes with android 2.0. Is this a tattoo specific issue, or
is it the OS standard behaviour?

Cheers,

Pedro.

-- 

3. Getting permission to install Android SDK on University computers

4. Answer and hang up a call

5. Accessing the NFS server from Android : RPC: Unknown protocol issue

6. GLSurfaceView problem/querry

7. <WTI: N1 gak diroot kok bisa dicubit2 ya....