Friday, December 16, 2016

View Objects and Interacting with Widgets

1)getText

2)setText

Widgets interact with ID number

FindviewbyId---Used to access view object

Android Terminology

Activity--UI in your app

View -- Interactive UI Components --Buttons,Labels,textfields

1)Widget--
View is the base class for widgets, which are used to create interactive UI components 

ex: Buttons,Checkboxes(Multi select),RadioButtons(Single select),ProgressBars,Spinners (Drop Down)
,EditText(Textbox-input),Textview(Labels-output),

2) Layout-- where to set the widgets --like the button,label etc is left or center etc
ViewGroup subclass is the base class for layouts, which are invisible containers that hold other Views 

Event --Action that occurs when user interacts with widgets
             ex: Button click etc

What is an Activity ?

Activity class ---window --UI with setContentView(View).

Methods 
1) onCreate(Bundle)--initialize your activity
   Call setContentView -with a layout resource defining your UI
   and findViewById(int)--To interact with UI Elements
2)onPause() 

Project Structure

1)AndroidManifest.xml----
   provides essential information about your app to the Android system
   1) names the Java package for the application (Package name --Unique id for the app)
    2) components of the app--activities, services, broadcast receivers, and content providers
    3) Permissions,android minimum level of android api , Libraries needed


2)src/java     ---------------- Source code for java files

3)res ------------------------- Resource files
   drawable/=images
   layout/= descriptions of GUI layout
   menu /= overall app menu options
   values/=constant values and arrays
   strings/= localization data
   styles/= general appearance styling

4) Gradle --Build or compile management system