zoukankan      html  css  js  c++  java
  • android:clipToPadding 和 android:clipChildren

    android:clipToPadding

    如果设置为true,表示在Padding位置不绘制,默认为true,于是可以理解为绘制的时候保留padding。

    当listview gridview scrollview 设置android:clipToPadding = false时,向上滑动时Padding将会被填充。

    ---------------------------------------------涯上月灬指香专用分隔线-------------------------------------------------------------------

    android:clipChild表示父容器是否允许切割子控件

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:clipChildren="false"
    android:orientation="vertical" >

    <android.support.v4.view.ViewPager
    android:id="@+id/view_pager"
    android:layout_width="match_parent"
    android:layout_height="0dip"
    android:layout_weight="1.0" />

    <LinearLayout
    android:layout_width="match_parent"
    android:layout_height="48dip"
    android:background="#B0C4DE"
    android:orientation="horizontal" >

    <ImageView
    android:layout_width="0dip"
    android:layout_height="fill_parent"
    android:layout_weight="1.0"
    android:scaleType="fitCenter"
    android:src="@drawable/ic_launcher" />

    <ImageView
    android:layout_width="0dip"
    android:layout_height="fill_parent"
    android:layout_weight="1.0"
    android:scaleType="fitCenter"
    android:src="@drawable/ic_launcher" />

    <ImageView
    android:layout_width="0dip"
    android:layout_height="64dip"
    android:layout_gravity="bottom"
    android:layout_weight="1.0"
    android:scaleType="fitCenter"
    android:src="@drawable/ic_launcher" />

    <ImageView
    android:layout_width="0dip"
    android:layout_height="fill_parent"
    android:layout_weight="1.0"
    android:scaleType="fitCenter"
    android:src="@drawable/ic_launcher" />

    <ImageView
    android:layout_width="0dip"
    android:layout_height="fill_parent"
    android:layout_weight="1.0"
    android:scaleType="fitCenter"
    android:src="@drawable/ic_launcher" />
    </LinearLayout>

    </LinearLayout>

    参考博客:http://www.cnblogs.com/over140/p/3508335.html

  • 相关阅读:
    session概述
    Flask实现登录功能【附完整Demo】(转)
    Python __repr__()方法:显示属性(转)
    Python使用SQLAlchemy连接数据库CRUD
    网络基础知识集合
    面向切面编程AOP
    SQL基础 insert table_name_1 (field1,field2,...) select value1,value2,... from table_name_2 ...
    java中char类型的变量为什么可以赋值为整型数字?
    iOS应用生命周期
    视图生命周期与视图控制器生命周期
  • 原文地址:https://www.cnblogs.com/android-er/p/5618719.html
Copyright © 2011-2022 走看看