Android編程布局控件之AbsoluteLayout用法實(shí)例分析
本文實(shí)例講述了Android編程布局控件之AbsoluteLayout用法。分享給大家供大家參考,具體如下:
AbsoluteLayout是絕對(duì)布局管理器,指的是指定組件的左上角絕對(duì)坐標(biāo)來指定組件的布局
<?xml version="1.0" encoding="utf-8"?> <AbsoluteLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="按鈕1" android:layout_x="0px" android:layout_y="0px" /> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="按鈕2" android:layout_x="20px" android:layout_y="20px" /> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="按鈕3" android:layout_x="40px" android:layout_y="40px" /> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="按鈕4" android:layout_x="60px" android:layout_y="60px" /> </AbsoluteLayout>
運(yùn)行效果截圖如下:
希望本文所述對(duì)大家Android程序設(shè)計(jì)有所幫助。
相關(guān)文章
Android 用SQLite實(shí)現(xiàn)事務(wù)的方法
本篇文章小編為大家介紹,Android用SQLite實(shí)現(xiàn)事務(wù)的方法。需要的朋友參考下2013-04-04Android 將文件下載到指定目錄的實(shí)現(xiàn)代碼
本文通過實(shí)例代碼給大家介紹了android將文件下載到指定目錄的實(shí)現(xiàn)方法,非常不錯(cuò),具有參考借鑒價(jià)值,需要的的朋友參考下吧2017-06-06Android提高Service優(yōu)先級(jí)的方法分析
這篇文章主要介紹了Android提高Service優(yōu)先級(jí)的方法,簡單講述了Service優(yōu)先級(jí)的功能,并對(duì)比分析了1.5與1.0設(shè)置Service的技巧,需要的朋友可以參考下2016-06-06Android實(shí)現(xiàn)彈窗進(jìn)度條效果
這篇文章主要為大家詳細(xì)介紹了Android實(shí)現(xiàn)彈窗進(jìn)度條效果,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2018-05-05Android OpenGL ES 實(shí)現(xiàn)抖音傳送帶特效(原理解析)
這篇文章主要介紹了Android OpenGL ES 實(shí)現(xiàn)抖音傳送帶特效,抖音傳送帶特效推出已經(jīng)很長一段時(shí)間了,前面也實(shí)現(xiàn)了下,最近把它整理出來了,如果你有仔細(xì)觀測傳送帶特效,就會(huì)發(fā)現(xiàn)它的實(shí)現(xiàn)原理其實(shí)很簡單,需要的朋友可以參考下2022-07-07Android啟動(dòng)內(nèi)置APK和動(dòng)態(tài)發(fā)送接收自定義廣播實(shí)例詳解
這篇文章主要介紹了Android啟動(dòng)內(nèi)置APK和動(dòng)態(tài)發(fā)送接收自定義廣播實(shí)例詳解的相關(guān)資料,需要的朋友可以參考下2017-06-06Android懸浮窗的實(shí)現(xiàn)(易錯(cuò)點(diǎn))
現(xiàn)在很多應(yīng)用都使用到懸浮窗,例如微信在視頻的時(shí)候,點(diǎn)擊Home鍵,視頻小窗口仍然會(huì)在屏幕上顯示。下面小編來實(shí)現(xiàn)一下android 懸浮窗,感興趣的朋友跟隨小編一起看看吧2019-10-10