java - Determining when to use which Android components? -
java - Determining when to use which Android components? -
firstly, i'm new android (so apologize if question ignorant) have experience in java. have been reading book on android , remain confused basic components (activities, intent, content providers, , broadcast receivers).
i have few java classes i'm wanting convert on android i'm not sure type of components should be.
if class simple conversions, should intent? or, if class draws, should activity?
i'm looking can explain components bit improve references @ android , perhaps give examples of each component.
i think you're confused of terminology. activity user interacts (displays content, contains listeners buttons, etc.) when launch app , see on screen, activity draws buttons/components on screen , contains code user interaction. intent kind of way tell activity launch else. example, if on main activity, , wanted alter activity when user clicked something, create , start intent specifying that:
intent intent = new intent(currentactivity.this, nextactivity.class); startactivity(intent); read basic tutorial. should clearer official docs. http://androiddevelopertips.com/activity/understanding-activities-in-android.html
java android view android-activity
Comments
Post a Comment