Action bar

Action bar

There are two types of Android menus

  • Options menu
    the menu that appears when you press the menu button
    this type of menus is binded to the activity (Every activity can have one options menu)
  • Context menu
    the menu when you do a long press on a view (like Text view or list item)
    this type of menus is binded to the view (Every view can have one context menu)


Android Location APIs


Obtaining location becomes an important feature of today’s applications.
We can get location via two providers

  • GPS Location Provider

    • Obtain user location from satellite
    • More accurate
    • Only works outdoors
    • Consumes battery power
    • Takes much time to get the location
  • Network Location Provider

    • Obtain user location from Cell tower and wifi signals
    • Works indoors, outdoors
    • Responds faster than GPS
    • Consumed less power


Start Activity For Result


We want to make an application that in some time needs to get image from phone
The ordinary thinking is to make a complex activity that searches for the images on the phone and displaying them in a list or grid and enabling selecting a photo
This is a hard option
another solution is to use intents to make so
We just would say “I want to pick an image” and the phone would Search for me for an application that can handle this request

We would use a sample activity that displays a text, if you touch screen you would be directed to pick an image and when you finished it would be displayed on your view.

Go to Top