Android UI help - android

I want to create an Android application that has a MapView at the top of the screen and a horizontal scroll view at the bottom. The data that are going to be shown on the map should be displayed at the bottom scroll view(horizontal scroll view).
Data that are current being displayed at the bottom of the scroll view will be displayed on the map as a pin. So if users scroll the bottom scroll view then the pins(represent the data on the map) will be changed associate with the data from the bottom scroll view.
I have a background with iPhone development and I am a kinda newbie for Android. Any tutorials or samples that might help for this case? Thanks in advance.

Start with the android google map tutorial.
It will explain you how to deal with maps and markers
and this one for a similar design with buttons
And in order to draw buttons on a mapview, you have to use this trick.
You will already be on the right track.
And for the list (use a list view in android), it depends where your data are from, use either a cursorAdapter (database) or arrayAdapter (memory data).
Regards,
Stéphane

Related

Sliding Card Design

I am looking for some ideas on how to best achieve this effect. I have two fragments, one containing the map (and all controls) and another fragment that contains my RecyclerView to display the results. In my activity layout I would like to position my map and list fragments exactly how it is shown in this video. The map fragment shall stay aligned with the topmost edge of the list unless the user is actively scrolling the list upwards. The video I recorded should demonstrate what it is I am trying to achieve.
From an explanatory standpoint, I need view and layout ideas. I have already implemented all the necessary callbacks for all user interactions between the two fragments and the activity. One item in particular I am most interested hearing feedback on is how to align two views and then have the lower slide over the view when the user starts scrolling. Notice how the list (when showing) will not scroll downward.
One method I can suggest is to have both the map and the ListView in the same fragment and try this. It's the sliding drawer animation in Play Music.
For the part where touching the map shrinks the list view to a bar on the bottom. I suggest you create animations in the listView to shrink and to expand and call them on event Down and Up respectively. Here is the MotionEvent.

Custom List Scrolling behavior in List View - Android

I'm trying to do something similar to PlayStore app. On the app details page you can see a scroll view which has a horizontal scrolling - "app screen images" and also some details below it like, Description, Reviews, etc...
My Question is: In the PlayStore app, when you scroll the image screen shots horizontally, the vertical scroll is locked and the whole view dose not scroll. Only when you touch and scroll some where below the screen shot images , you can scroll to see other details.
Here is where I'm stuck, Is it possible to do the same with a listView? I have a list view with a custom header View which detects for horizontal scroll gestures, (right to left and viceversa). At that time when the user is touching the header, I do not want the whole view to scroll as a normal listview dose when it has more items. Can some one guide me a solution for this? Check out the PlayStore app in your device for a clear understanding.
Thanks a bunch in advance. I would owe you a drink some day.
Why would you detect the gestures and implement the horizontal scrolling yourself, when there's a special control: HorizontalScrollView which already does this?
I don't know the internal details of Google Play app, but I would put the gallery of screenshots in a custom view, and this custom view to be wrapped in a HorizontalScrollView. Then add this custom view as a header to the ListView (basically how you begun).
As long as the scrolling directions are on different axis - the horizontal scrolling is done on X axis, and the vertical scroll on Y axis - there shouldn't be any problems in holding this.
Post Scriptum:
When you scroll the image screenshots horizontally in the Google Play app, I suppose there's a GalleryView instead of HorizontalScrollView, which can hold this type of transitions.

Android List view

Is there any way to customize listview in android app development so that I can display few items in a curved/elleptical/cylindrical view.
Need to display a bunch of item in a scrollable view on top but the items are not in a straight line but as if placed on a symmetric curve???
I want to have a list view like this image
http://imageshack.us/photo/my-images/836/listview.png/
Sounds like you want/need a custom made list widget. You can probably accomplish what you're looking for if you dive into 3D with OpenGL
This cannot be done with the flip of a switch, but if you must have it, anything is possible.
As a starting point you could also look at the source for ListView

Navigation controls on a mapview

Im asking a question here without any code because I don't even know if its possible. I have a MapView on an Android application which fills the width of its parent layout but not the height because the map displays a few overlays of locations and then below is a list of the locations and the user can select the one they want or to add a new location to the database. So it goes like this:
Scroll View
LinerLayout
Map View
Text View (of the overlay names on map)
/LinearLayout
/Scroll View
The problem here is that when I try to navigate north and south on the map it just scrolls with the scroll view. I expected it to move the map and only the scroll view if I clicked outside the map. It moves left and right as expected.
So what I was wondering was is it possible to either have some sort of lock function on the map so when you click on it you can navigate around it fine and then click else where on the screen and then you will navigate up and down using the scroll view. Or is there someway to have the up down left and right arrows on the map like the standard google maps do?
(I can navigate around the map fine if I use the roller ball (using the G1 phone) but it is incredibly slow)
Hope this makes sense
Do not put a MapView in a ScrollView. It simply does not work, as you are discovering. Do not put anything that knows how to vertically scroll (MapView, ListView, WebView) in a ScrollView.
Or is there someway to have the up down left and right arrows on the map like the standard google maps do?
You are welcome to create something, but there is no built-in capability for this.

Is there anything like an itemized Overlay for Images?

Hi
I am searching for functionality which works like the itemizedOverlay on the mapview, only for Imageview. So that I can add items on specific locations on the image and trigger actions on tap of the item.
I am building an application for Android where you get Floorplans and on this Floorplan the rooms should be marked and clickable to get more information.
Thank you very much for any help or hint in this matter
Use a RelativeLayout or FrameLayout. Both support Z-axis ordering -- later children will appear to float over top of earlier children. Use setOnClickListener() to be notified of taps on the items.

Categories

Resources