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

Okulus - Droidcon India 2014

Okulus - Droidcon India 2014

Slides for Droidcon India 2014

Vinay S Shenoy

December 04, 2014
Tweet

More Decks by Vinay S Shenoy

Other Decks in Technology

Transcript

  1. okulus - Awesome Image Effects Vinay S Shenoy Android App

    Developer at flipkart.com [email protected] @vinaysshenoy http://github.com/vinaysshenoy
  2. Upcoming trends • Faster and cheaper internet => Richer content

    • Images, Images, Images! • Visual treatment for images can make your app stand out
  3. Prettify images - Most common ways • Circles & Rounded

    corner shapes • Borders • Shadows
  4. Cropping • Various techniques are available when you search •

    But are they the best? • CPU Usage, Memory usage, Overdraw problems arise
  5. What is okulus? • Custom ImageView widget • Comes with

    a bunch of great effects which can be used without any hassle • ZERO Overdraw, NO excess CPU or Memory usage • New effects and features will be added constantly
  6. • All of these can be achieved by setting a

    few attributes in your layout XMLs • cornerRadius to set the strength of the rounded corners • borderWidth and borderColor to define image borders • fullCircle to force the image to be drawn with a circular shape • shadowColor, shadowWidth and shadowRadius to configure shadows • touchSelectorEnabled and touchSelectorColor to draw selectors when the View is touched
  7. What does okulus support? • Rounded rectangles • Circles •

    Customizable borders • Shadows • Custom touch selectors
  8. Compatibility • How does it play with Image Loading libraries

    • If your image loading library calls setImageBitmap() to actually set the image, you’re golden • Tested with popular libraries - Picasso, Glide, Volley and UniversalImageLoader • Integration examples are available in the sample application
  9. Limitations • Bitmap needs to resized to the view dimensions

    before getting set • Center Crop, FitXY are fully supported, others are coming soon • Limitations are temporary only!
  10. Awesome! Where do I get it? • Add compile ‘com.vinaysshenoy:okulus:0.9.1@aar’

    to your gradle script • Make a library project for Eclipse • Apache License, Version 2.0