日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > Android >内容正文

Android

Android_神奇的android:clipChildren属性

發布時間:2025/5/22 Android 146 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Android_神奇的android:clipChildren属性 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

正文

一、效果圖

看到這個圖時你可以先想想如果是你,你怎么實現這個效果。馬上想到用RelativeLayout?NO,NO,NO,,,

?

二、實現代碼

<?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>

? 代碼說明:

1、只需在根節點設置android:clipChildren為false即可,默認為true

2、可以通過android:layout_gravity控制超出的部分如何顯示。

3、android:clipChildren的意思:是否限制子View在其范圍內

?

三、 其他

在做動畫的時候非常有用,博大精深啊。。。。。。

?

轉:http://www.cnblogs.com/over140/p/3508335.html

總結

以上是生活随笔為你收集整理的Android_神奇的android:clipChildren属性的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。