Share My Creation Astro Weather

This application retrieves weather data and computes astronomical times for any location on Earth.
It is designed for 10" (1280 x 800 x 1 or 1920 x 1600 x 1.5) tablets in landscape mode only, and currently beta.

http://www.requio.com/b4aforum/aw1.png

http://www.requio.com/b4aforum/aw2.png

http://www.requio.com/b4aforum/tenki.apk
Right-click and select Save link as...

APK updated on Dec 1st 2012:
* Control buttons renamed.
* Save or clear a city as start-up location.
* [City Search] returns the selected city only.
* Fully, CH added to the location database.
* Help under Settings modified accordingly
 

Attachments

  • aw0.png
    aw0.png
    54.8 KB · Views: 4,978
Last edited:

sorex

Expert
Licensed User
Longtime User
It is designed for 10" (1280 x 800) tablets only.

Out of curriosity...

What happends if I run it on my 10" 1024x800 tablet?

does it downscale to my resolution or simply prompt an error and exit?
 

alfcen

Well-Known Member
Licensed User
Longtime User
Not sure, sorex, I don't have a 1024 x 800 tablet for testing, but I would assume that 256 pixels could be truncated at the right of your display. The app is posted for free. You won't loose anything trying it.
 

NJDude

Expert
Licensed User
Longtime User
First of all, let me tell you one thing, your app is absolutely beautiful.

A few things:

1- Change the scrolling color to TRANSPARENT on those listviews, otherwise you'll see a black background everytime you scroll it.

2- The "Night" button, the text should change to "Day" after it's pushed, it's confusing the way it is now.

3- The "Unlock" button, how do you "lock" again?, it happens only if you tap on some other button.

4- You should consider adapting this app for 7 inch tabs as well.

In case you want to see how it looks on a 7 inch tablet, look at THIS screen shot.

Overall, very cool app, keep up the good work.
 
Last edited:

alfcen

Well-Known Member
Licensed User
Longtime User
Hey Dude,

Thanks a lot for trying the app. It is always good to see different views.

1. There is no black BG here when I scroll, but for safety, it is now set to transparent. Good point!

2. Agreed. This button toggles the night shadow on and off. I renamed it as [Shadow]. Also renamed
[World] as [Seek]. Actually, these should be Toggle Switches. I am considering a class for this to replace.

3. This, too, should be a toggle. The globe gets locked whenever you press [World] or [Local].

4. If I had a 7" tablet for testing... The screen shot you kindly posted is 1280 x 800 large.
Is this the resolution of your 7" screen? If so, it should fit.

Off topic, but I am spending over 50% of coding time with scaling and layout testing.
Makes me truly exhausted.:BangHead:

I will post an update after collecting further inputs, if any check in.


Hello Tom,
Thanks once again for your motivating words.
 

alfcen

Well-Known Member
Licensed User
Longtime User
Certainly, but there is nothing safer than testing on real devices.
Also realized that phones and tablets are entirely different worlds.
It's an illusion, but I'd wish that all device mfc's would agree on a common standard.

Oops, 1280x800 on 7 inches should fit perfectly, unless, the scale is other than 1.
 

NJDude

Expert
Licensed User
Longtime User
Certainly, but there is nothing safer than testing on real devices.
Also realized that phones and tablets are entirely different worlds.
It's an illusion, but I'd wish that all device mfc's would agree on a common standard.

Oops, 1280x800 on 7 inches should fit perfectly, unless, the scale is other than 1.

That's the problem, you are mixing screen sizes with density, so, a device 1280x800 scale 1 is not the same as 1280x800 scale 1.5.

If you use the designer scripts your layout will fit perfectly on any device, besides (I don't know what B4A version you have) but that new feature, the UI Cloud will help you see how it will look on several devices.
 

alfcen

Well-Known Member
Licensed User
Longtime User
I see. Didn't know there are 1280x800 screens scaling at 1.5, thought all tablets would be scale = 1. That's what I meant with "common standard".
Astro Weather is now tentatively specified to work with 1280x800 scale=1 screens :)

For phone layouts, I am using AutoScaleAll based on 320x480 scale=1, yet, some fine tuning is always required, while listviews do not scale up at all, which does make sense considering that this is a nested view. Nevertheless, each element requires individual attention. After all, this does work -- at least I see no complains from my app users.

I do appreciate Designer Scripts and the Cloud. In view of the growing high variety of screen configurations, in my believe, it is physically next to impossible to find a common formula that embraces all odds without spending too much time and effort on scaling.

Anyway, I will have a closer look at the Designer Script features.

Thanks a lot for your thoughts, dude.
 

klaus

Expert
Licensed User
Longtime User
Hi Robert,
Your program looks pretty nice (as all your programs) !

I tried the program on my Nexus One, 800 x 480 x 1.5, unfortunately only part of the screen is displayed screen too small.
On my Asus TF700, 1920 x 1200 x 1.5 it looks OK.

Some comments:
When you come back from selecting a city with City search the screen is not updated you need to select the city again in the list on the main screen.
When the device is paused, screen off, and you switch it on the current city is lost.
Is it possible to set a default city? I havent found it.
When clicking on Local the program goes always back to Lat:55° Lon:10°
I would prefer it going back to the currently selected city and clicking on Unlock again locking the map to the closest city on the cross hair.
What is the function of the World button ?
How is the content of cities in the list on the main screen defined ?
I thought it would be the cities of the selected country but selecting Switzerland there are cities from Austria and Germany but not all cities from Switerland.
I first tried to download it with FireFox but FireFox showx the content of the file ?
I loaded it with IE.

Did you have look at AutoScale Code Module, this autoscales views in code also ListViesw.

Keep on the excellent work.

Best regards.
 

alfcen

Well-Known Member
Licensed User
Longtime User
Hallo Klaus,

Thanks a lot for looking so deep into it. Each of your findings is an expert advice.

My apologies, I should have mentionend that I threw this in at an early stage
because it is going to be a paid application once completed.
Currently, it is designed on a 1280x800x1.0 template only.

Your Asus tablet is a fine choice as it scales x1.5 (1920/1280). That's what I call 'to the standard'.

Device paused: I will see to it by shifting certain code out of Activity_Resume.

Default city: at this stage it defaults to the coordinates as set in settings.

Click on Local: as above

World button: sorry, "World" is misleading. I changed it to "Seek", perhaps better "Get Weather".

City list: the app seeks for cities in a radius of 1 degree around selected center coords. If no
city is found, it will expand the radius to 3, 5, 10, 20, 30, up to 40 (the latter for Antartica and the North Pole).
The search is therefore not restricted to countries. It is a borderless app :)
Anyway, I will restructure the database so as, for instance, a default city can be set with less error-prone code.

Downloading the APK: browsers react differently on file extentions. Please right-click on the link and select "Save link as..."
This should work for most modern browsers.

Autoscaling: After exchanging thoughts with NDude today, I checked your unparalleled tutorial and code samples.
Erel and you spent so much time and effort in finding solutions and I believe, there is no simpler means right now.
Yet, all this time required for scaling is too much for me. At the end of the day, one would need a real device to be
absolutely sure. My largest app in the market is composed of over 30 activities. If I wanted to scale them for all
screens, scales, plus aspect ratios out there, I'd probably run mad. For the time being, I explicitly specify for which
screens an application is designed for and disencourage a purchase for other devices.

My best regards
Robert
 

klaus

Expert
Licensed User
Longtime User
Hi Robert,
Concerning the different screen sizes, it's a real mess and there is no simple solution.
I'm afraid that the developpers must define what kind of devices the program is dedicated for, smartphones or tablets.
Depending on the layout handling this could even lead to have two versions one for smartphones and one for tablets.
The surface of a 7'' screen is 4 times bigger than a 3,5'' screen and one layout for both is a compromise.
And even for tablets the surface of a 10'' screen is the double of a 7'' screen (and 8 times bigger than a 3.5'' screen) so on a big screen we could display more information at the same time than on a small screen but this would need different layout variants and probably also more code to manage these variants.
Making one layout for all sizes is only a more or less good or also bad compromise.
And I agree with you the time spent for this is frustrating.

Best regards.
 

alfcen

Well-Known Member
Licensed User
Longtime User
Hi Klaus,
Exactly, phones and tablets are different worlds, just like PPC's and laptops.
Anyway, I have uploaded an update in the first post.
Cheers
Robert
 
Top