Skip to content

domkris/Practice-Weather-App-Android

Repository files navigation

Practice-Weather-App-Android

This project is an Android application "Weather Info" used as an weather forecast made in Android Studio.
I have been doing this project to learn Android programming and how to make Android applications.

Interface

promisechains


From left to right:
  • First image shows the user interface when the application is launched,
    in the City selection field user can type in the name of desired city,
    in this case Helsinki is typed in.
  • Second picture shows the display when user types in the name of the city and clicks Check City button,
    in this case the weather forecast for Helsinki is shown for today's date and 4 other dates.
  • Third picture: User can click on one of displayed dates for a detailed forecast ( in second image ),
    which leads to another display where user can see the weather forecast per every three hours on a specific date.
  • Forth picture: if user wants to see the location of the place, he or she can click on the Google Map button ( in second image ),
    user can click the marker on the map to see the name of the city, country code and the temperature

Clicking the back button will lead to previous display.

Code description

Java classes

MainActivity DetailedActiviy MapsActivity MyDBHandler MyGrid XMLParserJava
The main activity, created when the application is launched, first image. Second activity, created when user clicks on a specific date to see detailed forecast, third image. Third activity, shows the location of the place using the developers.google.com/maps API, created when user clicks on a Google Map button, forth image. This class is used to handle the database (SQLite) of the application that contains descriptions, temperatures and the dates of a selected place, instantiated in the MainActivity class This class contains the data for the GridView, it gets the data from the MyDBHandler database, instantiated in the MainActivity class. This class is used to read the XML file from the openweathermap.org/api, in a separate thread, and to save the desired informations from the page into the MyDBHandler database instantiated in the MainActivity class.
Layouts:
activity_main.xml, content_main.xml
Layouts:
activity_detailed.xml
Layouts:
activity_maps.xml
Layouts:
grid_single.xml
All weather images in res/drawable are downloaded from openweathermap.org/api.

Possible improvements

  • Instead of Google Map button, the map could be displayed in the main class and contain all of descriptions and images
  • Adding a slider to the Google Map that will show the weather decsriptions for a specific date
  • Improvement of the user interface (design & colors)
  • The size of weather image is automaticaly adjusted according to the device, one of the improvements would be to design images in various (hdpi, xhdpi, etc..) sizes

About

Weather forecast Android application "Weather Info"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages