MapView - how to disable it and keep it swipeable to left and right fragments? - android-mapview

What I'm trying to do is to make an "untouchable map". I need to be it kind of a background instead of a real map, and I need to keep it swipeable to left and right fragments. How can I implement that? I've tried to put a layer overlay, but it doesn't work, it's keep focusing on the map when I try to swipe to other fragment. Maybe there is a "switch" for the XML part? Thanks!

map.getUiSettings().setAllGesturesEnabled(false); - this is exactly what I was looking for.

Related

Adding a text box in Android Studo

Trying to use AndroidStudio (3.4.2) for the first time and it appers to be substantially different to the tutorial at
https://developer.android.com/training/basics/firstapp/building-ui
For example:
There is no layout editor toolbar let alone a show button.
There is no autoconnect button
It doesn't show any wiggly lines from the middle of the blue square to its edges.
When adding a text box it goes to the top left and can't be moved.
WTF is going on? This is awful!
So I know this may sound like the hard answer, but in the long run it will make life 1000x easier.
You need to learn XML to design the activities. It's fairly simple and really easy to research. The reason the textbox can't be moved is because the default layout is ConstraintLayout. In order to fix this, go to the xml file and change the Constraint layout to either Relative layout or Linear Layout. In the end, its more simple to learn straight xml.
I suggest you learn Android programming from here or somewhere else because the Android documentation can be confusing especially for a beginner like yourself and trust me, I've been there.

Custom Magnific Popup Arrows

So this is going to be kinda silly, but I don't like the arrows for Magnific Popup, and I want to use some png arrows that I created, even moreso I don't want them the default way where they are miles apart, and I don't want them to obstruct content (cause I am using Magnific Popup to gallery some ajax). I really want them bound in div/big square buttons on the side of the image (the height of the image as well) like the first example here:
and those big black bars on a tv
I have no idea where the code is to change this, or how to edit the basic construction of the lightbox but I really want to change the arrows (and the x) if someone could direct me to the code where I can do this I will be glad to do it but I feel like I am working blind.
Alternatively, if anyone knows any other lightboxes that allow you to position and design your own arrows and close button, and have a gallery of ajax based items (that is responsive and scrolls) I will gladly switch (I basically want to be behance ha ha)
(also is there anyway we can generate a swipe effect to go through a gallery?)
Feel free to tell me to go to hell if it is impossible :D
Thanks.

how to change layers for the same background scene

I am making a menu for my cocos2d game. I would like to know if there is a way I can change layers within the same scene, similar to the pop and replace scene? I want to use this approach to keep the background unchanged as I navigate through the main menu hierarchy. How can I achieve this? I wouldn't mind another approach that would be more effective. Thanks.
As far as I know, there's no specific mechanism; just keep a reference to each layer inside your class, add them to the root scene, and show/hide them in the right moment.

C# ListView Image/Icon margin/padding

Is it possible to reproduce what is on the picture below in ListView, padding/margin icon to the right.
http://img801.imageshack.us/img801/4043/listview.png
My first question here, so I couldnt post the picture here.
Basically I need to move the ListView icon more right, I am reproducing file/directory browser, so the fails that are in a directory need to be below them and slighty right like in the picture, I have everything else figured out.
You should be using a TreeView control:
http://msdn.microsoft.com/en-us/library/1dtsdfkx.aspx
But if you insist on hacking a ListView to render this way, you'll simply have to take over drawing each row yourself. You can do so using the OwnerDraw property, though be warned that there's a lot of corner cases here so you should do a lot of reading to see what people have had to deal with when implementing this:
http://msdn.microsoft.com/en-us/library/system.windows.forms.listview.ownerdraw.aspx

Magnifier like feature inside popup window....how to?

I need to create a magnifier like feature in my app. Like the "loupe" effect on the iphone !
The problem is that I need to do that inside a popup window and I don't get how to make it work !
The popup window display a grid of colors that I generate and draw one by one using shapeDrawables. What I want is to display that color bigger, zoom on it when the user touch and move his finger around the popup window (color grid). The idea is to create a tracking-zooming effect on the colors so the user can see more clearly under wich color his finger is currently located.
Problems are :
I can't seem to create another popup window on top of this one, Android limitation I think ?
If I modify the current shapeDrawable, resize it, change the boundaries, It needs to re-display the popup window before it takes effect (which is not acceptable of course)
So, anyone knows of a way I could draw over that popup window ?
EDIT :
I've tried solving this issue using a Custom Toast object...But it doesn't quite do the trick. It works, but toast object appears slowly and so the touch motion is not in sync at all with the user movement over the color grid.
I'm not sure if this will help you or not, but you might be able to accomplish this by using a second Activity... this second Activity would use Android's translucent theme if you include the following attribute in your manifest:
<activity android:theme="#android:style/Theme.Translucent">
This second activity will now only contain what you place in your layout. That is... the "real" activity you're running will still be visible behind it (anywhere you don't cover it up with views in the new layout).
You also might prefer Theme.Dialog if you really want to resemble a popup.
Something to keep in mind if you take this approach is you will probably want to override onWindowFocusChanged() in the new activity, and finish() in the event of you losing focus. Additionally, you'll need to figure out how to share your data between the two activities.

Resources