Android開發(fā)筆記 今天學(xué)到的一些屬性
更新時(shí)間:2012年11月07日 10:23:33 作者:
離開實(shí)驗(yàn)室之前再貼上今天下午自己學(xué)到的一些基礎(chǔ)知識 上午干嘛了呢,忙著數(shù)據(jù)恢復(fù)呢
1.最后程序打包的時(shí)候,res文件夾中的文件只有用到的時(shí)候才會打包進(jìn)去,而assets文件夾中的文件無論是否用到都要打包進(jìn)去
2.安卓主要依靠xml文件來布局,否則textView多的時(shí)候布局起來會比較混亂
3.android:singleLine屬性為true表示文本在一行顯示
android:ellipsize屬性:設(shè)置當(dāng)文本過長時(shí)該如何顯示(顯示省略號)start、end、middle分別設(shè)置省略號的位置,marquee表示以跑馬燈的形式展示
android:autoLink=“web/email/phone/all”設(shè)置超鏈
android:focusable=“true/false”是否可以獲取焦點(diǎn)
ndroid:focusableInTouchMode="true" 在觸摸的模式下獲得焦點(diǎn)
4.控件:
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>默認(rèn)是要聚焦的,解決方法是在它前面添加一個edittext控件,寬和高設(shè)為0,
android:maxLength="3"屬性限制字符數(shù)量,
android:singleLine="false"使其變?yōu)槎嘈形谋究?
android:inputType="number"設(shè)置輸入類型
android:hint="13525505014"設(shè)置默認(rèn)顯示信息
2.安卓主要依靠xml文件來布局,否則textView多的時(shí)候布局起來會比較混亂
3.android:singleLine屬性為true表示文本在一行顯示
android:ellipsize屬性:設(shè)置當(dāng)文本過長時(shí)該如何顯示(顯示省略號)start、end、middle分別設(shè)置省略號的位置,marquee表示以跑馬燈的形式展示
android:autoLink=“web/email/phone/all”設(shè)置超鏈
android:focusable=“true/false”是否可以獲取焦點(diǎn)
ndroid:focusableInTouchMode="true" 在觸摸的模式下獲得焦點(diǎn)
4.控件:
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>默認(rèn)是要聚焦的,解決方法是在它前面添加一個edittext控件,寬和高設(shè)為0,
android:maxLength="3"屬性限制字符數(shù)量,
android:singleLine="false"使其變?yōu)槎嘈形谋究?
android:inputType="number"設(shè)置輸入類型
android:hint="13525505014"設(shè)置默認(rèn)顯示信息
相關(guān)文章
Android 通過API獲取數(shù)據(jù)庫中的圖片文件方式
這篇文章主要介紹了Android 通過API獲取數(shù)據(jù)庫中的圖片文件方式,具有很好的參考價(jià)值,希望對大家有所幫助。一起跟隨小編過來看看吧2020-03-03Android 中ScrollView嵌套GridView,ListView的實(shí)例
這篇文章主要介紹了Android 中ScrollView嵌套GridView,ListView的實(shí)例的相關(guān)資料,需要的朋友可以參考下2017-03-03flutter實(shí)現(xiàn)底部導(dǎo)航欄
這篇文章主要為大家詳細(xì)介紹了flutter實(shí)現(xiàn)底部導(dǎo)航欄,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2022-03-03Android自定義View之簡約風(fēng)歌詞控件實(shí)戰(zhàn)指南
一些接觸Android不久的朋友對自定義View都有一絲畏懼感,總感覺這是一個比較高級的技術(shù),但其實(shí)自定義View并不復(fù)雜,有時(shí)候只需要簡單幾行代碼就可以完成了,這篇文章主要給大家介紹了關(guān)于Android自定義View之簡約風(fēng)歌詞控件的相關(guān)資料,需要的朋友可以參考下2021-07-07Android自定義ProgressDialog進(jìn)度等待框
這篇文章主要介紹了Android自定義ProgressDialog進(jìn)度等待框,通過本文大家可以嘗試?yán)肁ndroid自定義ProgressDialog,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2016-01-01