I have a problem when trying to move the content of the EditText in
the Spinner using that ArrayAdapter, I really don't know what to do,
please have a look:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.list);
m_myDynamicSpinner = (Spinner)findViewById(R.id.textView1);
m_addItemText = (EditText)findViewById(R.id.itemtext);
Button addButton = (Button)findViewById(R.id.add);
Button clearButton = (Button)findViewById(R.id.clear);
Button next = (Button) findViewById(R.id.back);
String items = m_addItemText.getText().toString();
ArrayAdapter<String> adapter = new ArrayAdapter(this,
android.R.layout.simple_spinner_item,items); //Here is the problem, I
think it's something related to the last parameter and the line before
it.
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
m_myDynamicSpinner.setAdapter(adapter);
next.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
Intent intent = new Intent();
setResult(RESULT_OK, intent);
finish();
}});}}
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en