use of com.aphidmobile.flip.FlipViewController 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.FlipViewController 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.FlipViewController in project android-flip by openaphid.
the class FlipTextViewActivity 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);
flipView.setAdapter(new BaseAdapter() {
@Override
public int getCount() {
return 10;
}
@Override
public Object getItem(int position) {
return position;
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
NumberTextView view;
if (convertView == null) {
final Context context = parent.getContext();
view = new NumberTextView(context, position);
view.setTextSize(context.getResources().getDimension(R.dimen.textSize));
} else {
view = (NumberTextView) convertView;
view.setNumber(position);
}
return view;
}
});
setContentView(flipView);
}
use of com.aphidmobile.flip.FlipViewController in project android-flip by openaphid.
the class FlipWebViewActivity method onCreate.
/**
* Called when the activity is first created.
*/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle(R.string.activity_title);
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
//flip horizontally may be the better choice as most web pages need scroll vertically
flipView = new FlipViewController(this, FlipViewController.HORIZONTAL);
flipView.setAdapter(new MyBaseAdapter(this, flipView));
setContentView(flipView);
}
use of com.aphidmobile.flip.FlipViewController in project android-flip by openaphid.
the class Issue5Activity 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);
flipView.setAdapter(new GalleryFlipAdapter(this, flipView));
setContentView(flipView);
}
Aggregations