{"action":"created","issue":{"url":"https://api.github.com/repos/daimajia/AndroidSwipeLayout/issues/81","labels_url":"https://api.github.com/repos/daimajia/AndroidSwipeLayout/issues/81/labels{/name}","comments_url":"https://api.github.com/repos/daimajia/AndroidSwipeLayout/issues/81/comments","events_url":"https://api.github.com/repos/daimajia/AndroidSwipeLayout/issues/81/events","html_url":"https://github.com/daimajia/AndroidSwipeLayout/issues/81","id":55937183,"number":81,"title":"google map is not working","user":{"login":"jjhesk","id":629338,"avatar_url":"https://avatars.githubusercontent.com/u/629338?v=3","gravatar_id":"","url":"https://api.github.com/users/jjhesk","html_url":"https://github.com/jjhesk","followers_url":"https://api.github.com/users/jjhesk/followers","following_url":"https://api.github.com/users/jjhesk/following{/other_user}","gists_url":"https://api.github.com/users/jjhesk/gists{/gist_id}","starred_url":"https://api.github.com/users/jjhesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjhesk/subscriptions","organizations_url":"https://api.github.com/users/jjhesk/orgs","repos_url":"https://api.github.com/users/jjhesk/repos","events_url":"https://api.github.com/users/jjhesk/events{/privacy}","received_events_url":"https://api.github.com/users/jjhesk/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-29T18:26:04Z","updated_at":"2015-02-01T16:45:32Z","closed_at":"2015-01-30T07:11:02Z","body":"I have tried to import a google map fragment with relativelayout within the swipe component and it is not working.\r\n\r\nIt affects the another items too. \r\n\r\n```xml\r\n\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<com.daimajia.swipe.SwipeLayout\r\n\r\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\r\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n    android:id=\"@+id/control_panel_driver\"\r\n    android:layout_width=\"match_parent\"\r\n    android:layout_height=\"match_parent\"\r\n    app:drag_edge=\"bottom\">\r\n\r\n    <RelativeLayout\r\n        android:tag=\"bottom\"\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"match_parent\">\r\n\r\n        <fragment\r\n            android:id=\"@+id/map\"\r\n            android:layout_width=\"match_parent\"\r\n            android:layout_height=\"match_parent\"\r\n            class=\"com.google.android.gms.maps.MapFragment\" />\r\n\r\n    </RelativeLayout>\r\n\r\n    <RelativeLayout\r\n        android:tag=\"top\"\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"match_parent\">\r\n\r\n        <LinearLayout\r\n            android:orientation=\"horizontal\"\r\n            android:layout_width=\"match_parent\"\r\n            android:layout_height=\"300dp\"\r\n            android:gravity=\"center_horizontal\">\r\n\r\n            <ImageButton\r\n                android:id=\"@+id/call_customer\"\r\n                android:scaleType=\"fitCenter\"\r\n                android:layout_width=\"@dimen/bw_driver_order_view\"\r\n                android:layout_height=\"150dp\"\r\n                android:src=\"@drawable/phone22\" />\r\n\r\n            <ImageButton\r\n                android:id=\"@+id/report_time_est\"\r\n                android:scaleType=\"fitCenter\"\r\n                android:layout_width=\"@dimen/bw_driver_order_view\"\r\n                android:layout_height=\"150dp\"\r\n                android:src=\"@drawable/timer\" />\r\n\r\n\r\n            <ImageButton\r\n                android:id=\"@+id/start_taxi_now\"\r\n                android:scaleType=\"fitCenter\"\r\n                android:layout_width=\"@dimen/bw_driver_order_view\"\r\n                android:layout_height=\"150dp\"\r\n                android:src=\"@drawable/goal\" />\r\n\r\n            <ImageButton\r\n                android:id=\"@+id/release_order\"\r\n                android:scaleType=\"fitCenter\"\r\n                android:layout_width=\"@dimen/bw_driver_order_view\"\r\n                android:layout_height=\"150dp\"\r\n                android:src=\"@drawable/ret\" />\r\n\r\n        </LinearLayout>\r\n    </RelativeLayout>\r\n</com.daimajia.swipe.SwipeLayout>\r\n\r\n```\r\n\r\nI tried to implement with the google code like so\r\n\r\n```java\r\n\r\n @Override\r\n    protected void onCreate(Bundle savedInstanceState) {\r\n        super.onCreate(savedInstanceState);\r\n        setContentView(R.layout.act_order);\r\n        orderFragement of = (orderFragement) getFragmentManager().findFragmentById(R.id.order_fragement);\r\n        dialog_collection = new DialogTools(this);\r\n        driver_control = new DriverControl(new DialogTools(this), new DealFace(), new Identity(this), of);\r\n        driver_control.initView(this);\r\n\r\n        if (mMap == null) {\r\n            // Try to obtain the map from the SupportMapFragment.\r\n            MapFragment mf = (MapFragment) getFragmentManager().findFragmentById(R.id.map);\r\n            mMap = mf.getMap();\r\n            if (mMap != null) {\r\n                installMap();\r\n            }\r\n        }\r\n\r\n        //setDealReportTime\r\n    }\r\n\r\n    private void installMap() {\r\n        final BitmapDescriptor Bdescriptor = BitmapDescriptorFactory.fromResource(R.drawable.car);\r\n        mo = new MarkerOptions()\r\n                .position(currentLatLng)\r\n                        //  .snippet(\"Job\" + Content.current_job_task.getID())\r\n                        //.title(\"Job\" + Content.current_job_task.getID())\r\n                .icon(Bdescriptor)\r\n                .draggable(true);\r\n        // .flat(true);\r\n        //.rotation(3f);\r\n\r\n        mMap.setMyLocationEnabled(true);\r\n        mMap.getUiSettings().setCompassEnabled(true);\r\n        mMap.getUiSettings().setZoomControlsEnabled(true);\r\n        mMap.getUiSettings().setMyLocationButtonEnabled(true);\r\n        mMap.getUiSettings().setTiltGesturesEnabled(true);\r\n        mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\r\n        mMap.setTrafficEnabled(false);\r\n        mMap.setBuildingsEnabled(false);\r\n        mMap.setIndoorEnabled(false);\r\n        mMap.setOnMyLocationButtonClickListener(this);\r\n        mMap.setOnMyLocationChangeListener(this);\r\n        //  mMap.setPadding(0, 10, 0, 0);\r\n        mMap.setOnMarkerDragListener(this);\r\n\r\n        if (hasSavedInstance()) {\r\n            mapType = saved_instance.getInt(\"map_type\", GoogleMap.MAP_TYPE_NORMAL);\r\n            double savedLat = saved_instance.getDouble(\"lat\", 0.0000d);\r\n            double savedLng = saved_instance.getDouble(\"lng\", 0.0000d);\r\n            currentLatLng = new LatLng(savedLat, savedLng);\r\n            cameraZoom = saved_instance.getFloat(\"zoom\", Config._default.cameraZoomDefault);\r\n        } else {\r\n            cameraZoom = Config._default.cameraZoomDefault;\r\n        }\r\n        // mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(currentLatLng, cameraZoom));\r\n        // markerP = mMap.addMarker(mo);\r\n    }\r\n\r\n\r\n```\r\n\r\n\r\nWith DriverControl class\r\n\r\n```java\r\n\r\n\r\npublic class DriverControl {\r\n    private ImageButton callcustomer, report_time_est, start, release;\r\n    private DialogTools dialog_collection;\r\n    private DealFace dealSet;\r\n    private OrderView _ctx;\r\n    private Identity logininfo;\r\n    private static String TAG = \"Driver Control\";\r\n    private orderFragement order_f;\r\n    private SwipeLayout map_panel_swipe;\r\n\r\n    public DriverControl(DialogTools drt, DealFace df, Identity id, orderFragement orderf) {\r\n        this.dialog_collection = drt;\r\n        this.logininfo = id;\r\n        this.dealSet = df;\r\n        this.order_f = orderf;\r\n    }\r\n\r\n    public void initView(OrderView ctxx) {\r\n        _ctx = ctxx;\r\n        callcustomer = (ImageButton) _ctx.findViewById(R.id.call_customer);\r\n        report_time_est = (ImageButton) _ctx.findViewById(R.id.report_time_est);\r\n        start = (ImageButton) _ctx.findViewById(R.id.start_taxi_now);\r\n        release = (ImageButton) _ctx.findViewById(R.id.release_order);\r\n        map_panel_swipe = (SwipeLayout)_ctx.findViewById(R.id.control_panel_driver);\r\n       // map_panel_swipe.setDragEdge(SwipeLayout.DragEdge.Top);\r\n      //  map_panel_swipe.setShowMode(SwipeLayout.ShowMode.PullOut);\r\n        //timer\r\n        callcustomer.setOnClickListener(new View.OnClickListener() {\r\n            @Override\r\n            public void onClick(View v) {\r\n                CallCustomer();\r\n            }\r\n        });\r\n        release.setOnClickListener(new View.OnClickListener() {\r\n            @Override\r\n            public void onClick(View v) {\r\n                dialog_collection.writeNote(\r\n                        new MaterialDialog.ListCallback() {\r\n                            @Override\r\n                            public void onSelection(MaterialDialog materialDialog, View view, int i, CharSequence charSequence) {\r\n                                switch (i) {\r\n                                    case 0:\r\n                                        // CallRemove();\r\n                                        break;\r\n                                    case 1:\r\n                                        CallPrompt(new CallRecordStatusChange(Config.current_view_order.getOrderId(), logininfo.getNumbr(), \"public\"),\r\n                                                new Runnable() {\r\n                                                    @Override\r\n                                                    public void run() {\r\n                                                        _ctx.finish();\r\n                                                        dialog_collection.progress_bar_dismiss();\r\n                                                    }\r\n                                                });\r\n                                        break;\r\n                                }\r\n                            }\r\n                        });\r\n            }\r\n        });\r\n        report_time_est.setOnClickListener(new View.OnClickListener() {\r\n            @Override\r\n            public void onClick(View v) {\r\n                dialog_collection.deal(\r\n                        new MaterialDialog.ListCallback() {\r\n                            @Override\r\n                            public void onSelection(MaterialDialog materialDialog, View view, int i, CharSequence charSequence) {\r\n                                dealSet.setDeal(\r\n                                        Config.current_view_order.getOrderId(),\r\n                                        logininfo.getNumbr(),\r\n                                        charSequence.toString()\r\n                                );\r\n                                CallsetDeal();\r\n                                //report the time\r\n                            }\r\n                        });\r\n            }\r\n        });\r\n        start.setOnClickListener(new View.OnClickListener() {\r\n            @Override\r\n            public void onClick(View v) {\r\n                CallPrompt(new CallRecordStatusChange(Config.current_view_order.getOrderId(), logininfo.getNumbr(), \"stage2\"),\r\n                        new Runnable() {\r\n                            @Override\r\n                            public void run() {\r\n                                dialog_collection.progress_bar_dismiss();\r\n                                start_customer_prompt();\r\n                                dialog_collection.progress_bar_start(R.string.waiting_customer_res_prompt);\r\n                            }\r\n                        });\r\n            }\r\n        });\r\n    }\r\n\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/daimajia/AndroidSwipeLayout/issues/comments/72372171","html_url":"https://github.com/daimajia/AndroidSwipeLayout/issues/81#issuecomment-72372171","issue_url":"https://api.github.com/repos/daimajia/AndroidSwipeLayout/issues/81","id":72372171,"user":{"login":"jjhesk","id":629338,"avatar_url":"https://avatars.githubusercontent.com/u/629338?v=3","gravatar_id":"","url":"https://api.github.com/users/jjhesk","html_url":"https://github.com/jjhesk","followers_url":"https://api.github.com/users/jjhesk/followers","following_url":"https://api.github.com/users/jjhesk/following{/other_user}","gists_url":"https://api.github.com/users/jjhesk/gists{/gist_id}","starred_url":"https://api.github.com/users/jjhesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjhesk/subscriptions","organizations_url":"https://api.github.com/users/jjhesk/orgs","repos_url":"https://api.github.com/users/jjhesk/repos","events_url":"https://api.github.com/users/jjhesk/events{/privacy}","received_events_url":"https://api.github.com/users/jjhesk/received_events","type":"User","site_admin":false},"created_at":"2015-02-01T16:45:32Z","updated_at":"2015-02-01T16:45:32Z","body":"still is a problem from the layout problem.. once the google map fragment applied into your layout format. The swiping layout is away on top of all other layouts. it looks like something is losing. @daimajia "}}