Android常用控制項之EditText

2021-07-31 06:07:40 字數 633 閱讀 3079

addtextchangedlistener :文字變化觀察者

setoneditoractionlistener: 鍵盤回車事件

有時候輸入完成,需要關閉輸入法,不然使用者體驗效果不好

etqueryphone.setoneditoractionlistener(new textview.oneditoractionlistener() 

});

1.在res/anim下建立shake.xml檔案

<?xml version="1.0" encoding="utf-8"?>

2.在res/anim下建立cycle_7.xml

<?xml version="1.0" encoding="utf-8"?>

3.使用時

animation shake = animationutils.loadanimation(queryaddressactivity.this, r.anim.shake);

etqueryphone.startanimation(shake);

Android 學習筆記之常用控制項

1 listview 是一套檢視 view 元件 component 2 listview 通常以列表的形式在 android 客戶端顯示一些列表選項 item 每個列表選項擁有同樣的布局 3 為了提公升 listview 的效能,在設計 listview 時,禁用了其 addview 方法 4 l...

android常用控制項

一.textview 屬性 1.android text 設定文字框的文字內容 3.android singleline 為true文字框不會換行 已過時 4.android lines 預設佔幾行 5.android minlines 最少佔幾行 6.android textcolor 字型顏色 ...

Android常用控制項

toast 吐絲框 是android中的一種簡易的訊息提示框 scaletype 縮放型別 scaletype的屬性值有 matrix fitxy fitstart fitcenter fitend center centercrop centerinside 用得最多還是fitxy fitstar...