本文整理了Java中android.support.v7.widget.CardView.<init>()
方法的一些代码示例,展示了CardView.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。CardView.<init>()
方法的具体详情如下:
包路径:android.support.v7.widget.CardView
类名称:CardView
方法名:<init>
暂无
代码示例来源:origin: mylhyl/Android-CircleDialog
protected CardView buildCardView() {
CardView cardView = new CardView(mContext);
cardView.setCardElevation(0f);
cardView.setCardBackgroundColor(Color.TRANSPARENT);
cardView.setRadius(mParams.dialogParams.radius);
return cardView;
}
代码示例来源:origin: mylhyl/Android-CircleDialog
@Override
protected void buildRootView() {
LinearLayout rootItem = new LinearLayout(mContext);
rootItem.setOrientation(LinearLayout.VERTICAL);
CardView cardView = new CardView(mContext);
cardView.setCardElevation(0f);
cardView.setCardBackgroundColor(Color.TRANSPARENT);
cardView.setRadius(mParams.dialogParams.radius);
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT, 1);
//设置列表与按钮之间的下距离
layoutParams.bottomMargin = mParams.itemsParams.bottomMargin;
cardView.setLayoutParams(layoutParams);
rootItem.addView(cardView);
LinearLayout rootCardViewByLinearLayout = buildLinearLayout();
cardView.addView(rootCardViewByLinearLayout);
mRoot = rootItem;
}
代码示例来源:origin: shiburagi/Drawer-Behavior
@Override
public void addView(View child) {
if (child instanceof NavigationView) {
super.addView(child);
} else {
CardView cardView = new CardView(getContext());
cardView.setRadius(0);
cardView.addView(child);
cardView.setCardElevation(0);
frameLayout.addView(cardView);
}
}
代码示例来源:origin: geniusgithub/AndroidDialer
new View(context),
PhoneCallDetailsViews.createForTest(context),
new CardView(context),
new TextView(context),
new ImageView(context),
代码示例来源:origin: lopei/collageview
ViewGroup photoFrame;
if (useCards) {
photoFrame = new CardView(getContext());
} else {
photoFrame = new FrameLayout(getContext());
内容来源于网络,如有侵权,请联系作者删除!