亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

android - 怎麼把圖片設(shè)定在兩個佈局的邊緣上
淡淡煙草味
淡淡煙草味 2017-05-16 13:34:07
0
2
1023

#如圖怎麼設(shè)定這樣的效果,圖片在兩個佈局邊緣上這個activity下面有一個正在播放影片的activity,我用幀佈局已設(shè)定透明就全透明了。

淡淡煙草味
淡淡煙草味

全部回覆(2)
習(xí)慣沉默

不知道是不是這個效果

代碼:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@android:color/holo_green_dark"
    android:clipChildren="false">


    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:layout_alignParentBottom="true"
        android:background="@android:color/darker_gray">
        <View
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"/>
        <ImageView
            android:layout_width="100dp"
            android:layout_height="100dp"
            android:layout_gravity="bottom"
            android:src="@mipmap/ic_launcher"/>
        <View
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"/>
    </LinearLayout>
</RelativeLayout>

關(guān)鍵在這句代碼:

android:clipChildren="false"

解釋:

是否限制子View在其範(fàn)圍內(nèi) 預(yù)設(shè)為true

PHPzhong

使用錨點。範(fàn)例可以網(wǎng)路搜尋或是Studio中File-New-Activity-ScrollingActivity建立一個自備的預(yù)設(shè)模板,裡面版面就是

最新下載
更多>
網(wǎng)站特效
網(wǎng)站源碼
網(wǎng)站素材
前端模板