当前位置: 代码迷 >> Android >> 求解:Android中android:layout_width与android:width有什么区别?解决方法
  详细解决方案

求解:Android中android:layout_width与android:width有什么区别?解决方法

热度:68   发布时间:2016-05-01 22:21:02.0
求解:Android中android:layout_width与android:width有什么区别?
比如下面的代码:
 
  <TextView android:id="@+id/item3" 
  android:text="费用(元)" 

  android:width="100dip" 
  android:layout_width="wrap_content"

  android:layout_height="fill_parent"
  /> 

 其中的 
android:layout_width 与 android:width 
有什么区别呢?
多谢!

------解决方案--------------------
android:width 支持 
px (pixels)像素
dip (device independent pixels)设备独立像素
sp (scaled pixels — best for text size)放大像素--对文本大小最好
pt (points)点
in (inches)英寸
mm (millimeters)毫米
  相关解决方案