国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網(wǎng)站 > 建站經(jīng)驗(yàn) > 正文

Android開發(fā)常用屬性大_全

2019-11-02 15:20:21
字體:
供稿:網(wǎng)友

 1、android string.xm l 文字中間加入空格

  android string.xm l前后加空格的技巧

  <string name="password">密    碼</string>

    這個(gè)就代表著空格

 

  2、文字單行顯示

  android layout布局文件中TextView、EditView單行顯示和輸入

  <TextView android:singleLine="true"/>:文本單行顯示

  <EditView android:singleLine="true"/>:文本輸入框單行輸入

  android:singleLine="true" 單行顯示

 

  3、EditView輸入框?qū)傩?/p>

  android layout布局文件中EditView密碼輸入和數(shù)字輸入控制

  <EditView android:password="true"/>:文本輸入框的輸入數(shù)據(jù)不直接顯示

  <EditView android:numeric="integer"/>:文本輸入框的輸入數(shù)據(jù)只能為數(shù)字

  android:numeric="integer" 數(shù)字輸入控制,android:password="true":密碼內(nèi)容隱藏

 

  4、EditView輸入內(nèi)容提示

  android layout布局文件中EditView輸入內(nèi)容提示

  <EditView android:hint="@string/in put_pwd"/>:文本輸入框內(nèi)顯示提示內(nèi)容

  android:hint="@string/in put_pwd"當(dāng)輸入框獲得焦點(diǎn)后,默認(rèn)顯示的內(nèi)容消失

 

  5、EditView輸入長(zhǎng)度控制

  android layout布局文件中EditView輸入長(zhǎng)度控制

  <EditView android:minLength="5"/>:設(shè)置文本輸入框的最小輸入量

  <EditView android:maxLength="10"/>:設(shè)置文本輸入框的最大輸入量

  minLength、maxLength:輸入長(zhǎng)度控制

 

  6、控件顯示控制

  android layout布局文件中控件顯示控制

  android:visibility="gone":控件蕩然無存

  android:visibility="invisible":控件不可見,但存在

  android:visibility="visible":控件正常顯示,系統(tǒng)默認(rèn)值

 

  7、布局文件中的排版控制

  android layout布局文件中RelativeLayout、LinearLayout、ListView內(nèi)部控件排版控制

  android:orientation="vertical":垂直布局

  android:orientation="horizontal":水平布局

 

  8、應(yīng)用橫屏、豎屏顯示

  android AndroidManifest.xm l文件設(shè)置應(yīng)用顯示方向

破曉電影網(wǎng)[www.aikan.tv/special/poxiaodianyingwang/]

  android:screenOrientation="portrait":豎屏顯示

 

  9、去標(biāo)題控制

  android AndroidManifest.xm l文件設(shè)置Activity無標(biāo)題

  android:theme="@android:style/Theme.NoTitleBar":不顯示標(biāo)題

 

  10、android布局屬性

  RelativeLayout用到的一些重要的屬性,屬性值為true或false

  android:layout_centerHrizontal 水平居中

  android:layout_centerVertical 垂直居中

  android:layout_centerInparent 相對(duì)于父元素完全居中

  android:layout_alignParentBottom 貼緊父元素的下邊緣

  android:layout_alignParentLeft 貼緊父元素的左邊緣

發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 油尖旺区| 金秀| 法库县| 萨迦县| 全州县| 大姚县| 柳河县| 塘沽区| 本溪| 元谋县| 新安县| 宣化县| 连江县| 荥经县| 东城区| 周宁县| 河北省| 介休市| 法库县| 克拉玛依市| 姜堰市| 台州市| 天台县| 宽甸| 望城县| 阿瓦提县| 类乌齐县| 慈溪市| 桂平市| 沁水县| 乐昌市| 西和县| 扬州市| 长汀县| 大英县| 宜州市| 壤塘县| 沽源县| 宁化县| 宕昌县| 木兰县|