Android
ã¯ã¦ãã¢ããªä½¿ãã¥ãã ã¯ã¦ãããã¥ã¼ãã¦ãã3,4ã¶æãªãã ãã©ãã©ããAndroidã®ã¯ã¦ãªããã¯ãã¼ã¯ã¯å¾®å¦ã«ä½¿ãã¥ããããã¼ã¸ã®æç»é¨åã®ä½¿ãåæããã¤ãã®ãã©ã¦ã¶ã¨å¤ãã£ã¦ãã¾ãã®ãé£ç¹ãæåãµã¤ãºãå¤ããããªãã£ãããUAå¤æ´ãããã¨ãã§ãâ¦
ãããã°ã¨ãã®ã¨ãã¨ããDB使ããããªãã¨ãç¨ã«ã ArrayAdapterãç¶æ¿ãã¦æ°ããã¯ã©ã¹ä½ã£ã¦getViewãªã¼ãã¼ã©ã¤ããã¦å¤è¿½å ãã¦â¦ã£ã¦ããã®ã¯ããã©ãããã ããã§ãSimpleCursorAdapterã®å¼æ°ã«ä½¿ããDBã®ã¯ã¨ãªçµæãæ ¼ç´ããCursorãæ¬ä¼¼çã«ä½æãâ¦
ååã¯SimpleCursorAdapterãç¶æ¿ãã¦æ°ããã¯ã©ã¹ãä½ã£ã¦ããã©ãlistenerãããªããªãããã¾ã§ããªãã¦ã大ä¸å¤«ã main.xml <ListView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/list" android:layout_width="fill_parent" android:layout_height="fill_parent" /> list_row.xâ¦</listview>
SimpleCursorAdapterãç¶æ¿ããã¯ã©ã¹ãä½æãã newViewã¡ã½ããããªã¼ãã¼ã©ã¤ããã å¼æ°ã®Viewå¤æ°ï¼ãã¶ããªã¹ãè¡ã®ã¬ã¤ã¢ã¦ããå ¥ã£ã¦ãï¼ããwidgetãçæãã widgetã«Listenerãã»ãããã public class MyCursorAdapter extends SimpleCursorAdapâ¦
ãã¨ãã°ã <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <solid android:color="<color>" /> </solid></shape>