vanyasem / YandexPlacePicker

Native Android Place Picker utilising Yandex MapKit
Apache License 2.0
3 stars 1 forks source link

How to show one country ? #3

Open mfarchana opened 5 years ago

vanyasem commented 5 years ago

Could you provide me with more details about your issue? Do you need your initial view to show a certain country? (I.e. before the geolocation update)

vanyasem commented 5 years ago

Or do you want to limit the scrolling of your map to be in bounds of a certain country? Please provide more details about your use-case

mfarchana commented 5 years ago

Yes I want to limit the scrooling of map, in example only show city in indonesia

vanyasem commented 5 years ago

Okay, thanks for the feedback. Looking into it.

vanyasem commented 5 years ago

It seems that you cannot do that directly using Yandex MapKit. You might need to implement the check yourself (either by verifying the end address or by listening for the scroll event). All I can offer you is the ability to change the initial camera location (which gets re-positioned anyways as the user's location is determined)

mfarchana commented 5 years ago

OK, nice newest commit :+1: Thanks you

mfarchana commented 5 years ago

DeepinScreenshot_select-area_20190820111634 Make apk big size, how to handle it?

mfarchana commented 5 years ago
        if (itemView.getContext().getResources().getBoolean(R.bool.show_confirmation_buttons) &&
                !mSearch) {
            btnSelect.setVisibility(View.VISIBLE);
            btnSelect.setOnClickListener(v -> listener.onPlaceSelected(place));
            itemView.setOnClickListener(v -> listener.onPlacePreviewed(place));
        } else {
            itemView.setOnClickListener(v -> listener.onPlaceSelected(place));
        }

btnSelect cant clicked, when bool.show_confirmation_buttons true/false, you should put else{ btnSelect.setOnClickListener(v -> listener.onPlaceSelected(place)); itemView.setOnClickListener(v -> listener.onPlaceSelected(place)); }

vanyasem commented 5 years ago

@mfarchana about the APK size - either use appbundle (AAB) or compile an APK for each CPU variant separately. The thing is, Yandex MapKit includes a native (.so) library, which needs to be separately compiled for each CPU architecture. Currently, you're including .so files for all architectures in your single APK file, while the user only needs one. AABs size will still be big, but Play Store will decrease the size of it by 60% or so by removing the unneeded parts. If you want to distribute outside of Play Store, different APKs for different CPU architectures is your choice.

AAB (recommended): https://medium.com/mindorks/android-app-bundle-6c65ce8105a1 Multiple APKs: https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split

vanyasem commented 5 years ago

@mfarchana pushed an update with that issue fixed, thanks. confirmation buttons are not supposed to be shown there at all, even with bool.show_confirmation_buttons set to true, because they are meant for the local businesses dropdown

mfarchana commented 5 years ago

Hallo again, i try click the current position its not showing permission dialog, so i must enabled it manually on app setting. how to solved it?

vanyasem commented 5 years ago

@mfarchana check the sample app. You must handle that yourself.