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

Google Developers Study Jam: Android for Beginn...

Google Developers Study Jam: Android for Beginners. Final Project Summary

Royce Mars

April 07, 2016
Tweet

More Decks by Royce Mars

Other Decks in Programming

Transcript

  1. Google Developers Study Jam Android for Beginners. Final Projects Constantine

    Mars Co-Organizer @ GDG Dnipropetrovs’k Senior Developer @ DataArt [email protected] +ConstantineMars
  2. Agenda • Summary • Common mistakes and issues • Best

    examples • Certificates ceremony • Group photo :)
  3. UX • Mixing different languages (i.e. English + Latin) •

    Mixing color styles • Making too many elements in UI • Adding extra controls
  4. XML • Auto-indent, rearrange code before commit • Don’t left

    empty tags • Don’t mix +id and onClick method name in the same tag • Keep single color and size style for icons • Don’t use Layout.background to display images, use ImageView with ScaleType • Use Styles
  5. Code duplication, copy-paste Thing thing = new Thing(); thing.setPrice(20); thing.setColor(RED);

    Thing thing2 = new Thing(); thing2.setPrice(25); thing.setColor(GREEN); Better: Thing thing = new Thing(20, RED); Thing thing2 = new Thing(25, GREEN); Or Thing thing = Thing.newInstance(20, RED); Thing thing2 = Thing.newInstance(25, GREEN);
  6. Usage of design patterns public class ClassicSingleton { private static

    ClassicSingleton instance = null; protected ClassicSingleton() { // Exists only to defeat instantiation. } public static ClassicSingleton getInstance() { if(instance == null) { instance = new ClassicSingleton(); } return instance; } }
  7. Fragments • Pattern Fragment.newInstance() • .onCreateView() - don’t load assets

    here • Interaction with Activity - get callback in .onAttach() • Flexible UI, master-detail
  8. Common sense • Unused folders, “test”, “androidTest” • Don’t put

    apk to github code, use Github Release feature • Don’t put different projects in one repo
  9. Good practices • Spanned text, Html.fromHtml() • Menu.setShadowLayer() • Fragments

    • RecyclerView with CardView • Animations with alpha, translate • Real names for .apk • Be on Discussion Forum • Getting Real - making cool app, using only what you really know
  10. И еще много проектов, которые мы не успеем сегодня посмотреть

    и обсудить... Но они наверняка будут скоро на Discussion - И их увидит весь мир :)