本文整理汇总了Java中com.wenchao.cardstack.CardStack类的典型用法代码示例。如果您正苦于以下问题:Java CardStack类的具体用法?Java CardStack怎么用?Java CardStack使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CardStack类属于com.wenchao.cardstack包,在下文中一共展示了CardStack类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.wenchao.cardstack.CardStack; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_my);
arrayList = getResources().getStringArray(R.array.colors);
mCardStack = (CardStack)findViewById(R.id.container);
frRoot = (FrameLayout) findViewById(R.id.frRoot);
mCardStack.setContentResource(R.layout.card_content);
mCardAdapter = new CardsAdapter(this);
for(int i = 0 ; i < 100 ;i++){
mCardAdapter.add("Example ("+i+")");
}
mCardStack.setAdapter(mCardAdapter);
if(mCardStack.getAdapter() != null) {
Log.i("MainActivity", "Card Stack size: " + mCardStack.getAdapter().getCount());
}
showDialogHelp();
}
示例2: onCreate
import com.wenchao.cardstack.CardStack; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_my);
mCardStack = (CardStack) findViewById(R.id.container);
mCardStack.setContentResource(R.layout.card_content);
// mCardStack.setStackMargin(20);
mCardAdapter = new CardsDataAdapter(getApplicationContext());
mCardAdapter.add("test1");
mCardAdapter.add("test2");
mCardAdapter.add("test3");
mCardAdapter.add("test4");
mCardAdapter.add("test5");
mCardAdapter.add("test6");
mCardAdapter.add("test7");
mCardStack.setAdapter(mCardAdapter);
if (mCardStack.getAdapter() != null) {
Log.i("MyActivity", "Card Stack size: " + mCardStack.getAdapter().getCount());
}
}