Flashcards
'Real' Android programming
Cards in this deck (2)
- 1Steps to implement (fully-functional) radiobutton?1. Define radio group & buttons in xml
2. Declare in .java (RadioGroup, RadioButton)
3. findViewById
4. setOnCheckedChangeListener - 2Methods to pass data from 1 activity to another?-Intent
//1st activity
private String toPass = "";
Intent i = new Intent(getApplicationContext(), NewActivity.class);
i.putExtra("new_variable_name", );
startActivity(i);
//retrieve those values in new activity
Bundle extras = getIntent().getExtras();
if(extras != null) {
String value = extras.getString("new_variable_name");
txt.setText(value); //optional; txt is a TextView object
}
Information
- Description
- Diploma Mobile Applications (Android Concepts) Flashcards on 'Real' Android programming, created by Grace Tangarine on 21/08/2014.
- Created by
- Grace Tangarine
- Views
- 19
- Rating