Different list items’ layouts

Original Article: http://android.amberfog.com/?p=296   public class MultipleItemsList extends ListActivity { private MyCustomAdapter mAdapter; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mAdapter = new MyCustomAdapter(); for...

Separating Lists with Headers in Android 0.9

Original Article: http://jsharkey.org/blog/2008/08/18/separating-lists-with-headers-in-android-09/ <!-- list_header.xml --> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/list_header_title" android:layout_width="fill_parent" android:layout_height="wrap_content" android:paddingTop="2dip" android:paddingBottom="2dip" android:paddingLeft="5dip" style="?android:attr/listSeparatorTextViewStyle" /> <!-- list_item.xml --> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/list_item_title" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingTop="10dip"...

Talking To Web Servers Via HTTP In Android 1.0

Original Article:  http://brainflush.wordpress.com/2008/10/17/talking-to-web-servers-via-http-in-android-10/ HttpClient httpClient = new DefaultHttpClient(); StringBuilder uriBuilder = new StringBuilder(SERVICE_ENDPOINT); uriBuilder.append("?param0=" + param0); uriBuilder.append("&param1=" + param1); uriBuilder.append("&paramN=" + paramN); HttpGet request =...

Support various screen-size in the Android UI – AndroidPub

Reference : [안드앱콘1] 다양한 스크린 사이즈에서의 UI 처리 http://www.androidpub.com/?mid=android_dev_info&category=127161& amp;page=4&document_srl=320322 Points - Handle resource by folder names res/layout/my_layout.xml: Normal screen-size layout res/layout-small/my_layout.xml: Small screen-size layout res/layout-large/my_layout.xml:...

Designing for Performance

Reference: http://developer.android.com/guide/practices/design/performance.html 성능을 위한 디자인 * 기본적으로 할수있다면 임시 객체를 생성하는것을 최대한 피하라. 생성된 객체가 적을 수록 UX(User Experience)에 직접적인 영향을 미치는 가비지 콜렉션(Garbage Collection)이 적게 실행된다. 1....

Making the Android UI Fast and Efficient by Romain Guy

Th_0230_TurboChargeYourUI-HowtomakeyourAndroidUIfastandefficient.pdfPoint!AdaptersBetter Code for efficient view redraw--------------------------------------------------------------------1. Create simple class--------------------------------------------------------------------static class ViewHolder {TextView text;ImageView icon;}--------------------------------------------------------------------2. getView()--------------------------------------------------------------------public View getView(int position, View convertView, ViewGroup parent) {ViewHolder holder;if(convertView ==...