码迷,mamicode.com
首页 > 移动开发 > 详细

android:clipToPadding 和 android:clipChildren

时间:2016-06-26 23:54:23      阅读:477      评论:0      收藏:0      [点我收藏+]

标签:

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

android:clipToPadding 和 android:clipChildren

标签:

原文地址:http://www.cnblogs.com/android-er/p/5618719.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!