I have extended an SimpleCursorAdapter and define a
FilterQueryProvider like so:
setFilterQueryProvider(new FilterQueryProvider() {
public Cursor runQuery(CharSequence constraint) {
return getMatching(constraint);
}
});
I can't see how the Cursor can be managed because this class
I've reported this as an SDK bug because I don't think the code in
CursorAdaptor is doing what the JDK is saying, well atleast in 1.6 it
isn't anyway.
http://code.google.com/p/android/issues/detail?id=24322
--
You received this message because you are subscribed to the Google
Groups Android
Yes I've also looked at the 2.3.3 code and the same problem is there.
As a work around in my Adapter I record the Activity that created it,
then in the runQueryOnBackground I make a call on the activity to
manage the cursor. It's not a nice way of doing it but sorts the
problem out as far as I
Thanks for the reply skink. I've tried what you suggested and yes
changeCursor is getting called, now I look at the code again I can see
how. I can also now see what the cause of the memory leak it.
Basically when the activity is destroyed that contains views with
CursorAdapters there appear to be
I added the following to my adapter and that seems to have fixed the
problem:
@Override
public void changeCursor(Cursor newCursor) {
Cursor oldCursor = getCursor();
super.changeCursor(newCursor);
if(oldCursor != null oldCursor != newCursor) {
// adapter has already dealt
what about this:
http://stackoverflow.com/questions/6542745/whats-the-purpose-of-start...
Interesting, thanks for the link. Not sure if I should introduce the
v4 support into my app or not. I'm not far off releasing so maybe I'll
get the first version out and then look at things like this
Kostya I think your right, even though the managedCursor mechanism
basically does what I want I don't like it. I think the mechanism you
mention in the destroy method is the way to go with this however I
really think the platform should be looking after all of this
correctly.
As you say all these
Nice :)
I did it slightly differently. I already had a standard top level
Activity all my Activities inherit from so in there i defined:
ListCursorAdapter managedCursorAdaptors = new
ArrayListCursorAdapter();
and added the following methods:
protected void
Yeah great info all around Kostya thanks :)
By the way what is strict mode? I'm coming from a Java Swing
environment and only very recently dived into the world of Android so
still picking a lot of things up.
Thanks
Steve
--
You received this message because you are subscribed to the Google
Ah very useful thanks Kostya.
--
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
Hi,
I'm writing an app which makes fairly heavy use of the database. Are
there any tools which I can plug into eclipse or use on my Mac which
will mean I can quickly view, query and generally mess around with my
apps database without me having to use the terminal all the time and
constantly exit
Hi,
I've got an form activity where I save the information entered in to
it to the sqllite database. For the edittext fields this is simple to
handle, however I'm not sure of the best practice for handling the
storage of spinner selections.
If I have a spinner with say the following info in it
when you are adding new items to your SpinnerAdapter just make sure
than new items have unique ids and store in the database ids not
positions
Mmmm when you say id's I'm a little unclear what you mean. I define in
an array.xml file the following
string-array name=some_demo_array
Im now thinking the way to do this is to take the position of the item
selected from the spinner use this as an index in to an associated
values array as already mentioned in my last reply, this will then
give a value that can be stored. On the reverse route the value
fetched from the database
Actually it's easier than I thought. ArrayAdapter takes an array of
objects so I can create a simple object that holds the displayable
string and the associated value, the tostring() on it will return the
displayable string, the getValue() returns the associated value. I
then code a simple method
Ah interesting video thanks for pointing it out to me. It looks like I
simply need to use the none server managed purchase mechanism for what
I need.
The first part of the video was worth watching also because I hadn't
even considered security on my app. I think I will spend some time
Thanks for the reply again Mark, very useful information. The in-app
purchasing maybe the way for me to go so I'll have a read around that
subject. In theory I could create the structure of the app with
several modules which could be purchased as add on's. I could put in
the app store a version of
Right I've had a read around in-app purchasing and I think its the way
to go.
My thinking is I release the initial version of the code probably
without in-app code, just get it out there. Then I do an update when
ready which add in-app purchasing. The extra logic to be bought will
already be in
Hi,
Newbie here.
If I want to create several apps which all allow a user to created,
read, update and delete related data so a content provider would seem
to be the way to go. However I don't know which app a customer would
buy first, second and so on. So how do I make sure that:
1) The first
at 8:11 AM, swebb99 sweb...@gmail.com wrote:
Hi,
Newbie here.
If I want to create several apps which all allow a user to created,
read, update and delete related data so a content provider would seem
to be the way to go. However I don't know which app a customer would
buy first, second
Thanks for the reply Mark. As you say contacts is part of the eco
system and hence I can see the benefit of a provider. But I'm failing
to see how providers created by normals developers like myself are
actually that useful unless you have one app that provides the
provider and then the others
I updated the android SDK's, basically installed and updated
everything. Now when I open existing applications I've been working on
I get an error when trying to view existing layouts
java.lang.NullPointerException
at
18:00, swebb99 пишет:
I updated the android SDK's, basically installed and updated
everything. Now when I open existing applications I've been working on
I get an error when trying to view existing layouts
java.lang.NullPointerException
.
*Thanks and Regards,
Kumar Bibek*
*http://techdroid.kbeanie.comhttp://www.kbeanie.com*
On Tue, Oct 25, 2011 at 10:39 PM, swebb99 sweb...@gmail.com wrote:
Great thanks Kostya that fixed my problem :) Do you know what it fixed
by any chance ?
Steve
On Oct 25, 3:23 pm, Kostya
-developers/DdE5Ql_OZsY
https://groups.google.com/forum/#%21topic/android-developers/DdE5Ql_OZsY
-- Kostya
25.10.2011 21:09, swebb99 пишет:
Great thanks Kostya that fixed my problem :) Do you know what it fixed
by any chance ?
Steve
On Oct 25, 3:23 pm, Kostya Vasilyevkmans
25 matches
Mail list logo