Approach (e.g. ProgressView / progress.xml in the LR project)
Create a new class which extends ViewGroup, or more likely one of its subclasses like LinearLayout. e.g. com.jmuskett.newweather.WeatherView
Move the views into a new XML file. e.g. weather_view.xml The top-level XML tag should be
Include the layout inside another view by adding an element, with the android:layout value set to the name of your new XML file - e.g. "@layout/weather_view"
Approach (e.g. ProgressView / progress.xml in the LR project)