2019-05-16

<?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">
    <!-- 在容器中央 -->
    <View
        android:id="@+id/view1"
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:background="#444"
        android:layout_centerInParent="true"/>
    <!-- 在中間方塊的上方 -->
    <View
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:background="#666"
        android:layout_above="@id/view1"
        android:layout_centerHorizontal="true"/>
    <!-- 在中間方塊的下方 -->
    <View
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:background="#666"
        android:layout_below="@id/view1"
        android:layout_centerHorizontal="true"/>
    <!-- 在中間方塊的左邊 -->
    <View
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:background="#888"
        android:layout_toLeftOf="@id/view1"
        android:layout_centerVertical="true"/>
    <!-- 在中間方塊的右邊 -->
    <View
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:background="#888"
        android:layout_toRightOf="@id/view1"
        android:layout_centerVertical="true"/>

</RelativeLayout>
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • 前幾天讀到傅盛的一篇文章《傅盛認(rèn)知三部曲之一:所謂成長(zhǎng)就是認(rèn)知升級(jí)》,羅振宇把這篇文章命名為《未來(lái)一切競(jìng)爭(zhēng)都是認(rèn)知...
    良小哲閱讀 447評(píng)論 0 2
  • 轉(zhuǎn)眼三月中旬,我總想記錄點(diǎn)什么,卻總感覺(jué)不知在忙碌著什么,就像朱自清在《匆匆》中說(shuō)的:不曾留下游絲樣的痕跡...
    亻豈閱讀 427評(píng)論 0 0
  • 1.DE PROFUNDIS CLAMAVI~深き淵より我叫びぬ~1愚考、あやまち、罪。私の心に潛む悪意が今の私を...
    波沙諾瓦閱讀 2,310評(píng)論 0 1
  • 2019年對(duì)我來(lái)說(shuō),又是一個(gè)很有意義的一年,因?yàn)槟瓿跷易隽艘粋€(gè)重大突破:參加線下三天兩夜的學(xué)習(xí)。 在很多朋友看來(lái),...
    燕靈閱讀 891評(píng)論 3 16

友情鏈接更多精彩內(nèi)容