[FLISOL] Embelezando o Android – 2013

627 views

Published on

Palestra ministrada no FLISOL Campinas 2013

Published in: Technology, News & Politics
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
627
On SlideShare
0
From Embeds
0
Number of Embeds
16
Actions
Shares
0
Downloads
4
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

[FLISOL] Embelezando o Android – 2013

  1. 1. Embelezando o Android Douglas Drumond! drumond.douglas@gmail.com eee19.com
  2. 2. Importância de uma boa interface eee19.com
  3. 3. eee19.com
  4. 4. eee19.com
  5. 5. Design eee19.com
  6. 6. eee19.com
  7. 7. eee19.com
  8. 8. eee19.com
  9. 9. AVISO eee19.com
  10. 10. AVISO "With great power comes great responsibility" eee19.com
  11. 11. Aplicativo eee19.com
  12. 12. Formas eee19.com
  13. 13. XML eee19.com
  14. 14. <shape> eee19.com
  15. 15. android:shape=… • oval! • rectangle! • line! • ring eee19.com
  16. 16. eee19.com
  17. 17. rectangle <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
 <solid android:color="#0064A0" /> ! </shape> eee19.com
  18. 18. eee19.com
  19. 19. rectangle <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
 <solid android:color="#0064A0" /> ! <corners android:radius="15dp" /> </shape> eee19.com
  20. 20. eee19.com
  21. 21. button <selector xmlns:android="http://schemas.android.com/apk/ res/android" > <item android:state_pressed="true" android:drawable="@drawable/button_pressed" /> <item android:state_focused="true" android:drawable="@drawable/button_focused" /> <item android:drawable="@drawable/button_normal" /> </selector> eee19.com
  22. 22. res/drawable • button_focused! • button_normal! • button_pressed! • button eee19.com
  23. 23. activity_main.xml <Button android:id="@+id/view3" android:layout_width="120dp" android:layout_height="80dp" android:layout_marginTop="64dp" android:background="@drawable/ button" 
 
 android:text="@string/button_label" /> eee19.com
  24. 24. activity_main.xml <Button android:id="@+id/view3" android:layout_width="120dp" android:layout_height="80dp" android:layout_marginTop="64dp" android:background="@drawable/ button" android:text="@string/button_label" android:textColor="@drawable/ button_caption" 
 /> eee19.com
  25. 25. button_caption.xml <selector xmlns:android="http://schemas.android.com/apk/ res/android" > <item android:state_pressed="true" android:color="#0FF" /> <item android:state_focused="true" android:color="#FFF" /> <item android:color="#FFF" /> </selector> eee19.com
  26. 26. eee19.com
  27. 27. XML Bitmap <?xml version="1.0" encoding="utf-8"?> <bitmap     xmlns:android="http://schemas.android.com/apk/res/android"     android:src="@[package:]drawable/drawable_resource"     android:antialias=["true" | "false"]     android:dither=["true" | "false"]     android:filter=["true" | "false"]     android:gravity=["top" | "bottom" | "left" | "right" | "center_vertical" |                       "fill_vertical" | "center_horizontal" | "fill_horizontal" |                       "center" | "fill" | "clip_vertical" | "clip_horizontal"]     android:tileMode=["disabled" | "clamp" | "repeat" | "mirror"] /> eee19.com
  28. 28. XML Bitmap <?xml version="1.0" encoding="utf-8"?> <bitmap     xmlns:android="http://schemas.android.com/apk/res/android"     android:src="@[package:]drawable/drawable_resource"     android:antialias=["true" | "false"]     android:dither=["true" | "false"]     android:filter=["true" | "false"]     android:gravity=["top" | "bottom" | "left" | "right" | "center_vertical" |                       "fill_vertical" | "center_horizontal" | "fill_horizontal" |                       "center" | "fill" | "clip_vertical" | "clip_horizontal"] android:tileMode=["disabled" | "clamp" | "repeat" | "mirror"] />     eee19.com
  29. 29. XML Bitmap repeat eee19.com
  30. 30. XML Bitmap mirror eee19.com
  31. 31. Custom font Typeface type = Typeface.createFromAsset(getAssets(), "fonts/Chalkboard.ttc"); eee19.com
  32. 32. Icon font eee19.com
  33. 33. developer.android.com eee19.com
  34. 34. developer.android.com eee19.com
  35. 35. developer.android.com/ guide/topics/resources/ drawable-resource.html eee19.com
  36. 36. Agora um exemplo de componente eee19.com
  37. 37. SlidingMenu https://github.com/jfeinstein10/slidingmenu eee19.com
  38. 38. SlidingMenu • Foursquare! • Rdio! • 9GAG! • Wunderlist 2! • Falcon Pro! •… eee19.com
  39. 39. eee19.com
  40. 40. SlidingMenu public class SlidingExample extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setTitle(R.string.attach); // set the content view setContentView(R.layout.content); // configure the SlidingMenu SlidingMenu menu = new SlidingMenu(this); menu.setMode(SlidingMenu.LEFT); menu.setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN); menu.setShadowWidthRes(R.dimen.shadow_width); menu.setShadowDrawable(R.drawable.shadow); menu.setBehindOffsetRes(R.dimen.slidingmenu_offset); menu.setFadeDegree(0.35f); menu.attachToActivity(this, SlidingMenu.SLIDING_CONTENT); menu.setMenu(R.layout.menu); } } eee19.com
  41. 41. SlidingMenu <com.slidingmenu.lib.SlidingMenu xmlns:sliding="http://schemas.android.com/apk/res-auto" android:id="@+id/slidingmenulayout" android:layout_width="fill_parent" android:layout_height="fill_parent" sliding:viewAbove="@layout/YOUR_ABOVE_VIEW" sliding:viewBehind="@layout/YOUR_BEHIND_BEHIND" sliding:touchModeAbove="margin|fullscreen" sliding:behindOffset="@dimen/YOUR_OFFSET" sliding:behindWidth="@dimen/YOUR_WIDTH" sliding:behindScrollScale="@dimen/YOUR_SCALE" sliding:shadowDrawable="@drawable/YOUR_SHADOW" sliding:shadowWidth="@dimen/YOUR_SHADOW_WIDTH" sliding:fadeEnabled="true|false" sliding:fadeDegree="float" sliding:selectorEnabled="true|false" sliding:selectorDrawable="@drawable/YOUR_SELECTOR"/> eee19.com
  42. 42. Referências eee19.com
  43. 43. www.androidviews.net eee19.com
  44. 44. appdevwiki.com eee19.com
  45. 45. Mais um pouco • • • • Google Fonts! Font Squirrel! Fontello! IcoMoon eee19.com
  46. 46. Obrigado • Twitter/ADN @douglasdrumond! • www.eee19.com! • gplus.to/douglasdrumond eee19.com

×