【问题标题】:what is difference between fill_parent and match_parent in android [duplicate]android中的fill_parent和match_parent有什么区别[重复]
【发布时间】:2013-04-02 03:36:29
【问题描述】:
ImageView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
/>

     <ImageView
            android:id="@+id/imageView1"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
 />

【问题讨论】:

标签: android android-layout


【解决方案1】:

两者是相同的(在 API 级别 8+ 中)。

fill_parent: 视图应该和它的父级一样大

【讨论】:

    【解决方案2】:

    这已经在 SO 上被问过好几次了,这里有一个类似的问题:difference between fill_parent and match_parent in android

    从 API 级别 8 开始,fill_parent 标记已重命名为 match_parent。

    【讨论】:

      猜你喜欢
      • 2011-08-11
      • 2012-06-29
      • 2012-04-14
      • 2010-09-30
      • 1970-01-01
      • 2013-06-03
      • 1970-01-01
      • 1970-01-01
      • 2013-04-04
      相关资源
      最近更新 更多