GoConqr has a new look! Let us know what you think.

Flashcards

Code an app

Nathan Hunsdale Mobile App Masters of Science English 20 cards

Code an app

Cards in this deck (20)

  1. 1An Activity What is it? What are all custom classes implemented as?A single and focused thing a user can do
    An app may consist of many activities
    Each activity is implemented as an
    implementation of the Activity base class
  2. 22 methods which nearly every activity has?onCreate() - initialises activity
    onPause() - deals with the user leaving the activity
  3. 3Android activity lifecycleAndroid activity lifecycle
  4. 4onCreate() When is it called? What is called next?Called when the activity is first created
  5. 5onRestart() When is it called? What is called next?Called after the activity has been stopped prior to being started again
    ( next is onStart() )
  6. 6onStart() When is it called? What is called next?Called when the activity is becoming visible to the user
    ( next is onResume() or onStop() )
  7. 7onResume() When is it called? What is called next?Called when the activity will be
    available for interacting with the user.
    ( next is onPause() )
  8. 8onPause() When is it called? What is called next?Called when the system is about to
    resume a previous activity or if the user has
    navigated away to another portion of the system,
    such as pressing the home key.
    (next is onResume() or onStop())
  9. 9onStop() When is it called?Called when the activity is no longer visible to the user because another activity has resumed and is overriding this one
  10. 10onDestroy() When is it called?The final call we receive before the activity is destroyed
  11. 11Key Loops The Entire Lifetime (what are the beginning and end points?)the setup is created in onCreate() and releases all remaining resources in onDestroy()
  12. 12Key Loops The Visible Lifetime (When does the activity start and stop being visible to the user)The user can see the activity between onStart() and onStop()
  13. 13Key Loops The Foreground Lifetime (When is it the main focus of the phone)between onResume() and onPause(), the activity is interacting with the user and in front of other activities
  14. 14Call an XML layout in JavasetContentView(R.Layout.{name of XML layout})
  15. 15Inflate a menu in JavagetMenuInflater().inflate(R.menu.{name of XML activity},menu)
  16. 16super.onCreate(savedInstanceState); What does it do?calls the SuperClass "Activity" to perform set up work for Main Activity Class
  17. 17Bundle savedInstanceState What ability does this give the developer?Gives the developer a way to pass information back and forth between screens (different activities) in a bundle
  18. 18Button How to create a button in java? (and reference it in XML)Button toggleButton = (Button)findViewById(R.id.toggleButton);
  19. 19Set onClickListener() What is the code?toggleButton.setOnClickListener(new View.OnClickListener() {
    public void onClick(View v) {
    }
    });
  20. 20Audio Manager How to create an audio manager?mAudioManager =
    (AudioManager) getSystemService(AUDIO_SERVICE);

Information

Description
Masters of Science Mobile App Flashcards on Code an app, created by Nathan Hunsdale on 21/05/2014.
Created by
Nathan Hunsdale
Views
32
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?