資料載入中

胡言亂語

Android UI設計距離課題

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"

以上紀錄
 

  • 控件距離上方的位置空間設定
  • 控件距離下方的位置空間調整
  • 控件距離左邊的位置空間配置
  • 控件距離右邊的位置空間設置
  • 文字置中的android屬性使用方法
https://innstory.com/story-Android-UI設計距離課題-1858

上一篇
 centos查看對外開放了那些port的指令

下一篇
Android禁止螢幕旋轉 

發表留言

作者簡介

離不開電腦的宅男


推薦閱讀

作者其他相關類別故事

如何將mysql table auto_increment重設

如何將mysql table…

Mark Chang 7 年又 165 天 2.3K

資料表裡的資料加加減減,一不小心突然驚覺當初的欄位長度設定的不夠⊙⊙ 當然,你可以選擇再把欄位長度...

利用 .htaccess 限制可瀏覽ip來源

利用 .htaccess 限…

Mark Chang 7 年又 95 天 1.7K

要如何限制某個資料夾內容只能給特定IP讀取? 這個部分其實可以透過.htaccess快速實現~ 首先...

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

將Google字型fonts…

Mark Chang 4 年又 192 天 1.6K

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