wrap_content
wrap_content指示您的视图将其大小调整为内容所需的尺寸。
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/purple_200"
android:hint="请输入内容" />
EditText 控件高度和宽度随着字节的内容而变化。

match_parent
match_parent指示您的视图尽可能采用其父视图组所允许的最大尺寸。
<EditText
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@color/purple_200"
android:hint="请输入内容" />
EditText 控件高度和宽度随父视图而变化。

原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/tech/pnotes/288476.html