use of com.aphidmobile.flip.demo.adapter.TravelAdapter in project android-flip by openaphid.
the class FlipComplexLayoutActivity method onCreate.
/**
* Called when the activity is first created.
*/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle(R.string.activity_title);
flipView = new FlipViewController(this);
//Use RGB_565 can reduce peak memory usage on large screen device, but it's up to you to choose the best bitmap format
flipView.setAnimationBitmapFormat(Bitmap.Config.RGB_565);
flipView.setAdapter(new TravelAdapter(this));
setContentView(flipView);
}
use of com.aphidmobile.flip.demo.adapter.TravelAdapter in project android-flip by openaphid.
the class FlipDeleteAdapterActivity method onCreate.
/**
* Called when the activity is first created.
*/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle(R.string.activity_title);
flipView = new FlipViewController(this);
//Use RGB_565 can reduce peak memory usage on large screen device, but it's up to you to choose the best bitmap format
flipView.setAnimationBitmapFormat(Bitmap.Config.RGB_565);
adapter = new TravelAdapter(this);
flipView.setAdapter(adapter);
setContentView(flipView);
}
use of com.aphidmobile.flip.demo.adapter.TravelAdapter in project android-flip by openaphid.
the class FlipDynamicAdapterActivity method onCreate.
/**
* Called when the activity is first created.
*/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle(R.string.activity_title);
flipView = new FlipViewController(this);
adapter = new TravelAdapter(this);
flipView.setAdapter(adapter);
flipView.setOnViewFlipListener(new FlipViewController.ViewFlipListener() {
@Override
public void onViewFlipped(View view, int position) {
if (position == adapter.getCount() - 1) {
//expand the data size on the last page
adapter.setRepeatCount(adapter.getRepeatCount() + 1);
adapter.notifyDataSetChanged();
}
}
});
setContentView(flipView);
}
use of com.aphidmobile.flip.demo.adapter.TravelAdapter in project android-flip by openaphid.
the class FlipHorizontalLayoutActivity method onCreate.
/**
* Called when the activity is first created.
*/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle(R.string.activity_title);
flipView = new FlipViewController(this, FlipViewController.HORIZONTAL);
flipView.setAdapter(new TravelAdapter(this));
setContentView(flipView);
}
Aggregations