如何自定义PlaceAutocomplete.IntentBuilder(PlaceAutocomplete.MODE_FULLSCREEN)在android中搜索

时间:2018-06-14 13:16:29

标签: google-places-api

我想自定义这个内置谷歌API的布局。帮助我摆脱这个......

尝试{

        Intent intent = new PlaceAutocomplete.IntentBuilder(PlaceAutocomplete.MODE_FULLSCREEN)
                .setBoundsBias(toBounds(new LatLng(recent_lat, recent_long), 50000)).build(getActivity());
        startActivityForResult(intent, placeSearch_request_code);
    } catch (GooglePlayServicesRepairableException e) {

        GoogleApiAvailability.getInstance().getErrorDialog(getActivity(), e.getConnectionStatusCode(),
                0 /* requestCode */).show();
    } catch (GooglePlayServicesNotAvailableException e) {

        String message = "Google Play Services is not available: " +
                GoogleApiAvailability.getInstance().getErrorString(e.errorCode);

        Toast.makeText(getActivity(), message, Toast.LENGTH_SHORT).show();
    }

0 个答案:

没有答案