65.Card View
Posted L1nus
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了65.Card View相关的知识,希望对你有一定的参考价值。
First . File -> Project Structure -> CardView(come.android.cardview:v7.25.0.0;
Second. drawable -> right click on the folder -> and then select batch drawable importer.-> rename target name;
Third . new layout resource .named fragment_cake. rewrite the root element android.support.v7.widget.CardView
Fourth. xmlns:card_view = "http://schemas.android.com/apk/res-auto" .cardview = CornerRadius = "4dp"
Fifth . Creat FragmentCake.class,
public FragmentCake extends Fragment{
public FragmentCake(){
}
@Nullable
@override
public View onCreatView(LayoutInflater inflater ,@Nullable viewGroup container,@Nullable Bundle saveInstancestate){
return inflater.inflate(R.layout.fragment_cake,container,false);
}
}
Six. Rewrite activity_main.xml
<fragment
tools:layout = "@layout/fragment_cake"
android:id = "@+id/fragmen"
android:name = "com.bodor.fragmentcake"
android:layout_width = "match_parent"
android:layout_height = "wrap_content"
以上是关于65.Card View的主要内容,如果未能解决你的问题,请参考以下文章