Profile cover photo
Profile photo
Udi Cohen

Post has attachment
Add a comment...

Post has attachment
I wrote a post for Facebook's engineering blog about performance optimization on Android.

We were using a HashSet for holding Long and Int values. After checking our memory footprint, we decided we can avoid all the autoboxing by creating a more optimized data structures.

In this post you can read how we found the problem, the options we had and what lead us to the chosen solution.

#perfmatters #androiddev
Add a comment...

Version 0.5.0 was released today!

What's new?
----------------------- - New design.
- Support for Groups of shows
- Bug fixes

Keep up with the great feedback. I would love to hear what you have to say about the new design and the new Groups feature.

Post has attachment
Add a comment...

Post has attachment
Got a new toy at work today!
Add a comment...

Post has shared content
Nice feature.

I'm not sure why the aspect ratio attribute is represented as a percentage, instead of a float for example (16:9 ->1.77). It's more natural.

Could it be that it was causing performance degradation when inflating the layout?
Use a fixed aspect ratio with the Percent Support Library 23.1
Pro-tip by +Ian Lake

The Percent Support Library ( makes it easy to set dimensions and margins in terms of a percentage of the overall space. In the 23.1 release (, it also gained the ability to set a custom aspect ratio via app:layout_aspectRatio.

This allows you to set only a single dimension, such as only the width, and the height will be automatically determined based on the aspect ratio you’ve defined, whether it is 4:3 or 16:9 or even a square 1:1 aspect ratio.

So building a navigation drawer header with a 16:9 background image would look like:
  <!-- The rest of your layout -->

You’ll note we use layout_widthPercent instead of layout_width - this ensures that the height is not erroneously set to 0dp before the first layout pass is done and ensures the aspect ratio is always correctly computed based on the current width.

So how did a 16:9 aspect ratio turn into 178%? Our target 16:9 aspect ratio can also be expressed as a 1.78:1 ratio or equivalently, a width 178% of the height. This is the format the layout_aspectRatio expects.

Of course, you can also define the aspect ratio in separate XML files with code such as:

<item name="header_aspectRatio" type="fraction">178%</item>

This makes it possible to change or reuse them across different form factors or layouts.

Material design designates a number of ratio keylines ( which you can use in your app, but you could also consider using this for list items (where you may be using ?android:attr/listPreferredItemHeight) with items such as a profile image or video thumbnail for a fixed aspect ratio.

You’ll be able to use this with PercentFrameLayout, PercentRelativeLayout, or through any custom ViewGroup using PercentLayoutHelper (
Add a comment...

Version 0.4.1 was released.

What's new:
- Stability fixes
- Better network performance

Version 0.4.0 was published.

What's new:
- Better Search and Add experience
- Performance enhancements 
- Stability fixes

Hi all

I published an updated version to fix a crash on start time.

You should receive it through the Play store. Please let me know if you're still experiencing problems.

+Amir Shapsa Hi!
You mentioned that Grabag is crashing when you open it. Can you share what device and OS version are you using?

Wait while more posts are being loaded