zoukankan      html  css  js  c++  java
  • 关于android LinearLayout的比例布局(转载)

    关于android LinearLayout的比例布局,主要有以下三个属性需要设置:

         1,android:layout_width,android:layout_height,android:layout_weight三个值

         2,当为水平布局时,android:layout_height=“0dp",当为垂直布局时,android:layout_width="0dp",android:layout_weight为所占比重。

         3,给个示例如下:

    <LinearLayout
                android:orientation="horizontal"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:layout_weight="1">
                <TextView
                        android:layout_width="0dp"
                        android:layout_height="fill_parent"
                        android:layout_weight="1"
                        android:background="#aa0000"
                        android:gravity="center"
                        android:text="1111111111111111111111111111111111111111111"/>
                <TextView
                        android:layout_width="0dp"
                        android:layout_height="fill_parent"
                        android:layout_weight="2"
                        android:background="#00aa00"
                        android:gravity="center"
                        android:text="2"/>
                <TextView
                        android:layout_width="0dp"
                        android:layout_height="fill_parent"
                        android:layout_weight="3"
                        android:background="#0000aa"
                        android:gravity="center"
                        android:text="3"/>
        </LinearLayout>
    效果:

    原文摘自: http://blog.csdn.net/winson_jason/article/details/8444958

  • 相关阅读:
    利用高斯金字塔制作图像显著图
    python实现图像高斯金字塔
    使用差分金字塔提取图像边缘 python实现
    使用色彩追踪和形态学运算得到图像中感兴趣区域
    图像掩膜讲解
    图像色彩追踪
    手动绘制方向梯度直方图(HOG)
    Zhang-Suen 图像细化算法python实现
    hilditch图像细化算法python实现
    P2256 一中校运会之百米跑
  • 原文地址:https://www.cnblogs.com/YangBinChina/p/3638093.html
Copyright © 2011-2022 走看看