07.01.2013 Views

David Defour - Université de Perpignan

David Defour - Université de Perpignan

David Defour - Université de Perpignan

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

SUMMARY<br />

• Spinner with fixed entries<br />

• Define array in strings.xml.<br />

• Use android:prompt and android:entries in layout file. Also assign id with<br />

android:id<br />

• Java gets ref and calls setOnItemSelectedListener<br />

• Spinner with computed entries<br />

• XML uses android:prompt and android:id<br />

• Java gets ref, makes ArrayAdapter with a List or String[], uses some<br />

pre<strong>de</strong>fined resource names<br />

• Switching Activities<br />

• Intent newActivity = new Intent(this, NewActivity.class);<br />

• startActivity(newActivity);<br />

• Also requires entry in AndroidManifest.xml<br />

jeudi 26 janvier 12

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

Saved successfully!

Ooh no, something went wrong!