Google's Obsession with Sweet Treats. What's new in ICS and the Future of Android

31
Faisal Abid @faisalabid www.faisalabid.com GOOGLE’S OBSESSION WITH SWEET TREATS

description

Ice cream sandwich is Googles most ambitious version of Android to date and the reviews have been positive. Get an in-depth ride through Ice cream sandwich, what it has to offer and what the future holds of Android's next version Jellybean. We will cover topics such as dealing with multiple screen sizes, Async Tasks, the new powerful animation framework and lastly we will look into what we can expect from Jellybean, Android 5.0.

Transcript of Google's Obsession with Sweet Treats. What's new in ICS and the Future of Android

Page 1: Google's Obsession with Sweet Treats. What's new in ICS and the Future of Android

Faisal Abid @faisalabidwww.faisalabid.com

GOOGLE’S OBSESSION WITH SWEET TREATS

Page 2: Google's Obsession with Sweet Treats. What's new in ICS and the Future of Android

Faisal Abid @faisalabidwww.faisalabid.com

ICECREAM SANDWICH AND OTHER DELICIOUS THINGS

Page 3: Google's Obsession with Sweet Treats. What's new in ICS and the Future of Android

Faisal Abid @faisalabidwww.faisalabid.com

• Software Developer working with Android

since the beta days

• Previously a Flex/Flash and ColdFusion developer.

• Co-Author Flex 3 in Action

• Currently apart from Android, heavily involved in

the Node.js and CoffeeScript community.

• Entrepreneur, Author, Teacher & Developer

WHO AM I?

Page 4: Google's Obsession with Sweet Treats. What's new in ICS and the Future of Android

Faisal Abid @faisalabidwww.faisalabid.com

ABOUT THIS TALK

What’s cool in 3.0/4.0

• Design Guidelines

• Animation Framework

• ActionBar Framework

• Fragments

• New Views

• Dialog Fragments

The Future of Android Development

Page 5: Google's Obsession with Sweet Treats. What's new in ICS and the Future of Android

Faisal Abid @faisalabidwww.faisalabid.com

DESIGN GUIDELINES

Previous versions of Android looked like crap. There I said it.

• ICS looks beautiful.

• ICS focuses on simplicity

• Bye bye menu button

• Bye bye hardware keys

ICS is designed for multiple screens.

Flat look. Easy to scale.

Page 6: Google's Obsession with Sweet Treats. What's new in ICS and the Future of Android

Faisal Abid @faisalabidwww.faisalabid.com

ACTIONBAR

Page 7: Google's Obsession with Sweet Treats. What's new in ICS and the Future of Android

Faisal Abid @faisalabidwww.faisalabid.com

SWIPING (VIEW PAGER)➸

Page 8: Google's Obsession with Sweet Treats. What's new in ICS and the Future of Android

Faisal Abid @faisalabidwww.faisalabid.com

HOLO THEME

Page 9: Google's Obsession with Sweet Treats. What's new in ICS and the Future of Android

Faisal Abid @faisalabidwww.faisalabid.com

ANIMATION FRAMEWORK

• Previous versions of Android did not do animations well

• I hated the anim.xml files for simple animations

• With Honeycomb, Android introduced .animate()

on all views.

Page 10: Google's Obsession with Sweet Treats. What's new in ICS and the Future of Android

Faisal Abid @faisalabidwww.faisalabid.com

DEMO

Page 11: Google's Obsession with Sweet Treats. What's new in ICS and the Future of Android

Faisal Abid @faisalabidwww.faisalabid.com

OBJECTANIMATOR, VALUEANIMATOR

• .animate() is powerful, but ObjectAnimator and

ValueAnimator are even more powerful.

• ObjectAnimator allows you to animate any property

of an object

objectAnimatorNext = ObjectAnimator.ofFloat(this, “translationX”, 100f);

objectAnimatorNext.setInterpolator(new DecelerateInterpolator());

objectAnimatorNext.start();

Page 12: Google's Obsession with Sweet Treats. What's new in ICS and the Future of Android

Faisal Abid @faisalabidwww.faisalabid.com

QUICK WALKTHROUGH

PARALLAXParallax is cool, everyone wants to do it

and wants to know how.

Lets walk through how to do a simple parallax

effect using ObjectAnimator

Page 13: Google's Obsession with Sweet Treats. What's new in ICS and the Future of Android

Faisal Abid @faisalabidwww.faisalabid.com

SUMMARY HOW IT WORKS

• Foreground has to be faster.

• ObjectAnimator animates it forward and backwards

• Check if Animation already running to prevent it going nuts

• To make it usable in the real world you will need to fix the

edges of the imageview so that it doesn’t overflow.

Page 14: Google's Obsession with Sweet Treats. What's new in ICS and the Future of Android

Faisal Abid @faisalabidwww.faisalabid.com

VALUEANIMATOR

• Not all views have all the properties ready to be animated

using .animate()

• ValueAnimator will handle the rest for you.

• Animates the values from x to y.

Page 15: Google's Obsession with Sweet Treats. What's new in ICS and the Future of Android

Faisal Abid @faisalabidwww.faisalabid.com

DEMO

Page 16: Google's Obsession with Sweet Treats. What's new in ICS and the Future of Android

Faisal Abid @faisalabidwww.faisalabid.com

VALUEANIMATOR

That’s cool but how do I animate it?• So we ran it. But.. It didn’t do anything. It knows nothing of

the progressbar.

• Enter onAnimateUpdateListener

Page 17: Google's Obsession with Sweet Treats. What's new in ICS and the Future of Android

Faisal Abid @faisalabidwww.faisalabid.com

DEMO

Page 18: Google's Obsession with Sweet Treats. What's new in ICS and the Future of Android

Faisal Abid @faisalabidwww.faisalabid.com

ACTIONBAR

• Bigger screens, thumb easier to click on top.

• Android introduced ActionBar in Honeycomb,

but ICS makes it much more cooler.

• ActionBar can support multiple screen resolution

with ease.

Page 19: Google's Obsession with Sweet Treats. What's new in ICS and the Future of Android

Faisal Abid @faisalabidwww.faisalabid.com

HOW TO USE ACTIONBAR

• ActionBar a = getActionBar()

• Actionbar uses the menuInflator and the

onCreateOptionsMenu

• Why? To support backwards compatibility.

Do I like it? No.

Page 20: Google's Obsession with Sweet Treats. What's new in ICS and the Future of Android

Faisal Abid @faisalabidwww.faisalabid.com

IFROOM | WITHTEXT

• One thing I like very much is the IfRoom|WithText

parameters.

• If the screen is small, they will just appear in the

overflow icon for GalaxyNexus+ or in the menu on

phones with hardware keys.

Page 21: Google's Obsession with Sweet Treats. What's new in ICS and the Future of Android

Faisal Abid @faisalabidwww.faisalabid.com

DEMO

Page 22: Google's Obsession with Sweet Treats. What's new in ICS and the Future of Android

Faisal Abid @faisalabidwww.faisalabid.com

FRAGMENTS

• Android is fragmented, so they introduced Fragments. Heh heh.

• Support large and small screen layouts.

Page 23: Google's Obsession with Sweet Treats. What's new in ICS and the Future of Android

Faisal Abid @faisalabidwww.faisalabid.com

ON A SINGLE SCREEN

Page 24: Google's Obsession with Sweet Treats. What's new in ICS and the Future of Android

Faisal Abid @faisalabidwww.faisalabid.com

ON A TABLET

Page 25: Google's Obsession with Sweet Treats. What's new in ICS and the Future of Android

Faisal Abid @faisalabidwww.faisalabid.com

GRIDLAYOUT AND SPACE

• ICS introduces two new Views.

• GridLayout and Space

• Gridlayout lets you get an amazing layout structure while

space, well spaces out your layout

Page 26: Google's Obsession with Sweet Treats. What's new in ICS and the Future of Android

Faisal Abid @faisalabidwww.faisalabid.com

GRIDLAYOUT

• Previous, we used LinearLayout, FrameLayout and

a combination of other Layouts to get a pretty cool

UI done.

• With GridLayout, we can achieve the same without

multiple views

• Less views = faster load times.

Page 27: Google's Obsession with Sweet Treats. What's new in ICS and the Future of Android

Faisal Abid @faisalabidwww.faisalabid.com

DEMO

Page 28: Google's Obsession with Sweet Treats. What's new in ICS and the Future of Android

Faisal Abid @faisalabidwww.faisalabid.com

DIALOG FRAGMENT

• Recently introduced

• DialogFragment gets rid of the ugly onCreateDialog(int)

No more case switching for no reason.

• Scales perfectly on all phone sizes

• Easy to use. You can pass listeners objects to the dialog

for notification results!

Page 29: Google's Obsession with Sweet Treats. What's new in ICS and the Future of Android

Faisal Abid @faisalabidwww.faisalabid.com

DEMO

Page 30: Google's Obsession with Sweet Treats. What's new in ICS and the Future of Android

Faisal Abid @faisalabidwww.faisalabid.com

FUTURE OF ANDROID

Im not a Google employee so I have no idea. But I can make

some educated guesses.

PROS

• Better API support for Cloud.

• Siri altnerative with an open API

• More Focus on Gaming. Android

Game Center? OpenFient Acquisition?

• More options for TV development,

Google Glasses Integration.

CONS

• More and More phones. Android is

growing at a crazy rate. Which means

more trouble for developers to port on

different phones.

• Which means Bad android reviews and

discouragement to develop further.

• iPhone starts to look very promising in

this scenario.

Page 31: Google's Obsession with Sweet Treats. What's new in ICS and the Future of Android

Faisal Abid @faisalabidwww.faisalabid.com

THANK YOUANY QUERIES?