Re: [android-developers] Bud setAdapter of AbsListView

2011-03-22 Thread Sergey Okhotny
E/AndroidRuntime(14762): FATAL EXCEPTION: main
E/AndroidRuntime(14762): java.lang.NoSuchMethodError:
android.widget.AbsListView.setAdapter
E/AndroidRuntime(14762):at
com.reader.android.LocalStore.bindAdapters(LocalStore.java:534)
E/AndroidRuntime(14762):at
com.reader.android.LocalStore.ReloadCatalogBind(LocalStore.java:438)
E/AndroidRuntime(14762):at
com.reader.android.LocalStore.access$32(LocalStore.java:437)
E/AndroidRuntime(14762):at
com.reader.android.LocalStore$8.onPostExecute(LocalStore.java:420)
E/AndroidRuntime(14762):at
com.reader.android.LocalStore$8.onPostExecute(LocalStore.java:1)
E/AndroidRuntime(14762):at
android.os.AsyncTask.finish(AsyncTask.java:417)
E/AndroidRuntime(14762):at
android.os.AsyncTask.access$300(AsyncTask.java:127)
E/AndroidRuntime(14762):at
android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:429)
E/AndroidRuntime(14762):at
android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(14762):at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(14762):at
android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime(14762):at
java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(14762):at
java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime(14762):at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
E/AndroidRuntime(14762):at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
E/AndroidRuntime(14762):at dalvik.system.NativeStart.main(Native
Method)
W/ActivityManager( 1997):   Force finishing activity
com.reader.android/.Main


On Fri, Mar 18, 2011 at 3:27 PM, TreKing treking...@gmail.com wrote:

 On Fri, Mar 18, 2011 at 3:56 AM, Sergey Okhotny okho...@gmail.com wrote:

 AbsListView mNewspapersView =
 (AbsListView)findViewById(R.id.localstore_newspapers);
 this fails
 mNewspapersView.setAdapter(new NewspapersListAdapter());
 but if I do
 ((ListView)mNewspapersView).setAdapter(new NewspapersListAdapter());
 this works ok


 And the callstack from the crash?



 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Sergey A. Okhotny
Skype:okhotny / G-Talk:okho...@gmail.com
Phone:+380 (68) 322-0338

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Bud setAdapter of AbsListView

2011-03-22 Thread TreKing
Yeah, that doesn't help much. Guess you'd have to look at the source to see
what it's doing at that point.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Bud setAdapter of AbsListView

2011-03-18 Thread Sergey Okhotny
Layout:
ListView
android:id=@+id/localstore_newspapers
android:layout_width=fill_parent
android:layout_height=fill_parent /

Java:
private class NewspapersListAdapter extends BaseAdapter {}

AbsListView mNewspapersView = 
(AbsListView)findViewById(R.id.localstore_newspapers);
this fails
mNewspapersView.setAdapter(new NewspapersListAdapter());
but if I do 
((ListView)mNewspapersView).setAdapter(new NewspapersListAdapter());
this works ok





-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Bud setAdapter of AbsListView

2011-03-18 Thread TreKing
On Fri, Mar 18, 2011 at 3:56 AM, Sergey Okhotny okho...@gmail.com wrote:

 AbsListView mNewspapersView =
 (AbsListView)findViewById(R.id.localstore_newspapers);
 this fails
 mNewspapersView.setAdapter(new NewspapersListAdapter());
 but if I do
 ((ListView)mNewspapersView).setAdapter(new NewspapersListAdapter());
 this works ok


And the callstack from the crash?

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Bud setAdapter of AbsListView

2011-03-17 Thread Sergey Okhotny
I've two layouts for diferrent screen size.
Small uses ListView, for large - GridView. Both have same id 
On activity I cast the to AbsListView.
Then I set adapter using setAdapter(new myAdapter), myAdapter extends 
BaseAdapter.
And if my AbsListView is GridView, everything is fine, but if it is ListView 
- then I got exception NoSuchMethodError!
If I cast AbsListView to ListView - then it will work fine too.
How to make it working without injecting cast??

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Bud setAdapter of AbsListView

2011-03-17 Thread TreKing
On Thu, Mar 17, 2011 at 12:42 PM, Sergey Okhotny okho...@gmail.com wrote:

 And if my AbsListView is GridView, everything is fine, but if it is
 ListView - then I got exception NoSuchMethodError!


Want to show the code that leads to this?

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en