반응형
Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 자바정의
- bruno mars marry you
- 불독맨션 좋아요
- marry you 프로포즈
- 펌방지해제
- 문자열자르기
- Split
- 이클립스 단축키
- jason marz im yours
- 스크린세이버
- This Android SDK requires An...e ADT to the latest version
- Marry You
- 체크박스
- java 객체
- eclipse svn
- java 인스턴스
- javascript강의
- eclipse 단축키
- jason maraz
- Mysql명령어
- dom vs sax
- MySQL
- java파일복사
- sax vs dom
- 타루 예뻐할께
- lol 서포터
- 자바 객체
- 자바스크립트강의
- 갈릴레오 svn
- java파일삭제
Archives
- Today
- Total
쿰뱅이
[안드로이드] multiauto complete, 본문
반응형
[안드로이드] multiauto complete,
#. 예제 소스
JAVA 파일
package com.AutoComplete2;
import android.app.Activity; import android.os.Bundle; import android.widget.ArrayAdapter; import android.widget.AutoCompleteTextView; import android.widget.MultiAutoCompleteTextView; public class AutoComplete2Activity extends Activity { /** Called when the activity is first created. */ String[] arWords = new String[] { "가가멜", "가구", "가로수", "가방", "가위", "가자미", "가치", "가훈", "나그네", "나막신", "나물", "about", "above", "absolute", "access", "activity", "adjust" }; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); ArrayAdapter<String> adWord = new ArrayAdapter<String>(this, android.R.layout.simple_dropdown_item_1line, arWords); MultiAutoCompleteTextView autoEdit = (MultiAutoCompleteTextView)findViewById(R.id.autoedit); autoEdit.setAdapter(adWord); autoEdit.setTokenizer(new MultiAutoCompleteTextView.CommaTokenizer()); } } |
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="아래 텍스트에 단어를 입력하세요. 구분자는 , 입니다" /> <MultiAutoCompleteTextView android:layout_height="wrap_content" android:id="@+id/autoedit" android:layout_width="match_parent" android:completionThreshold="1" > </MultiAutoCompleteTextView> </LinearLayout> |
반응형
'안드로이드 > 안드로이드 시작하기' 카테고리의 다른 글
안드로이드 AVD 사이즈 조절하기 (1) | 2011.10.11 |
---|