Android互動式視覺設計控制項二

2021-09-12 19:46:39 字數 1682 閱讀 9134

常用屬性:

textview:

android:text=「文字」

android:textsize=「20sp」

android:textcolor="#ff0"

android:textstyle=「bold」

typeface.bold //粗體

android:lines=「3」

android:singleline=「true」

android:typeface=「monospace」 //設定字型

常用的字型型別名稱還有:

案例:(1)跑馬燈

1、textview調出跑馬燈效果

android:ellipsize=「marquee」

2、textview獲取焦點

android:focusable=「true」

android:focusableintouchmode=「true」

(2)分割線

android:hint=「請輸入qq」

android:editable=「true」

android:maxlength=「50」 設定最大的字數

屬性:同上

事件:onclicklistener

4.imageview

屬性:android:src="@drawable/ic_launcher"

android:scaletype="" 縮放模式

富文字:

二.設定控制項字的顏色

settextcolor(0xff0000ff);

settextcolor(color.rgb(255, 255, 255));

settextcolor(color.parsecolor("#ffffff"));

settextcolor(this.getresources().getcolor(r.color.blue));

settextcolor(android.graphics.color.blue);

互動式介面

互動式介面 啟動終端後,在終端裝置附加乙個互動式應用程式 runlevel 顯示當前執行的模式 root vm 163 113 centos runlevel n 3init 3 切換至命令列 init 0 停機 千萬不能把initdefault 設定為0 init 1 單使用者模式 init 2 ...

互動式 非互動式,登入式 非登入式Shell

互動式shell和非互動式shell 互動式模式 在終端上執行,shell等待你的輸入,並且立即執行你提交的命令。這種模式被稱作互動式是因為shell與使用者進行互動。這種模式也是大多數使用者非常熟悉的 登入 執行一些命令 退出。當你退出後,shell也終止了。非互動式模式 以shell scrip...

互動式 vs 非互動式 登入式 vs 非登入式

方式 區別區分方法 互動式與使用者互動 echo 返回值有i 非互動式 與script互動 echo 返回值沒有i 方式 登入區別 退出區別 區分方法 登入式需要username pwd logout exit echo 0 返回是 bash 非登入式 無需要username pwd exit ec...