我的意思是,我想在html中制作一个元素。你知道,没有什么不对,它有自己的分工。但是在我所有的活动中,看起来都像是在一个地方。我怎样才能做到这一点?使元素变得牢固?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:orientation="vertical">
<include
android:id="@+id/toolbar"
layout="@layout/toolbar"/>
</LinearLayout>
<FrameLayout
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.blunderer.materialdesignlibrary.views.CardView
android:id="@+id/cardview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:mdl_title="CardView"
app:mdl_description="A Basic CardView"
app:mdl_normalButton="Normal"
app:mdl_highlightButton="Highlight"
app:mdl_imagePosition="none"
android:layout_margin="20dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="0dp"/>
<com.blunderer.materialdesignlibrary.views.CardView
android:id="@+id/cardview2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:mdl_title="127.0.0.1:8080"
app:mdl_description="Konum: Yerel\nPing: 0 ms"
app:mdl_imagePosition="none"
android:layout_margin="20dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="0dp"/>
</FrameLayout>
</RelativeLayout>
这是我的xml。
分享你的xml文件 –