jamesmuskett / newWeather

my 1st go at an android app
0 stars 0 forks source link

Create a custom composite view for weather details #13

Open vaughandroid opened 9 years ago

vaughandroid commented 9 years ago

Approach (e.g. ProgressView / progress.xml in the LR project)

  1. Create a new class which extends ViewGroup, or more likely one of its subclasses like LinearLayout. e.g. com.jmuskett.newweather.WeatherView
  2. Move the views into a new XML file. e.g. weather_view.xml The top-level XML tag should be
  3. 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"