Used Dark Theme for the UI
Screen One :
- Used Recycler view to load dynamic lists
- Details of Pet along with photo is being is displayed.
- Used Picasso library to fetch image.
Screen Two :
- Used Webview to load the webpage.
- Prevented web redirected by using { shouldOverrideUrlLoading }.
Json Parser :
- Created a json parser { readJson } to parse json file to Json Object.
Pet Object :
- Declared a pet object to save pet data.
Config parsing :
-
Created { parseWorkingHours } function to get data from config json object.
-
Used string split to reafctor data and separate date and time.
-
Created Dyanamic time parser from config file. Data is Mapped as
- Monday = 'M' / 'MO'
- Tuesday = 'T'
- Wednesday = 'W'/'WE'
- Thrusday = 'TH'
- Friday = 'F'/'FR'
- Saturday = 'SA'
- Sunday = 'SU'
for eg if i want to set working hours Tuesday to friday 10 am - 6 pm i would be using 'TU-FR 10:00 - 18:00'
Files and Usage:
- Constants.java - For storing Contant Strings
- MainActivity - UI declarations to screen 1, readJson, parseWorkingHours.
- PetInfo - Loading webpage with content_url info.
- PetObject - Object Info and related fields.
- RecyclerAdapter - Adapter for Recycler View.