0

Hi Guys! It's the first time I see an image slider like status bar over google maps in android, I don't know how to do it and I really need to do it quickly, I have tried to google it and all I found was toast on map or some message popup on map while clicking on map but this I don't know, maybe they made it in jQuery as I found many sliders in or made something ...plz help

here is link of map image : http://s.joomeo.com/4f199b65d2760

i wonder if it can be like somehow plaintext and when clicking on map it set mapview visiblity to false

thanks and any help 'll be appreciated

Sibbo
  • 3,796
  • 2
  • 23
  • 41
Weloo
  • 625
  • 4
  • 16
  • I'm not sure if I understand exactly what you're asking. It sounds like you have a MapView in your Android application, and you'd like to overlay a "status bar" onto it. The status bar will contain information on the selected location. Am I correct? – bschultz Jan 20 '12 at 18:22
  • @bschultz yes what i'm asking it seems like status bar but is it a status bar because status bar get down to last of activity but this is kind of slider i didn't see before – Weloo Jan 20 '12 at 20:46

3 Answers3

0

The MapView is a ViewController that has layout parameters and lets you embed any controls you want. You should be able to build a basic slider control and embed that on your mapview the same way as you would embed it on a ListView for example.

Sam Corder
  • 5,374
  • 3
  • 25
  • 30
0

You have to create custom Overlays to get that view in your map, assuming that you want to bring up that pink view, when you say, click on something in the map. You can google on how to do it.

aqs
  • 5,632
  • 3
  • 24
  • 24
  • now i'm using overlay to listen to touches on map andfor drawing marks on map ,how can i use it for this slider give me example i can't get it – Weloo Jan 20 '12 at 20:50
  • Here are a few links that will help you to create custom `Overlay`s. The basic idea is to override the `draw` method, and draw whatever you want inside it. http://labs.emich.be/2009/12/06/how-to-make-a-custom-overlay-in-android/ http://stackoverflow.com/questions/4428730/creating-custom-overlay-on-the-map . I am sorry, but I don't have the time to write code here – aqs Jan 20 '12 at 21:06
0

it takes me long time to find the solution for this problem as i'm still beginner in android >>>this slider called popup window

here's the code

  LayoutInflater in=(LayoutInflater) Map.this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            View layout=in.inflate(R.layout.mapslider, (ViewGroup) findViewById(R.id.popupwindow));
            pw=new PopupWindow(layout,500,300,true);


and in xml file which called mapslider **you should put any id to main layout for example "popupwindow"**

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:id="@+id/popupwindow"
android:paddingTop="30dp"
 >

Weloo
  • 625
  • 4
  • 16