27.02.2014 Views

Android 开发教程

Android 开发教程

Android 开发教程

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

-----------------------------------<strong>Android</strong> 编 程 基 础<br />

MultiAutoCompleteTextView 与 数 组<br />

1<br />

新 建 工 程<br />

2 修 改 main.xml 布 局 , 添 加 一 个 TextView、 一 个 MultiAutoCompleteTextView、 一 个 Button<br />

<br />

<br />

<br />

<br />

<br />

<br />

3<br />

MultiAutoCompleteTextView 是 可 以 自 动 完 成 用 户 输 入 , 能 够 添 加 多 个 输 入 , 注 意 设 置 Tokenizer<br />

/* 设 置 Tokenizer 来 确 定 用 户 输 入 文 本 的 相 关 范 围 */<br />

myAutoCompleteTextView<br />

.setTokenizer(new<br />

new MultiAutoCompleteTextView.CommaTokenizer());<br />

32

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!