That shouldn’t be too difficult.

Imagine if you have a layout for an activity that has a RelativeLayout that contains a TextView and an ImageView. Naturally one would think that the logic implementation of that TextView and ImageView would resides in the activity (or it’s view model).

However if you make a customer view (that has the RelativeLayout that contains a TextView and an ImageView), then all the logic now would reside within the custom view, instead of the activity.

That’s a separation of concern.

Written by

Passionate about learning, and sharing mobile development and others https://twitter.com/elye_project https://www.facebook.com/elye.proj

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store