Presentation is loading. Please wait.

Presentation is loading. Please wait.

lec 07 Graphics Animations Location Services (GPS)

Similar presentations


Presentation on theme: "lec 07 Graphics Animations Location Services (GPS)"— Presentation transcript:

1 lec 07 Graphics Animations Location Services (GPS)
Translating Location to Address Translating Address to Location 1

2 Graphics resources in Android
. PNG (Portable Network Graphics) is a very versatile format among the raterized formats Make/search for PNGs with transparent backgrounds. Raster versus Vector Vector will render perfectly every time and scales infinitely. If you need to use buttons with fancy borders, use 9patch. Good resource is From this you can get/create most any graphic element you need.

3 Use 9-Patch Steps to creating 9-patch image
1/ find a good png with a transparent background. 2/ open in image editor (Photoshop) and create at least a 1px tranparent margin along all sides. 3/ Issue the following command from command-line: draw9patch 4/ drag/open your png into this tool. 5/ Define registration marks; left and top define the scalable area, and the bottom and right define the content area.

4 Scaling images Android drawable directory structure.
drawable is the default directory. drawable-mdpi (medium) is usually the corresponding directory with the same assets drawable-ldpi (low) drawable-hdpi (high) drawable-xhdpi (extra-high) Android's recommended percentages: 75%, 100%, 150%, 200% where medium is the baseline When scaling your images, find the highest possible resolution and scale like this: 37.5%, 50%, 75%, 100% where xhdpi is the baseline

5 Using Location Services in Android
. You must generate a debug key. See video on how to do this. ~/content/lec07/22GenerateKey.webm Your key is dev-machine specific. If you're developing on a laptop and a desktop, you will need seperate keys for each. Window || Preferences || Android || Build to see where the key is stored. You don't have to, but it's easier if you externalize the key to a string.

6 Using Location Services in Android
. Translate from place description e.g. 'Millennium park' to location. Translate from location to map Overlays


Download ppt "lec 07 Graphics Animations Location Services (GPS)"

Similar presentations


Ads by Google