摘要:
動畫類型Android的animation由四種類型組成Android動畫模式Animation主要有兩種動畫模式:一種是tweened animation(漸變動畫)XML中JavaCodealphaAlphaAnimationscaleScaleAnimation一種是frame by frame(畫面轉(zhuǎn)換動畫)XML中JavaCodetranslateTranslateAnimationrotateRotateAnimation如何在XML文件中定義動畫① 打開Eclipse,新建Android工程② 在res目錄中新建anim文件夾③ 在anim目錄中新建一個myanim.xml(注意
閱讀全文
摘要:
其中在android的文檔中有關(guān)于這方面的介紹 具體為 Dev Guide 下的 User iNTERFACE 下的Notifications其中主要分3種:Toast Notification (Toast就不用說了 大家都知道) 然后是Status Bar Notification(通知欄消息)以及Dialog Notification 這里主要介紹的通知欄一共4個步驟 在文檔中都有說明 下面就直接上代碼了 具體的自己看文檔吧代碼包含直接發(fā)送一個通知,以及自定義notification兩個布局文件mian.xml 1 <?xml version="1.0" enc
閱讀全文
摘要:
layout文件 1 <?xml version="1.0" encoding="utf-8"?> 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 android:layout_width="fill_parent" 4 android:layout_height="fill_parent" 5 android:orientation="vertical"
閱讀全文
摘要:
layout文件item.xml 1 <?xml version="1.0" encoding="utf-8"?> 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 android:layout_width="match_parent" 4 android:layout_height="wrap_content" 5 android:orientation="hor
閱讀全文
摘要:
代碼在Spinner里面,里面的layout里有一個AutoCompleteTextView就是這個還可以使用MultiAutoCompleteTextView控件來完成連續(xù)輸入的功能,也就是說,當(dāng)輸入完一個字符串后,在該字符串后面輸入一個逗號(,),在逗號前后可以有任意多個空格,然后再輸入一個字符串,仍然會顯示自動提示列表,使用MultiAutoCompleteTextView時,需要為它的setTokenizer方法指定MultiAutoCompleteTextView.CommaTokenizer類對象實例,該對象表示采用逗號作為輸入多個字符串的分隔符
閱讀全文
摘要:
layout 1 <?xml version="1.0" encoding="utf-8"?> 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 android:layout_width="fill_parent" 4 android:layout_height="fill_parent" 5 android:orientation="vertical"
閱讀全文
摘要:
首先在res下創(chuàng)建一個anim文件,在文件下創(chuàng)建一個.xml文件類型為animation-list 1 <?xml version="1.0" encoding="utf-8"?> 2 <animation-list xmlns:android="http://schemas.android.com/apk/res/android" 3 android:oneshot="false" > 4 5 <item 6 android:drawable="@drawable/girl
閱讀全文
摘要:
main.xml,對于代碼創(chuàng)建動畫效果在image 及手勢識別的日志里 1 <?xml version="1.0" encoding="utf-8"?> 2 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 3 android:layout_width="fill_parent" 4 android:layout_height="fill_parent" > 5 6 <
閱讀全文
摘要:
此方法解決了中文生成二維碼解析是亂碼的問題,如果不是中文的話可以簡單的使用一下方式 1 /** 2 * 用字符串生成二維碼 3 * 4 * @param str 5 * @author zhouzhe@lenovo-cw.com 6 * @return 7 * @throws WriterException 8 */ 9 public Bitmap Create2DCode(String str) throws WriterException {10 // new String(obj.getText().getBytes("ISO-8859-1"),"GBK&q
閱讀全文