Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Implementing the UI for Weather App
- // We are successfully requesting data from the Web and
- // parsing it into a custom data model.
- // Well done.
- // Now we just need to create our layout and feed it data from our custom class.
- // oh noes the degree image doesn't line up at all!?
- // actually it does, it just doesn't look at it in the preview.
- // important lesson: always run the emulator and don't depend on the image preview
- // to insert image >insert ImageView in design mode. Go to "src" the properties sidebar> click the [...] thingy > scroll down and proceed to find the right image under drawable folder in project tab. simple.
- https://teamtreehouse.com/library/build-a-weather-app/building-the-weather-ui/starting-at-the-center
- //-----------------------------------------------------------------------------------
- Styles.xml
- <resources>
- <!-- Base application theme. -->
- <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> // Choose an theme (real) for your app that will appear on phone
- <!-- Customize your theme here. -->
- </style>
- </resources>
- // https://teamtreehouse.com/library/build-a-weather-app/building-the-weather-ui/adding-the-upper-half
- // Now, before we make any changes, I just want to let you know about an important
- // point that we always need to remember when working with layout weight.
- // For the items that we want to balance using layout weight we need to
- // set the layout width of them to either wrap content or
- // even zero to let Android calculate the appropriate widths.
- // If we forget to do this we can run into annoying issues that are hard
- // to troubleshoot.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement