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

Android 禁止螢幕旋轉

Android 禁止螢幕旋轉...

首先找到AndroidManifest.xml檔案 位置在app/manifests/路徑底下 在 ...

PHP無法保存SESSION的問題

PHP無法保存SESSION...

一天,客戶反應系統後台無法登入。 而這問題是發生在客戶電腦更換了IP位置。 而我這邊也只是開放新的I...

將Google字型fonts.googleapis.com新增到CSP header 中

將Google字型fonts...

Content Security Policy (CSP) 內容安全政策 主要用來限制網頁中對外部的...

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