Slide 1

Slide 1 text

Google Developers Study Jam Android for Beginners. Final Projects Constantine Mars Co-Organizer @ GDG Dnipropetrovs’k Senior Developer @ DataArt [email protected] +ConstantineMars

Slide 2

Slide 2 text

Agenda ● Summary ● Common mistakes and issues ● Best examples ● Certificates ceremony ● Group photo :)

Slide 3

Slide 3 text

Stats Started Jam: 62 Final projects completed: 22 Discussion projects: 8

Slide 4

Slide 4 text

Common mistakes

Slide 5

Slide 5 text

UX ● Mixing different languages (i.e. English + Latin) ● Mixing color styles ● Making too many elements in UI ● Adding extra controls

Slide 6

Slide 6 text

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

Slide 7

Slide 7 text

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);

Slide 8

Slide 8 text

Long chain of calls adapter.addFragment(SomeFragment.newInstance(list.get(i)),list.get(i).getName()); Better: adapter.addFragment( SomeFragment.newInstance(list.get(i)), list.get(i).getName() ); *use: ● Spaces ● New line ● Auto-indent ● Rearrange code

Slide 9

Slide 9 text

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; } }

Slide 10

Slide 10 text

Fragments ● Pattern Fragment.newInstance() ● .onCreateView() - don’t load assets here ● Interaction with Activity - get callback in .onAttach() ● Flexible UI, master-detail

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

Best examples

Slide 13

Slide 13 text

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

Slide 14

Slide 14 text

Cool design, true OOP, ViewPager

Slide 15

Slide 15 text

OOP, Design, Database, ORM

Slide 16

Slide 16 text

Transparent, original design

Slide 17

Slide 17 text

RecyclerView with CardView

Slide 18

Slide 18 text

Good OOP and Design

Slide 19

Slide 19 text

First in discussion

Slide 20

Slide 20 text

San Francisco

Slide 21

Slide 21 text

Animation With alpha

Slide 22

Slide 22 text

Getting Real Discussion, simple, but robust

Slide 23

Slide 23 text

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

Slide 24

Slide 24 text

Certificates

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

Let’s take photo :) +ConstantineMars