Android include layout的时候,发现被include的layout比mainlayout要小一圈?怎么能一样大呢?
<RelativeLayoutxmlns:android="http://schemas.android.com/apk/res/android"xmlns:tools=...
<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"
android:gravity="top"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<include
android:id="@+id/include_lay_game"
layout="@layout/game"/>
<include
android:id="@+id/include_lay_introduce"
layout="@layout/introduce"/>
<include
android:id="@+id/include_lay_report"
layout="@layout/report"/>" 展开
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="top"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<include
android:id="@+id/include_lay_game"
layout="@layout/game"/>
<include
android:id="@+id/include_lay_introduce"
layout="@layout/introduce"/>
<include
android:id="@+id/include_lay_report"
layout="@layout/report"/>" 展开
2个回答
展开全部
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
这4个去掉!
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
这4个去掉!
追问
为什么这4行注释掉以后,下面一行就报错?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询