Cover photo
Avinash Ananth Narayan R
Attended MCT
Lives in Banglore, India
274 followers|502,685 views


Understanding Retrofit 2.0
Retrofit has been simplifying HTTP calls for years and this new version is no different. In addition to fixing some long-standing annoyances, there are a handful of new features which make it more powerful than ever. This talk will focus on how the new APIs in Retrofit aid in making HTTP calls as simple as possible for your app. The integration with OkHttp and Okio APIs will be covered to ensure a full understanding of the HTTP stack. Common u...
Add a comment...
This morning at #DroidconNYC , +Nick Butcher, +Chris Banes and I delivered a talk titled What's New in Android UI Engineering, covering Android 6.0 Marshmallow, new support libraries, upcoming tooling updates, and more! Check out the slides + videos in this slideshow.

#AndroidDesign #AndroidDev
21 comments on original post
Add a comment...
OK, who wants to hear some TCP joke?
Add a comment...
+Android Developers Since the google code is going to read-only mode¹, where will be the issues hosted now?

Wojtek Kaliciński's profile photochu weihung (DarK Man)'s profile photo
The issues remain where they are for the time being. We aim to provide uninterrupted access to a bug tracker for Android, but we don't have anything to announce right now.
Add a comment...
What a Terrible Failure
Every statue in Brazil. I'm speechless. I thought Germany would win, but 5-0? In Brazil? At the half!? 
Add a comment...
Why isn't there a life-cycle for the card?

I'll quote some possible scenarios where this may be useful:

* preserving the state of CardExpand
* removing listeners that may be created by the card.

I can extend the Card and implement this myself, but seems quite tedious if it's required to do in multiple projects
Avinash Ananth Narayan R's profile photoGabriele Mariotti's profile photo
Sorry for the monstre delay.
Your code can work, but I am not convinced to use the view to store this kind of info.
I would use the card model with a parcelable interface. 
Add a comment...
Have him in circles
274 people
Android ATC's profile photo
Mangalamurthy Bhat (Aaryadev)'s profile photo
Jino Jose's profile photo
Kaama K's profile photo
Arun Ashok's profile photo
Raghavendra Rao's profile photo
Varun Kumar A's profile photo
Jeshwanth Kumar N K's profile photo
Jeeni Software's profile photo
Use cold start time effectively with a branded launch theme
Pro-tip by +Ian Lake

When your app isn’t in memory and is launched, that ‘cold start’ can take significantly longer than if your app is already in memory. Depending on the size of your app and what you’re doing in your Application’s onCreate() (as little as possible I hope!), there may be lag between when the user starts your app and your Activity’s onCreate() is actually called. During that time, the window manager makes its best effort to draw a placeholder UI using elements from your theme such as the background and status bar color.

But the background doesn’t have to be a solid color: it can be an opportunity to add a little more personality and branding to your app without slowing down the user through the use of a branded launch screen (, allowing your app UI to focus on content rather than additional branding. The key is creating a custom theme that overrides android:windowBackground, then replacing that custom theme with your standard theme before calling super.onCreate().

Assuming you have a theme called AppTheme, your launcher theme would be:
<style name="AppTheme.Launcher">
  <item name="android:windowBackground">@drawable/launch_screen</item>

This implies that everything about the launcher theme is inherited from your main theme - you’re just changing the windowBackground. One other attribute you may consider changing here is colorPrimaryDark: the status bar color on Android 5.0+ devices. Setting colorPrimaryDark to your main background color can put more emphasis on your branding at the expense of another element changing when transitioning to your final theme.

But drawable/launch_screen can’t be just a simple image, unfortunately - it’ll end up stretched to fill the entire screen. Instead, you can use an XML file such as:
<layer-list xmlns:android="" android:opacity="opaque">
  <!-- The background color, preferably the same as your normal theme -->
  <item android:drawable="@android:color/white"/>
  <!-- Your product logo - 144dp color version of your app icon -->

Make particular note of the android:opacity=”opaque” line - this is critical in preventing a flash of black as your theme transitions.

Then apply your theme to your activity in your AndroidManifest.xml using android:theme="@style/AppTheme.Launcher".

The easiest way to transition back to your normal theme is to call setTheme( before super.onCreate() and setContentView():
public class MyMainActivity extends AppCompatActivity {
  protected void onCreate(Bundle savedInstanceState) {
    // Make sure this is before calling super.onCreate
    // ...

Things to note with this approach:
- No launchpad activity - there’s no delay such as there would be if you were launching a second activity from a dedicated splash screen style activity
- No artificial delays - you’re only using the time that you have, just taking advantage of theming
- No extra overdraw - resetting your theme removes a layer of overdraw compared to having an opaque view with your normal background above the custom windowBackground
- Only for your launcher activity - this isn’t appropriate for deep links into your app or handling a URI, but for launches done through the home screen - the point is to minimize dead time, not to annoy users.
- Fast is best - keeping your app lean and minimizing work done at startup is critical to a good experience, even if that means slightly less time for branding - remember: getting users to the content they care about should be your #1 priority.
- Watch your transition - keep both the number and complexity of your transitions to a minimum by sharing as many elements (colors, etc) as possible to make for a seamless transition straight to content.

58 comments on original post
Add a comment...
Is it against policy to use a variation of play store icon for an app's launcher icon?
Mike Wolfson's profile photoAvinash Ananth Narayan R's profile photoLouis Cognault's profile photoJean Bernard Breu (jeanjean)'s profile photo
Ask Google directly to use their logo, and maybe they will even give you an offer (for hiring) 😉
Add a comment...
Who said robots can't get drunk?
I guess we're safe from an evil overlord robot uprising for at least a few more years...
10 comments on original post
Bhaskar Chowdhury's profile photo
Add a comment...
+Android Developers shouldn't a lint warning be shown when an incompatible android.R.attr is used as value?

I believe this is a missed case. Can you please check?


PS: bug reported:

PPS: another bug: intention not working as intended: (too lazy to create another post on this)

/cc +Tor Norbye, +Alex Ruiz 
Add a comment...
Mars Panorama - NASA’s Curiosity Mars Rover selfie: Martian night
(Digital Art Compilation)
Fredrick Gichuhi's profile photo
such an awesome pic
Add a comment...
Avinash Ananth Narayan's Collections
Have him in circles
274 people
Android ATC's profile photo
Mangalamurthy Bhat (Aaryadev)'s profile photo
Jino Jose's profile photo
Kaama K's profile photo
Arun Ashok's profile photo
Raghavendra Rao's profile photo
Varun Kumar A's profile photo
Jeshwanth Kumar N K's profile photo
Jeeni Software's profile photo
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Banglore, India
Cochin, India
  • MCT
    B.Tech, 2007 - 2011
Basic Information
Apps with Google+ Sign-in
  • GDG-X
  • BallMaze
  • Atomas
  • Asphalt 8:Airborne
  • Lara Croft:Relic Run
  • MARVEL Contest of Champions
  • Brain Dots
  • Shadow Fight 2