use of com.aphidmobile.flip.FlipViewController in project android-flip by openaphid.
the class FlipAsyncContentActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle(R.string.activity_title);
flipView = new FlipViewController(this);
flipView.setAdapter(new MyBaseAdapter(this, flipView));
setContentView(flipView);
}
use of com.aphidmobile.flip.FlipViewController in project android-flip by openaphid.
the class FlipButtonActivity 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) {
NumberButton button;
if (convertView == null) {
final Context context = parent.getContext();
button = new NumberButton(context, position);
button.setTextSize(context.getResources().getDimension(R.dimen.textSize));
} else {
button = (NumberButton) convertView;
button.setNumber(position);
}
return button;
}
});
setContentView(flipView);
}
use of com.aphidmobile.flip.FlipViewController 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.FlipViewController 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);
}
use of com.aphidmobile.flip.FlipViewController in project android-flip by openaphid.
the class Issue51Activity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTitle(R.string.activity_title);
flipView = new FlipViewController(this);
flipView.setAdapter(new MyBaseAdapter(this));
setContentView(flipView);
}
Aggregations