[android-developers] AwesomePagerAdapter initial position

2012-01-14 Thread sheamuso
Does anyone know how to set the initial position of the
AwesomePagerAdapter in the compatibility package.

I've been trying to use setPrimaryItem but don't know how, see my
feeble attempt below but don't know what parameters to pass in


awesomeAdapter = new AwesomePagerAdapter();
awesomePager = (ViewPager) findViewById(R.id.awesomepager);
awesomePager.setAdapter(awesomeAdapter);
awesomeAdapter.setPrimaryItem(null, pos, null);

private class AwesomePagerAdapter extends PagerAdapter {
@Override
public void setPrimaryItem(View collection, int position, Object
object) {
Object primary = instantiateItem(collection, position);
super.setPrimaryItem(collection, position, object);
}
...

-- 
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] RequestFactory slow on Android

2011-10-15 Thread sheamuso
I am using RequestFactory with appengine and android. And the response
is returned quite quickly but I do not get the onSuccess() callback
until much later (1-2 mins or sometimes 4 minutes).

About 8 objects are returned without about 10 fields in each. Has
anyone solved or know something about this issue?

Here is the calling code:
private void getEvents(final int getPage) {
WhichFestivalRequestFactory factory =
Util.getRequestFactory(getApplicationContext(),
WhichFestivalRequestFactory.class);

factory.eventRequest().findTopEvents(pageStart,
pageEnd).with(images, websites).fire(new
ReceiverListEventProxy() {
@Override
public void onSuccess(ListEventProxy upcomingEvents) {
checkForMore(upcomingEvents, getPage);
}

@Override
public void onFailure(ServerFailure error) {
super.onFailure(error);
}
});
}


My question is the same as here.
http://stackoverflow.com/questions/7738486/requestfactory-slow-on-android


The original talk at IO this year:
http://youtu.be/M7SxNNC429U

-- 
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