Loading...

Android UI設計距離課題

Temperature: 0 °C

Mark ChangMark Chang
author_tools

layout_marginTop指定該屬性所在控件距離上方的位置空間。

layout_marginBottom指定該屬性所在控件距離下方的位置空間。

layout_marginLeft指定該屬性所在控件距離左邊的位置空間。

layout_marginRight指定該屬性所在控件離距右邊的位置空間。

例如

android:id="@+id/text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/radioGroup"
android:layout_centerHorizontal="true"
android:layout_marginTop="27dp"//距離上方的位置空間
android:layout_marginBottom="27dp"//距離下方的位置空間
android:text="測量你的健康數據"
android:textSize="20sp" />


Android UI設計距離課題
補充如果要讓文字置中使用android:gravity屬性,以下方式
android:gravity="center_horizontal"

以上紀錄
 

https://innstory.com/story-Android_UI設計距離課題-1858
Android

Prev
 centos查看對外開放了那些port的指令

Next
Android_禁止螢幕旋轉 

About the Author

Mark Chang

離不開電腦的宅男

Visitor message

Leave some footprints to prove that you visited me

Recommended reading

Author's other related stories

使用CSS 讓ul li 橫向水平

使用CSS 讓ul li 橫...

好吧,其實這個css常在用,但我每次都沒特別紀錄,然後每次又忘記然後又要Google。 其實主要就是...

CSSobject-fit 屬性用於指定應如何調整 img或video的大小以適合其容器

CSSobject-fit ...

在UI排版時常會遇到一個問題,後台上傳的圖片比例無法符合前台顯示的DIV容器。 以前我比較常用的方式...

如何修復Undefined Index錯誤訊息

如何修復Undefined ...

錯誤的原因是因為當我們使用 $GET 和 $POST 方法取得變數時會發生這種情況,雖然PHP的部分...

Please select an option

error

Hi, thank you for your participation, but you cannot vote repeatedly~

Join innstory now and start recording your story.

"Innstory" is a place to store stories. We are committed to becoming a warm platform. Deepening the bonds between people is our direction.
We are convinced that the blockchain between people is not just a cold calculation. Join us now.

Wrong format