Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Consejos y Secretos de Programación Android

Consejos y Secretos de Programación Android

Campus Party México 2011

Video en http://www.youtube.com/watch?v=7PwZtmCmuns

Sebastian Delmont

June 26, 2012
Tweet

More Decks by Sebastian Delmont

Other Decks in Programming

Transcript

  1. 1: Recursos Online • d.android.com Articulos, Referencia • stackoverflow.com tag

    [android] • github.com/android Ejemplos: Camera App, LinearLayout Wednesday, July 20, 2011
  2. 2: Librerías • Android Compatibility Package • Larga lista de

    librerías • AppMonk, DroidKit Wednesday, July 20, 2011
  3. 3: Eclipse • Optimizar eclipse.ini • Atajos de teclado Search

    References - ⇧⌘ G Open Declaration - F3 Quick Outline - ⌘ O Quick Access - ⌘ 3 Open Type - ⇧⌘ T Run Last Launched - ⇧⌘ F11 Wednesday, July 20, 2011
  4. 5: Desfragmentando • 2.1: 18% 2.2: 60% 2.3: 18% Resto:

    4% • 2.1➙2.2: Push, Respaldo, OpenGL • 2.2➙2.3: Audio • 2.3➙3.0: Fragments • Compatibility Package • FragmentationManager Wednesday, July 20, 2011
  5. 6: Modelo de Threads • Thread principal (UI) • DNR

    • Rendimiento • AsyncTask • Intents y Servicios Wednesday, July 20, 2011
  6. 7: Archivos • Interno vs Externo • /sdcard/Android/data • .nomedia

    • getExternalFilesDir() 2.2+ Wednesday, July 20, 2011
  7. 8: Configuraciones • configChanges ”orientation|keyboardHidden” • onCreate() / onResume() onPause()

    / onStop() • onRetainNonConfigurationInstance() getLastNonConfigurationInstance() Wednesday, July 20, 2011
  8. 8: Configuraciones • Preservando el Scroll view = listView.getChildAt() id

    = list.getIdForView(view) offset = view.getTop() • Restaurando el Scroll pos = list.getPositionFor(id) listView.setSelectionFromTop(pos, offset) Wednesday, July 20, 2011
  9. 9: Imágenes en listas Con caché en disco y caché

    en memoria Wednesday, July 20, 2011
  10. 10: Layout a la medida • onMeasure • onLayout •

    LayoutParams Wednesday, July 20, 2011
  11. 11: Tips rápidos • ¿Objetos serializados? HEREJÍA!!! • Layouts anidados

    • TextView: Drawables y Spannables • String.format(“%2$d %1$s”, n, x) • Clase Global Wednesday, July 20, 2011