Presentacion de Android Bootcamp utilizada por Santa Fe GTUG. Actualizada por Horacio Alvarez.
Convert to study guideBETA
Transform any presentation into a summarized study guide, highlighting the most important points and key insights.
1 of 48
Downloaded 95 times
More Related Content
Android Bootcamp Santa Fe GTUG
1. Android Bootcamp Elaborado (con adaptaciones) a partir de los tutoriales: http://developer.android.com/resources/tutorials/hello-world.html http://developer.android.com/resources/tutorials/views/index.html
2. 多Qu辿 es una aplicaci坦n Android? Android Application Java Language Android SDK: compilar, empaquetar (.apk) M炭ltiples actividades relacionadas entre s鱈 Alta cohesi坦n Bajo acoplamiento Android Activity: A single screen with a user interface. Ej: aplicaci坦n de email Mostrar nuevos emails Escribir nuevo email Leer email
4. Bootcamp Pen Drive Por favor, copie desde el pen drive la carpeta BOOTCAMP en alguna carpeta de su notebook Contenido android-sdk: entorno de desarrollo Android eclipse: Eclipse Galileo 3.5.0 txt: c坦digo del tutorial ADT-10.0.0.zip: plugin de Android para Eclipse
34. Experimento 1 Porque Android hace "Activity Lifecycle Management" y puede mantener activas o cerrar Activities conforme la necesidad
35. Experimento 2 Cerrar la aplicaci坦n (oprimiendo "Home") Hacer Force Close a traves del men炭 Menu -> Settings -> Applications -> Manage Apps -> Hello World -> Force Close Arrancarla nuevamente desde el men炭 de aplicaciones. 多Cu叩l es el resultado?
44. El "Toast" que aparece cuando se hace click en la lista es aburrido... 多C 坦 mo se puede implementar una b炭squeda en la Web en lugar del Toast?
45. ... HelloActivity.java [C坦digo: 7.txt] public void onItemClick(AdapterView<?> parent, View view, int pos, long id) { Uri uri = Uri. parse ( "http://en.wikipedia.org/" + "wiki/" + Uri. encode ( countries .get(pos), null )); Intent intent = new Intent( Intent. ACTION_VIEW , uri); startActivity(intent); }
47. Documentaci坦n de Referencia http://developer.android.com/index.html Framework Topics Android Market Topics Developing Publishing Best Practices Web Applications Appendix
#13: onCreate() Called when the activity is first created. This is where you should do all of your normal static set up: create views, bind data to lists, etc. This method also provides you with a Bundle containing the activity's previously frozen state, if there was one. Always followed byonStart(). setContentView(): Set the activity content to an explicit view. This view is placed directly into the activity's view hierarchy. It can itself be a complex view hierarchy. link tohttp://developer.android.com/images/activity_lifecycle.png?
#16: fill_parent : means that the view wants to be as big as its parent (minus padding) wrap_content :means that the view wants to be just big enough to enclose its content (plus padding) String Resources: In Java:R.string. string_name In XML:@string/ string_name
#22: dp: Density-independent Pixels - an abstract unit that is based on the physical density of the screen. These units are relative to a 160 dpi screen, so one dp is one pixel on a 160 dpi screen. The ratio of dp-to-pixel will change with the screen density, but not necessarily in direct proportion. Note: The compiler accepts both &quot;dip&quot; and &quot;dp&quot;, though &quot;dp&quot; is more consistent with &quot;sp&quot;. sp: Scale-independent Pixels - this is like the dp unit, but it is also scaled by the user's font size preference. It is recommend you use this unit when specifying font sizes, so they will be adjusted for both the screen density and user's preference.
#23: @+id/ means that we are creating this id in the namespace of our application
#24: R.id.mylistview references entity declared on Resource file Toast: A toast is a view containing a quick little message for the user. The toast class helps you create and show those. ArrayAdapter: A concrete BaseAdapter that is backed by an array of arbitrary objects. By default this class expects that the provided resource id references a single TextView. If you want to use a more complex layout, use the constructors that also takes a field id. That field id should reference a TextView in the larger layout resource.
#27: Note that the width of EditText is defined in sp
#40: getPreferences() : Retrieve a SharedPreferences object for accessing preferences that are private to this activity. MODE_PRIVATE :File creation mode: the default mode, where the created file can only be accessed by the calling application (or all applications sharing the same user ID). 鏤 MODE_WORLD_READABLE: File creation mode: allow all other applications to have read access to the created file 鏤 MODE_WORLD_WRITABLE: File creation mode: allow all other applications to have write access to the created file.
#41: Second argument in sp.getString(&quot;countries&quot;, &quot;Brazil;Argentina;Mexico&quot;); is the default value
#46: Intent: An intent is an abstract description of an operation to be performed. An Intent provides a facility for performing late runtime binding between the code in different applications. Its most significant use is in the launching of activities, where it can be thought of as the glue between activities. It is basically a passive data structure holding an abstract description of an action to be performed. The primary pieces of information in an intent are: action-- The general action to be performed, such as ACTION_VIEW , ACTION_EDIT , ACTION_MAIN , etc. data-- The data to operate on, such as a person record in the contacts database, expressed as a Uri .