336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.
리스트뷰 관련
출처 : http://sharepid.tistory.com/951
긁어서 복붙 안된다.
==================
리스트 내용 삭제 하기
출처 : http://tip.daum.net/openknow/59159620
.clear();
==================
리스트 추가 후 갱신 (필수!)
출처 : http://docko.tistory.com/entry/%EC%95%88%EB%93%9C%EB%A1%9C%EC%9D%B4%EB%93%9C-ListView%EC%97%90-%EB%8D%B0%EC%9D%B4%ED%84%B0-%EC%B6%94%EA%B0%80-%EB%98%90%EB%8A%94-%EB%B3%80%EA%B2%BD-%EC%8B%9C-%EA%B0%B1%EC%8B%A0Update%ED%95%98%EA%B8%B0
adapter.notifyDataSetChanged();
----------------------------
simple_list_item_2 사용 예제
http://musart.tistory.com/18
SimpleAdapter sap = new SimpleAdapter(this, mlist, android.R.layout.simple_list_item_2, new String[]{"item1", "item2"}, new int[]{android.R.id.text1, android.R.id.text2});
lv.setAdapter(sap);
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ArrayAdapter<String> ap = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_single_choice, strArray); // simple adapter test ArrayList<HashMap<String, String>> mlist = new ArrayList<HashMap<String, String>> (); HashMap<String, String> map = new HashMap<String, String> (); map.put("item1", "musart"); map.put("item2", "10"); mlist.add(map); map = new HashMap<String, String> (); map.put("item1", "sasim"); map.put("item2", "20"); mlist.add(map); map = new HashMap<String, String> (); map.put("item1", "vincent"); map.put("item2", "30"); mlist.add(map); SimpleAdapter sap = new SimpleAdapter(this, mlist, android.R.layout.simple_list_item_2, new String[]{"item1", "item2"}, new int[]{android.R.id.text1, android.R.id.text2}); lv.setAdapter(sap); | cs |
'Android Studio' 카테고리의 다른 글
(Android Studio) 상태 바 화면 별 이름, 상태바 색상 바꾸기 (0) | 2016.11.07 |
---|---|
(Android Studio) 안드로이드 어플 아이콘 변경 (0) | 2016.11.07 |
(Android Studio) Android NavigationView 다루기 (0) | 2016.11.07 |
(Android Studio) android:layout_weight 쓸 때 같이 써줘야 하는 것 (0) | 2016.05.30 |
(Android Studio) 웹뷰 - 새창 아니게 본 창에 열기, 자바스크립트 허용하기 (0) | 2016.05.30 |