2013年11月2日星期六
2013年10月24日星期四
2013年10月11日星期五
Density-independent Pixels (密度獨立像素)
一個教導如何針對不同Android設備, 不同分辨率的問題, 創建統一用戶界面(UI)的視頻教程.
DesignBytes: Density-independent Pixels
This introductory video explains how Android app designers can easily work across different screen pixel densities by using the density-independent pixel (abbreviated dp or dip), a virtual pixel unit that keeps things the same physical size across device. Understanding dp units is critical to a successful Android app design workflow.
DesignBytes: Density-independent Pixels
This introductory video explains how Android app designers can easily work across different screen pixel densities by using the density-independent pixel (abbreviated dp or dip), a virtual pixel unit that keeps things the same physical size across device. Understanding dp units is critical to a successful Android app design workflow.
2013年9月30日星期一
如何請求重新佈局/繪製 - requestLayout()/invalidate()
如果一個視圖(View)有一些視覺變化, 希望系統重新佈局/繪製, 可以調用函數 requestLayout() 或 invalidate().
- 調用 requestLayout() 函數將安排重新佈局.
- 調用 invalidate() 函數會調用onDraw(android.graphics.Canvas).
- 調用 requestLayout() 函數將安排重新佈局.
- 調用 invalidate() 函數會調用onDraw(android.graphics.Canvas).
2013年9月27日星期五
水平放置單選按鈕(RadioButton)
<RadioGroup android:id="@+id/radiogroup2" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" > <RadioButton android:id="@+id/radiobutton1" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="option 1" /> <RadioButton android:id="@+id/radiobutton2" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="option 2" /> </RadioGroup>
2013年9月4日星期三
2013年8月17日星期六
圖像像素化 (Image Pixelization)
本視頻演示了一些實現對圖像像素化效果((Image Pixelization))的基本位圖處理(Bitmap manipulation)技術. 以及使用AsyncTask從UI線程移至後台工作線程, 以減少UI線程的負荷.
示例代碼: http://developer.android.com/shareables/devbytes/ImagePixelization.zip
訂閱:
文章 (Atom)