0

I'm new to Android App Development and wanted to create a very simple Google Maps based App.

So far I have created a basic App which immediately shows your location via GPS on a map as soon as you start the App. I have also managed to get the Google location button on screen, which goes to your current location when pressed.

However, I have made a custom button image and wanted to replace the default button with my own. Is that possible, and if so, what is the best way of going about that?

Also, I require my App to conduct a search upon opening using Taxis as the search criteria, is this also possible?

Sorry if these are such noobish questions, I'd appreciated any help I can get.

Many thanks, Bill.

Ramkrishna Sharma
  • 6,961
  • 3
  • 42
  • 51
Velociholmes
  • 25
  • 1
  • 7

2 Answers2

0

Answer 1 - I have made a custom button image and wanted to replace the default button with my own. Is that possible, and if so, what is the best way of going about that?

Yes. You can change default image to your own custom image. Put address that saved your image like this pattern "@[package:]drawable/drawable_resource" to android:src= in <ImageView>.

<ImageView
    android:layout_height="wrap_content"
    android:layout_width="wrap_content"
    android:src="@drawable/myimage" />

Then you should declare your location button, event, method. If you need more specific information, refer to this Google map for android my location custom button.
In addition, if you need information about custom control, refer to this.

Answer 2 - I require my App to conduct a search upon opening using Taxis as the search criteria, is this also possible?

When you calculate directions, you may specify the transportation mode to use. By default, directions are calculated as driving directions. Refer to this Travel Modes.

You can access additional information for the VehicleType objects as described below. <VehicleType.SHARE_TAXI>: Share taxi is a kind of bus with the ability to drop off and pick up passengers anywhere on its route.

If you need more specific, Refer to this How to specify “VehicleType”.

Community
  • 1
  • 1
adjuremods
  • 2,938
  • 2
  • 12
  • 17
0

Sorry for the delay in getting back to you. Those are great answers and will help a lot.

Now to have fun creating this thing (or at least attempting!).

Thanks again and take care, Billy.

Velociholmes
  • 25
  • 1
  • 7