Android Dev Tip #1

Keeping a ViewGroup reference

Tip:

If you plan on keeping a reference to any ViewGroup (LinearLayout, FrameLayout, RelativeLayout, etc.), and you don’t want to use any methods specific to this particular type of Layout, keep it as a ViewGroup object.

Explanation:

Example:

If you enjoyed this post, please show your support! Recommend, follow, comment. This means a lot!

senior android engineer @reddit | former android tech lead @getthefabulous | recovering feature creep 💉 | https://github.com/blipinsk

The (retired) Pub(lication) for Android & Tech, focused on Development