How to preserve view's animation result?

by Anthony » Fri, 09 May 2008 03:16:58 GMT


Sponsored Links
 Hi All,

I have see this thread as below, but not same as my question:



How to preserve view's animation result?

by Anthony » Tue, 13 May 2008 01:07:34 GMT


 Somebody help me?




> question:


Sponsored Links


How to preserve view's animation result?

by Anthony » Wed, 14 May 2008 02:05:55 GMT


 Or give me some comments, thanks.





> > question:



Other Threads

1. You must supply a resource ID for a TextView

Hey,

I have a weird problem. For days i have a working list with movie
details i get from an xml rpc source. It loads the list very well and
I tried it again today and when i scroll down, always at the same list
item it gives me this error. I don't know what the problem is. It
shows my list items very good and now not anymore. If you want i can
give you my source code too! And it worked a few days ago and now
suddenty not :(

09-18 11:50:00.940: ERROR/ArrayAdapter(1561): You must supply a
resource ID for a TextView
09-18 11:50:00.950: DEBUG/AndroidRuntime(1561): Shutting down VM
09-18 11:50:00.950: WARN/dalvikvm(1561): threadid=3: thread exiting
with uncaught exception (group=0x4001aa28)
09-18 11:50:00.950: ERROR/AndroidRuntime(1561): Uncaught handler:
thread main exiting due to uncaught exception
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):
java.lang.IllegalStateException: ArrayAdapter requires the resource ID
to be a TextView
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:
347)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
android.widget.ArrayAdapter.getView(ArrayAdapter.java:323)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
com.android.moviemeter.SeparatedListAdapter.getView
(SeparatedListAdapter.java:93)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
android.widget.AbsListView.obtainView(AbsListView.java:1255)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
android.widget.ListView.addViewBelow(ListView.java:2795)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
android.widget.ListView.scrollListItemsBy(ListView.java:2725)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
android.widget.ListView.arrowScrollImpl(ListView.java:2225)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
android.widget.ListView.arrowScroll(ListView.java:2172)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
android.widget.ListView.commonKey(ListView.java:1977)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
android.widget.ListView.onKeyDown(ListView.java:1924)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
android.view.KeyEvent.dispatch(KeyEvent.java:893)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
android.view.View.dispatchKeyEvent(View.java:3647)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:744)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
android.widget.ListView.dispatchKeyEvent(ListView.java:1909)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
com.android.internal.policy.impl.PhoneWindow
$DecorView.superDispatchKeyEvent(PhoneWindow.java:1708)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
com.android.internal.policy.impl.PhoneWindow.superDispatchKeyEvent
(PhoneWindow.java:1197)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
android.app.Activity.dispatchKeyEvent(Activity.java:1967)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent
(PhoneWindow.java:1684)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
android.widget.TabHost.dispatchKeyEvent(TabHost.java:272)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:746)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
com.android.internal.policy.impl.PhoneWindow
$DecorView.superDispatchKeyEvent(PhoneWindow.java:1708)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
com.android.internal.policy.impl.PhoneWindow.superDispatchKeyEvent
(PhoneWindow.java:1197)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
android.app.Activity.dispatchKeyEvent(Activity.java:1967)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent
(PhoneWindow.java:1684)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
android.view.ViewRoot.deliverKeyEventToViewHierarchy(ViewRoot.java:
2329)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
android.view.ViewRoot.handleFinishedEvent(ViewRoot.java:2299)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
android.view.ViewRoot.handleMessage(ViewRoot.java:1621)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
android.os.Handler.dispatchMessage(Handler.java:99)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
android.os.Looper.loop(Looper.java:123)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
android.app.ActivityThread.main(ActivityThread.java:4203)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
java.lang.reflect.Method.invokeNative(Native Method)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
java.lang.reflect.Method.invoke(Method.java:521)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:791)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
dalvik.system.NativeStart.main(Native Method)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561): Caused by:
java.lang.ClassCastException: android.widget.LinearLayout
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     at
android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:
340)
09-18 11:50:00.990: ERROR/AndroidRuntime(1561):     ... 40 more

This is my cinemaAdapter class for making my list!

 private class cinemaAdapter extends ArrayAdapter<FilmDetail> {

        private List<FilmDetail> items;

        public cinemaAdapter(Context context, List<FilmDetail> films)
{
                super(context, R.layout.cinema_row, films);
                this.items = films;
        }
        public View getView(int position, View convertView, ViewGroup
parent) {
                View v = convertView;
                FilmDetail o = items.get(position);

                if (v == null) {
                    LayoutInflater vi = (LayoutInflater)
getSystemService(Context.LAYOUT_INFLATER_SERVICE);
                    v = vi.inflate(R.layout.cinema_row, null);
                }

                if (o != null) {
                        TextView tt = (TextView) v.findViewById
(R.id.text1);
                        TextView genre = (TextView) v.findViewById
(R.id.genre);
                        TextView directors = (TextView) v.findViewById
(R.id.regisseur);
                        TextView actors = (TextView) v.findViewById
(R.id.acteurs);
                        TextView votes = (TextView) v.findViewById
(R.id.votes);
                        ImageView imgCinema = (ImageView)
v.findViewById(R.id.imgCinema);
                        RatingBar cinemaRating = (RatingBar)
v.findViewById(R.id.cinemarating);

                        if (tt != null)
                        {
                           tt.setText(o.getTitle() + " (" + o.getYear
() + ")");
                        }
                        if (genre !=null)
                        {
                                if (o.getDuration().equals("0"))
                                {
                                        genre.setText(o.getGenres_text());
                                }
                                else{
                                        genre.setText(o.getGenres_text() + ", " 
+
o.getDuration() + " minuten");
                                }
                        }
                        if (directors != null)
                        {
                           directors.setText(o.getDirectors_text());
                        }
                        if (actors != null)
                        {
                           actors.setText(o.getActors_text());
                        }
                        if (votes != null)
                        {
                                if (o.getVotes_count().equals("0"))
                                {
                                        votes.setText(" (geen stemmen)");
                                }
                                else {
                                        votes.setText(" (" + 
o.getVotes_count()+ "
stemmen)");
                                }

                        }
                        if (imgCinema != null)
                        {
                                int map = 0;
                                int filmId = Integer.valueOf(o.getFilmId());
                                if (filmId >= 1000)
                                        map = 
Integer.valueOf(o.getFilmId().substring
(0, Integer.valueOf(o.getFilmId().length()) - 3) + "000");

                                String url = "http://www.moviemeter.nl/images/
covers/" + map + "/" + filmId + ".jpg";
                                Bitmap bitmap = moviemeterUtils.loadBitmap
(url.toString());
                                imgCinema.setImageBitmap(bitmap);
                        }

                        if (cinemaRating != null)
                        {
                                cinemaRating.setRating(Float.valueOf
(o.getAverage()));
                        }
                }
                return v;
        }
    }

Thank you for helping me!

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

2. Issue with allocation tracker: I cannot get it to work.

In the AndroidManifest.xml have your marked your application as
debuggable?

e.g.

<application
   ...
   android:debuggable="true">
   ...

--
RichardC





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

3. undefined behavior with getResultExtras and setResultExtras

4. Accessing assets that are larger than 1M?

5. allowTaskReparenting=true. Will there be a single instance of the activity ?

6. any ideas when 1.6 will be pushed in the uk?

7. Need to make physical collaboration easier.