리비전 85, 1.0 kB
(mefour에 의해 체크인됨, 15 년 전)
|
--
|
Line | |
---|
1 |
package soo.ui.array; |
---|
2 |
|
---|
3 |
import android.app.Activity; |
---|
4 |
import android.os.Bundle; |
---|
5 |
import android.widget.ArrayAdapter; |
---|
6 |
import android.widget.AutoCompleteTextView; |
---|
7 |
import android.widget.Spinner; |
---|
8 |
|
---|
9 |
public class SprinnerTest extends Activity { |
---|
10 |
/** Called when the activity is first created. */ |
---|
11 |
@Override |
---|
12 |
public void onCreate(Bundle savedInstanceState) { |
---|
13 |
super.onCreate(savedInstanceState); |
---|
14 |
setContentView(R.layout.main); |
---|
15 |
/* |
---|
16 |
Spinner sn = (Spinner)findViewById(R.id.sn); |
---|
17 |
ArrayAdapter aa1 =ArrayAdapter.createFromResource(this, R.array.singer,android.R.layout.simple_spinner_item); |
---|
18 |
|
---|
19 |
aa1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); |
---|
20 |
sn.setAdapter(aa1); |
---|
21 |
*/ |
---|
22 |
AutoCompleteTextView ac = (AutoCompleteTextView)findViewById(R.id.ac); |
---|
23 |
ArrayAdapter aa2 = ArrayAdapter.createFromResource(this, R.array.singer, android.R.layout.simple_dropdown_item_1line); |
---|
24 |
|
---|
25 |
ac.setAdapter(aa2); |
---|
26 |
|
---|
27 |
} |
---|
28 |
} |
---|