學習Android studio 個人總結小經驗

2021-07-11 19:22:15 字數 1264 閱讀 8401

android:layout_below=」@+id/first」 //在某元素的的下方;

android:layout_alignbottom=」@+id/first」//本元素的下邊緣和某元素的的下邊緣對齊;

android:layout_margintop,離某元素上邊緣的距離

android:layout_torightof=」@+id/button4」/>把這個空間放在button4的右邊

android:layout_alignparentbottom=」true」把空間放在父控制項的底部

下面是relativelayout各個屬性

android:layout_above=」@id/***」 –將控制項置於給定id控制項之上

android:layout_below=」@id/***」 –將控制項置於給定id控制項之下

android:layout_toleftof=」@id/***」 –將控制項的右邊緣和給定id控制項的左邊緣對齊

android:layout_torightof=」@id/***」 –將控制項的左邊緣和給定id控制項的右邊緣對齊

android:layout_alignleft=」@id/***」 –將控制項的左邊緣和給定id控制項的左邊緣對齊

android:layout_aligntop=」@id/***」 –將控制項的上邊緣和給定id控制項的上邊緣對齊

android:layout_alignright=」@id/***」 –將控制項的右邊緣和給定id控制項的右邊緣對齊

android:layout_alignbottom=」@id/***」 –將控制項的底邊緣和給定id控制項的底邊緣對齊

android:layout_alignparentleft=」true」 –將控制項的左邊緣和父控制項的左邊緣對齊

android:layout_alignparenttop=」true」 –將控制項的上邊緣和父控制項的上邊緣對齊

android:layout_alignparentright=」true」 –將控制項的右邊緣和父控制項的右邊緣對齊

android:layout_alignparentbottom=」true」 –將控制項的底邊緣和父控制項的底邊緣對齊

android:layout_centerinparent=」true」 –將控制項置於父控制項的中心位置

android:layout_centerhorizontal=」true」 –將控制項置於水平方向的中心位置

android:layout_centervertical=」true」 –將控制項置於垂直方向的中心位置

android studio 學習之一

一 簡介 android studio 是乙個android整合開發工具,基於intellij idea.類似 eclipse adt,android studio 提供了整合的 android 開發工具用於開發和除錯。官網 二 安裝問題 1.unable to access android sdk...

AndroidStudio學習筆記(OkHttp)

相信剛開始學習網路請求就會接觸到okhttp 使用需要新增依賴和許可權 在build.gradle檔案中新增 在androidmanifest.xml檔案中新增網路許可權 android.permission.internet 接著就可以建立子執行緒進行網路請求 傳送網路請求訪問介面 注意區分 和,...

學習筆記 android studio獲取座標

一 獲取許可權!這個比較重要 二 寫activity的 private locationmanager locationmanager private string provider 使用locationmanager來獲取座標,provider 位置提供器 三 經過 判斷許可權 獲取許可權 獲取位...