Coder Social home page Coder Social logo

Comments (5)

emilsjolander avatar emilsjolander commented on June 29, 2024

Could you please post the code you use the create and set the SimpleCursorAdapter?

from android-flipview.

Michenux avatar Michenux commented on June 29, 2024

I initialize the adapter like this (in the onCreateView of my fragment) :

this.mAdapter = new SimpleCursorAdapter(this.getActivity(),
R.layout.page, null, mAdapterFromColumns, mAdapterToViews,
0);

And when in the method onLoadFinished :

public void onLoadFinished(Loader loader, Cursor cursor) {
this.mAdapter.changeCursor(cursor);
}

This method doesnot work with the FlipView (works with a listView)

I found a workaround, i delay the creation of the adapter :

@OverRide
public void onLoadFinished(Loader loader, Cursor cursor) {

    if ( this.mAdapter == null ) {
        this.mAdapter = new SimpleCursorAdapter(this.getActivity(),
            R.layout.page, cursor, mAdapterFromColumns,

mAdapterToViews, 0);
this.mAdapter.setViewBinder(this);
mFlipView.setAdapter(this.mAdapter);
}
else {
this.mAdapter.changeCursor(cursor);
}
}

2014/1/26 Emil Sjölander [email protected]

Could you please post the code you use the create and set the
SimpleCursorAdapter?


Reply to this email directly or view it on GitHubhttps://github.com//issues/31#issuecomment-33316231
.

from android-flipview.

emilsjolander avatar emilsjolander commented on June 29, 2024

What android version are you seeing this on?

from android-flipview.

Michenux avatar Michenux commented on June 29, 2024

4.4

2014/1/26 Emil Sjölander [email protected]

What android version are you seeing this on?


Reply to this email directly or view it on GitHubhttps://github.com//issues/31#issuecomment-33319288
.

from android-flipview.

emilsjolander avatar emilsjolander commented on June 29, 2024

Looking up the source for SimpleCursorAdapter there are just comments on line 118 making it hard to track down what is actually happening.

from android-flipview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.