본문 바로가기
반응형

Android23

안드로이드 예제들 Handler 예제 final Handler handler = new Handler() { public void handleMessage(Message msg) { switch (msg.what) { case I.KEY_HANDLE_TOAST: String toastMsg = (String) msg.obj; Toast.makeText(getApplicationContext(), toastMsg, 3000).show(); break; case IContent.KEY_HANDLE_123: { //list adapter refresh() if(adapter != null) adapter.notifyDataSetChanged(); } break; } } }; 호출 방법 Message msg1 = handler... 2011. 5. 4.
List View - UI thread 에러 (custom) ListView를 사용할 때 ArrayList list; Adapter ad; list.add(xx); 처럼 동적으로 추가하면 ERROR/AndroidRuntime(28265): java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is not modified from a background thread, but only from the UI thread. [in ListView(2131034121, class android.widget.ListView) with Ad.. 2011. 4. 21.
achartengine에서 TimeBarChart 만들기 achartengine(http://www.achartengine.org)에는 x축 값이 시간을 사용할 수 있는 TimeChart는 꺽은선 그래프밖에 지원하지 않는다. BarChart + TimeChart를 합친 TimeBarChart를 새로 정의 하였다. public class TimeBarChart extends BarChart{ /** The number of milliseconds in a day. */ public static final long DAY = 24 * 60 * 60 * 1000; /** The date format pattern to be used in formatting the X axis labels. */ private String mDateFormat; /** * Build.. 2011. 1. 8.
How to Create QuickAction Dialog in Android http://www.londatiga.net/it/how-to-create-quickaction-dialog-in-android/ 2010. 11. 29.