Weather icon indicating copy to clipboard operation
Weather copied to clipboard

Splash Screen

Open Sparker0i opened this issue 8 years ago • 29 comments

Good first issue for newbies.

Someone could implement the Splash screen GlobalActivity.java, which has the app icon and a spinner.

So GlobalActivity will need some refactoring:

  • If the app is launched when city has not been set, it should redirect to the Enter City screen. Then the user will enter his city there and redirect to WeatherActivity
  • If the app is launched after the city has been set, it should load the weather data (JSON) in the GlobalActivity itself, and then send this data to the WeatherFragment/WeatherActivity and display it there.

Sparker0i avatar Oct 16 '17 08:10 Sparker0i

I've just started to work on this. Assign to me @Sparker0i

szaboa avatar Oct 16 '17 09:10 szaboa

I would really like to do this as well :D

flxwu avatar Oct 16 '17 10:10 flxwu

@Pl4gue You can do it! @Sparker0i I suggest to you to read the "Clean code" by Robert Cecil Martin :)

szaboa avatar Oct 16 '17 11:10 szaboa

Alright, started working on it.

flxwu avatar Oct 16 '17 15:10 flxwu

Is this still open?

santhoshsamy29 avatar Oct 24 '17 20:10 santhoshsamy29

Yes

On 25-Oct-2017 2:20 AM, "Santhosh Kumar Munisamy" [email protected] wrote:

Is this still open?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Sparker0i/Weather/issues/27#issuecomment-339126831, or mute the thread https://github.com/notifications/unsubscribe-auth/AOSdWApkqV1ieG4Hiv3jIbZpNT3hYFNwks5svk2cgaJpZM4P6O07 .

Sparker0i avatar Oct 25 '17 02:10 Sparker0i

I would like to work on it. Please assign me.

ayush251196 avatar Dec 08 '18 02:12 ayush251196

Hi @ayush251196 I have added you as a collaborator. Please accept the invite so that I can assign this to you :)

Sparker0i avatar Dec 08 '18 10:12 Sparker0i

java.lang.NullPointerException: Attempt to invoke virtual method 'void com.github.jorgecastilloprz.progressarc.ProgressArcView.show()' on a null object reference

ayush251196 avatar Dec 11 '18 20:12 ayush251196

That is unusual. How are you opening the WeatherActivity from the Splash Screen?

Sparker0i avatar Dec 12 '18 13:12 Sparker0i

Actually, I changed my implementation. The error is not coming now. Please review my commit.

ayush251196 avatar Dec 12 '18 18:12 ayush251196

Can I work on this issue?

yashk2000 avatar Dec 14 '18 08:12 yashk2000

Once I downloaded the data or json in Global Activity how should I send it to other activity for populating the views?

ayush251196 avatar Dec 28 '18 02:12 ayush251196

Once I downloaded the data or json in Global Activity how should I send it to other activity for populating the views?

I'm sure there is a function in WeatherFragment which is used to render the data and display it. Go through the code and find that function. So once you finish loading the data in the splash screen, send it to the WeatherActivity, then while launching the WeatherFragment you can set this data inside a Bundle, then retrieve the data from it, then use the rendering function to display the data.

Sparker0i avatar Dec 28 '18 06:12 Sparker0i

I have implemented the data loading in global activity but as data loading is so fast that the splash screen layout is hardly visible to the user. Within milliseconds the Weather activity gets started. Should I use a handler to delay the control flow so that user may be able to see the splash screen for 1 or 2 seconds.

ayush251196 avatar Dec 29 '18 07:12 ayush251196

as data loading is so fast that the splash screen layout is hardly visible to the user. Within milliseconds the Weather activity gets started.

Is this on a WiFi/4G Network?

Sparker0i avatar Dec 29 '18 09:12 Sparker0i

Yes, I am on a 4G network.

ayush251196 avatar Dec 29 '18 10:12 ayush251196

I think because data is not that much huge, type of connectivity shall not affect data loading.

ayush251196 avatar Dec 29 '18 10:12 ayush251196

I think because data is not that much huge, type of connectivity shall not affect data loading.

Most of my user base is from 3G phones. I just want to know whether you are able to load the data in the splash screen and send it to the fragment or not?

Sparker0i avatar Dec 29 '18 11:12 Sparker0i

Yes, I have done that.

ayush251196 avatar Dec 29 '18 11:12 ayush251196

Cool. Make a PR. Will review that

Sparker0i avatar Dec 29 '18 11:12 Sparker0i

https://drive.google.com/open?id=1A5jrweBKi1W9mSZoed6mf55vzJz7ZFYy

ayush251196 avatar Dec 29 '18 11:12 ayush251196

Please review the screen record.

ayush251196 avatar Dec 29 '18 11:12 ayush251196

`Nicely done. Just wanted to know where you extracted that splash screen icon from?

Sparker0i avatar Dec 29 '18 11:12 Sparker0i

its in mipmap/ic_launcher_foreground

ayush251196 avatar Dec 29 '18 12:12 ayush251196

its in mipmap/ic_launcher_foreground

Please copy app/src/ic_launcher_x-web.png to the drawable folder and then use it

Sparker0i avatar Dec 30 '18 09:12 Sparker0i

I have done it.

ayush251196 avatar Dec 30 '18 11:12 ayush251196

Was there some bug in the splash screen that I implemented?

ayush251196 avatar Jan 13 '19 05:01 ayush251196

Might be. I also accepted another patch. Maybe from that too.

On the Enter City page (on first startup until entering default city), when we click on the location icon and go to the WeatherActivity, it crashes.

Even otherwise when undoing your commit, there were a few other bugs too. That is why I have reset master to the last working build, and all other progress from KWoC is safe in the um branch

Sparker0i avatar Jan 13 '19 18:01 Sparker0i