amazing android
play

Amazing Android How We Built Square Friday, May 14, 2010 Friday, - PowerPoint PPT Presentation

Amazing Android How We Built Square Friday, May 14, 2010 Friday, May 14, 2010 Friday, May 14, 2010 Friday, May 14, 2010 Friday, May 14, 2010 Friday, May 14, 2010 Friday, May 14, 2010 Friday, May 14, 2010 Friday, May 14, 2010 Friday, May


  1. Amazing Android How We Built Square Friday, May 14, 2010

  2. Friday, May 14, 2010

  3. Friday, May 14, 2010

  4. Friday, May 14, 2010

  5. Friday, May 14, 2010

  6. Friday, May 14, 2010

  7. Friday, May 14, 2010

  8. Friday, May 14, 2010

  9. Friday, May 14, 2010

  10. Friday, May 14, 2010

  11. Friday, May 14, 2010

  12. Friday, May 14, 2010

  13. Friday, May 14, 2010

  14. How We Did It Friday, May 14, 2010

  15. Paper Textures Friday, May 14, 2010

  16. enum Noise { GRAY(0x64676E), PAPER(0xDEDFE1), BACKGROUND(0xBCBEC2), STANDARD_BUTTON(0xcccccc), TITLE_BAR_EMPHASIZED(0x505356); private final Bitmap bitmap; Noise(int startingColor) { bitmap = Factory.newBitmap( Factory.generatePalette(startingColor)); } Bitmap getBitmap() { return bitmap; } Friday, May 14, 2010

  17. /** Creates a new bitmap filled with noise. */ private static Bitmap newBitmap(int[] palette) { int[] noise = new int[SIZE]; byte[] paletteIndices = PALETTE_INDICES; for (int i = 0; i < SIZE; i++) noise[i] = palette[paletteIndices[i]]; return Bitmap.createBitmap(noise, LENGTH, LENGTH, ARGB_8888); } Friday, May 14, 2010

  18. class PaperTexture extends Drawable { private Paint bitmapPaint = new Paint(); private ShapeDrawable.ShaderFactory highlight; PaperTexture(PaperColor paperColor, ShapeDrawable.ShaderFactory highlight) { bitmapPaint.setShader(new BitmapShader( paperColor.getNoise().getBitmap(), REPEAT, REPEAT)); this.highlight = highlight; } } Friday, May 14, 2010

  19. public class TitleBar extends RelativeLayout { public TitleBar(Context c, AttributeSet attrs) { setBackgroundDrawable(PaperTextures.color( PaperColor.TITLE_BAR) .highlightPercentage(90).drawable()); } } Friday, May 14, 2010

  20. Building Blocks • Bitmap • Paint • Drawable • Shader Friday, May 14, 2010

  21. Hud Friday, May 14, 2010

  22. public class Hud { public static void showImageToast( Context context, int imageResourceId) { ImageView hud = new ImageView(context); hud.setBackgroundResource(R.drawable.hud); hud.setImageResource(imageResourceId); Toast toast = new Toast(context); toast.setView(hud); toast.setDuration(Toast.LENGTH_SHORT); toast.setGravity(Gravity.CENTER, 0, 0); toast.show(); } } Friday, May 14, 2010

  23. Numeric Keyboard Friday, May 14, 2010

  24. Show Code Friday, May 14, 2010

  25. IconFlipper Friday, May 14, 2010

  26. Using IconFlipper IconFlipper flipper = (IconFlipper) findViewById( R.id.on_off_icon); IconFlipper.Icon onIcon = flipper.newIcon( R.drawable.on); IconFlipper.Icon offIcon = flipper.newIcon( R.drawable.off); onIcon.show(); ... offIcon.show(Transition.FLIP); Friday, May 14, 2010

  27. Rounded Corners Picture Frame Friday, May 14, 2010

  28. Bitmap bitmap = Bitmaps.decode(fromFile(file)) .scale(imageSize) .square() .roundCorners(radius, borderWidth, borderColor) .create(resources); Friday, May 14, 2010

  29. PercentageLayout Friday, May 14, 2010

  30. PaymentBook Friday, May 14, 2010

  31. SignatureView Friday, May 14, 2010

  32. JSON • PaymentService Friday, May 14, 2010

  33. QueueFile • YAFFS filesystem - Atomic segment writes Friday, May 14, 2010

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend