http://www.javaeye.com/topic/842843
9-pathch 定義png 文件 拉昇區間
http://www.cnmsdn.com/html/201005/1274855049ID5103_2.html
Windows下下載Android源代碼的方法
僅下載Git (基於 Mingwin ,not Cygwin) ,沒有 resp 不需下載 Msgit full version (for hacker ) .
http://android.git.kernel.org/ 分爲許多 git 文件,可以用tree 瀏覽 具體文件 。
:右擊Android Src文件夾選擇Git Bash
下載 java 包 命令 git-clone git://git.source.android.com/platform/frameworks/base android-api
onTouch() - 返回一個布爾值表示你是否消耗了該event. 該event可以有多個動
作. 如果在向下的動作接收時你返回false, 就表示你沒有消耗該event, 並且對
後續動作也不感興趣. 也就是說, 後面的手勢動作,以及最後的向上動作都將不
會再被通知.
LayoutPara should define in child
android:gravity用於設置View組件的對齊方式,而android:layout_gravity用
於設置Container組件的對齊方式。
我們可以通過設置android:gravity="center"來讓EditText中的文字在EditText
組件中居中顯示;同時我們設置EditText的android:layout_gravity="right"來
讓EditText組件在LinearLayout中居中顯示
activity根據這個View的比0大的layout_weight值來劃分剩餘的空間和其它
Views定義的layout_weight也按比例進行空間的劃分
bottom layout still has error
use relative out ,but can not set padding , should set layout padding
,why set child content
motion event
走馬燈
android:singleLine="true" android:ellipsize="marquee"
android:marqueeRepeatLimit="marquee_forever"
android:focusable="true"
Android 方法困惑
new RelativeLayout.LayoutParams(
RelativeLayout.LayoutParams.WRAP_CONTENT,
RelativeLayout.LayoutParams.WRAP_CONTENT);
lp.addRule(RelativeLayout.CENTER_IN_PARENT);
firstly ,width is dene as int .
secendly ,property is define as int ,and use addRule( like add(set)
flag )
MeasureSpec,
When overriding this method, you must call setMeasuredDimension(int,
int) to store the measured width and height of this view.
沒有封裝,應該返回尺寸, MeasureSpec應該是對象,而不是編碼成int,雖然
有這對象
SetTextStyle
SpannableStringBuilder style=new SpannableStringBuilder(s
;
style.setSpan(new ForegroundColorSpan(Color.RED),3,8,Spann
e.SPAN_EXCLUSIVE_EXCLUSIVE);
textview.setText(style);
spaned
spannable
Editable, Spannable, SpannableString, SpannableStringBuilder,
SpannedString
setSpan
Draw
CharacterStyle
http://gundumw100.javaeye.com/blog/904107
This is the interface for text to which markup
很多網友都知道啓動Activity的時候通過Intent,提供了常見的Integer、
Boolean、String等基本類型外,對於複雜的,可以通過實現
android.os.Parcelable接口,來傳遞複雜的類。(其實也是通過RPC 機制)