달력

4

« 2024/4 »

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
2013. 6. 12. 20:32

안드로이드 - weightsum 안드로이드 이야기2013. 6. 12. 20:32

728x90
반응형

안드로이드 - weightsum

parent에 weight_sum을 1로 정하시고, child에 layout_weight 을 .7로 주면.. 70%를 차지하게 됩니다.


<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

    android:orientation="vertical"

    android:layout_width="fill_parent"

    android:layout_height="fill_parent"

    android:weightSum="1"

    android:background="#ffffffff">

<LinearLayout  

    android:layout_width="fill_parent" 

    android:layout_height="0dip"

    android:layout_weight="0.7"

    android:background="#ff000000"/>

</LinearLayout>


안드로이드 한지, 2년만에 알게된, 새로운 사실... -_-;;;


출처 : http://www.androidpub.com/1507297

728x90
반응형
:
Posted by mapagilove