Coder Social home page Coder Social logo

androidslidinguppanel-foursquare-map-demo's Introduction

AndroidSlidingUpPanel-foursquare-map-demo

Android Arsenal

Foursquare like map demo with using modified AndroidSlidingUpPanel

This is an implementation based on AndroidSlidingUpPanel. The fork with changes.

The full description - see blog post http://android.amberfog.com/?p=915

enter image description here

Alt text for your video

Usage

Please add your custom API key for Google Maps in the AndroidManifest.xml before you build the app.

androidslidinguppanel-foursquare-map-demo's People

Contributors

dlukashev avatar johnjohndoe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

androidslidinguppanel-foursquare-map-demo's Issues

Android Studio: Preview rendering problems for layout file

When I want to see the visual layout for activity_main.xml in Android Studio 0.8.12 the following rendering error occurs:

java.lang.NullPointerException
    at com.sothree.slidinguppanel.SlidingUpPanelLayout.computeScroll(SlidingUpPanelLayout.java:1000)
    at android.view.View.draw(View.java:14587)
    at android.view.ViewGroup.drawChild(ViewGroup.java:3234)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3037)
    at android.view.View.draw(View.java:14739)
    at android.view.ViewGroup.drawChild(ViewGroup.java:3234)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3037)
    at android.view.View.draw(View.java:14739)
    at android.view.ViewGroup.drawChild(ViewGroup.java:3234)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3037)
    at android.view.View.draw(View.java:14842)
    at com.android.internal.widget.ActionBarOverlayLayout.draw(ActionBarOverlayLayout.java:501)
    at android.view.View.draw(View.java:14741)
    at android.view.ViewGroup.drawChild(ViewGroup.java:3234)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3037)
    at android.view.View.draw(View.java:14739)
    at android.view.ViewGroup.drawChild(ViewGroup.java:3234)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3037)
    at android.view.View.draw(View.java:14842)
    at android.view.View.draw(View.java:14741)
    at android.view.ViewGroup.drawChild(ViewGroup.java:3234)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3037)
    at android.view.View.draw(View.java:14842)
    at com.android.layoutlib.bridge.impl.RenderSessionImpl.render(RenderSessionImpl.java:587)
    at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:331)
    at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:333)
    at com.android.tools.idea.rendering.RenderService$5.compute(RenderService.java:674)
    at com.android.tools.idea.rendering.RenderService$5.compute(RenderService.java:663)
    at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:932)
    at com.android.tools.idea.rendering.RenderService.createRenderSession(RenderService.java:663)
    at com.android.tools.idea.rendering.RenderService.render(RenderService.java:790)
    at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.doRender(AndroidLayoutPreviewToolWindowManager.java:611)
    at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager.access$1900(AndroidLayoutPreviewToolWindowManager.java:81)
    at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$7$1.run(AndroidLayoutPreviewToolWindowManager.java:553)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
    at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:171)
    at org.jetbrains.android.uipreview.AndroidLayoutPreviewToolWindowManager$7.run(AndroidLayoutPreviewToolWindowManager.java:548)
    at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:320)
    at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:310)
    at com.intellij.util.ui.update.MergingUpdateQueue$2.run(MergingUpdateQueue.java:254)
    at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:269)
    at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:227)
    at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:217)
    at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
    at com.intellij.util.Alarm$Request$1.run(Alarm.java:327)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

Do you have a clue why this is happening?

My Recyclerview approach - easy and minimalistic

As ListView is imho outdated here's my RecyclerView approach for everyone who's interested:

  1. In your Layout, wrap slidingPanelLayout into a Framelayout or whatever.

  2. Put Mapview or whatever View as first child of SlidingPanel

  3. Put simple Recyclerview as second child of SlidingPanel

  4. add a interface to your wrapping frameLayout that exposes OnInterceptTouch as a Listener

    @OverRide
    public boolean onInterceptTouchEvent(MotionEvent ev) {

    if (onInterceptTouchListener != null){
        onInterceptTouchListener.onInterceptTouch(ev);
    }
    
    return super.onInterceptTouchEvent(ev);
    

    }

    private OnInterceptTouchListener onInterceptTouchListener;

    public void setOnInterceptTouchListener(OnInterceptTouchListener onInterceptTouchListener) {
    this.onInterceptTouchListener = onInterceptTouchListener;
    }

    public interface OnInterceptTouchListener{
    void onInterceptTouch(MotionEvent ev);
    }

  5. here's the (very simple) magic:
    In your Fragment or whatever mainView add the listener:

    frameLayout.setOnInterceptTouchListener(new FrameLayoutInterceptableInterface.OnInterceptTouchListener() {
    
        float actionDownY = 0;
        SlidingUpPanelLayout.PanelState actionDownState = SlidingUpPanelLayout.PanelState.COLLAPSED;
    
        @Override
        public void onInterceptTouch(MotionEvent ev) {
    
            if (ev.getAction() == MotionEvent.ACTION_DOWN) {
                actionDownY = ev.getRawY();
                actionDownState = sliding_layout.getPanelState();
            }
    
            if (ev.getAction() == MotionEvent.ACTION_MOVE){
                if (actionDownState == SlidingUpPanelLayout.PanelState.EXPANDED && ev.getRawY() < actionDownY){
                    sliding_layout.requestDisallowInterceptTouchEvent(true);
                } else if (actionDownState == SlidingUpPanelLayout.PanelState.EXPANDED && ultimate_recycler_view.mRecyclerView.computeVerticalScrollOffset() != 0){
                    sliding_layout.requestDisallowInterceptTouchEvent(true);
                }
            }
        }
    });
    

Please advise me if you find any bugs or if this could be improved.
Thanks an have fun using.

android chat screen with google map using AndroidSlidingUpPanel Layout

My issue is I want google map in my 3/4 of screen and below map a listview and an EditText with Button.when we write into EditText and press button then message will appear into listview. and if we want see all listview then we want to slide map up show all listview. I am using map and listview as shown in AndroidSlidingUpPanel-foursquare-map-demo but i am not able to attach edit text and button.

Uploading Screenshot_2015-07-09-11-54-00.png…

this tutorial using fragment

is this tutorial fully functional using fragments?

Im trying to set it up but the list its behaving strange!!

and im using mapview is there a problem whith that?

SlidingUpPanel under mapfragment in one point

I made sliding panel using this repository https://github.com/dlukashev/AndroidSlidingUpPanel-foursquare-map-demo

However, it contains one certain bug which is not covered anywhere so I decided to ask community here as you may have some experience with that.

While scrolling, there is on point (top of listview) where my listview appears to hide beneath the map. If I scroll up again it gets back to work but it might be very confusing for users. Here is the screenshot:

http://i.stack.imgur.com/BMTxR.jpg

I heard that this is a common issue using this library, but unfortunately haven't found any solution. It certainly lays somewhere deep inside the class implementation, so I ask for some links or advices what should I do to get rid off this tedious issue.

Thanks in advance!

Maven?

Would be nice to be able to add this using Maven dependancy.

First item in the list cut

When I scroll the list 2 the bottom and suppose there are three items and a little of the map is visible (MARKED IN RED). When I click on the tiny red portion the map expands but the first list item is cut from the top (Maked in blue).

edited12
edited11

Example not working in a full screen activity.

Hey, while using this style,
android:theme="@android:style/Theme.Holo.NoActionBar.Fullscreen"
The ListView has a black section while sliding it up. Any helpful hint on how to solve this?

Swipe to refresh

Tried to implement swipe to refresh alone with AndroidSlidingUpPanel but it didnt work... Tried all the hacks possible.
It is working if I disable the scrolling.

In my case there is a fragment in AndroidSlidingUpPanel and list in it. Trying to refresh the list.

No items or small amount of items: Map does not resize

The map does not resize to the set map dimension on collapsing.

No code was editing from checking out the repository apart from below in which the problem can be recreated:

for (int i = 0; i < 2; i++) {
            testData.add("Item " + i);
 }

Cannot find way of collapsing pane

I've been searching for a way to collapse the pane when the SlidingLayout is created. I've tried to call the collapsePane method, but that isn't working. I've searched through the source and haven't found anything that will work for this situation.

Someone created this stackoverflow thread last year and fixed the issue. Too bad he didn't post the solution :/ https://stackoverflow.com/questions/31354102/how-to-set-slidingpanel-default-state-collapse-and-collapse-panel-min-height

Perhaps someone could help me out?

Adjusting map fragment to list

I have a problem to adjust my fragment part to the List. I working with that for a couple of dayse and still have no idea how to fix it.

14523070_1085777884837093_1032066573437343094_n

My XML part:

    ```

<com.example.MapHidder.SlidingUpPanelLayout
android:id="@+id/slidingLayout"
app:shadowHeight="0dp"
app:paralaxOffset="@dimen/paralax_offset"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="bottom">

            <fragment xmlns:map="http://schemas.android.com/apk/res-auto"
                android:id="@+id/map"
                tools:context="com.example.MapsActivity"
                android:name="com.google.android.gms.maps.SupportMapFragment"
                android:layout_width="match_parent"
                android:layout_height="match_parent" />
        </FrameLayout>


        <RelativeLayout
            android:id="@+id/slidingContainer"
            android:layout_width="match_parent"
            android:layout_height="match_parent">
            <View
                android:id="@+id/transparentView"
                android:visibility="gone"
                android:layout_width="fill_parent"
                android:layout_height="@dimen/map_height"
                android:layout_alignParentTop="true"  />

            <View
                android:id="@+id/whiteSpaceView"
                android:visibility="gone"
                android:background="@android:color/darker_gray"
                android:layout_marginTop="@dimen/map_height"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"/>

            <com.example.MapHidder.LockableListView
                android:id="@+id/museumList"
                android:cacheColorHint="@android:color/white"
                android:drawSelectorOnTop="true"
                android:dividerHeight="@dimen/divider_height"
                android:divider="@android:color/darker_gray"
                android:background="@android:color/transparent"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:smoothScrollbar="false" />
        </RelativeLayout>

    </com.example.MapHidder.SlidingUpPanelLayout>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.