handling issue with listbox in a pivot - windows-phone-7

I'm working on a app in which I used a listbox inside a pivot control just like the outlook app does. The problem is sometimes when I scroll the list, a swipe gesture is triggered and it goes to another pivot item. This is very annoying, and it seems doesn't happen to the outlook app. Am I doing something wrong? How do I fix it? Thanks a lot.

If you're just using the default controls in the default way then you're not doing anything wrong in your code.
You haven't said if you're getting this on the emualtor or on an actual device. I find I sometimes do this on the emulator if holding the mouse at a slight angle or on an actual device if holding that in a funny way (such as when lying down).
Whether you scroll the listbox or the pivot will depend on whether your finger (or mouse-if using the emulator on a non touch-screen PC) first moves vertically or horizontally after first touching the screen. In my experience the scenarios described above can lead to this not always working as expected but I've never seen an issue with this on a real device being held in one hand and scrolled using a thumb.

Related

Unity slider interaction with controller

So I have a laser pointer attached to my controller, shooting rays and triggering events whenever I press the tigger.
Tho it still has one or two buggs (Unity VR Controller UI Interaction), I have a more general question.
The UI needs some kind of slider. And I can't figure out how to make my pointer collide with the slider and behave in a slider-ish way. When I press my button, it currently ends up setting the slider to zero and not letting me drag it.
Thankful for any tipps on how to make them actually slide, since my ridgidbody-cube doesnt move and doesn't allow movement! Unitys documentation on e.g. the beginDragHandler isn't really helpful...
Cheers, Flo
If your enter/exit events already works, juste check the x (or the axis corresponding on your slider) of your "laser" every frame or so, and increase/decrease the value of the slider based on the delta between two check.
Hope it is clear, it should not be hard if you already have your events sets up !

Why can't whatever UIButton in the bottom left corner of the screen show its highlighted state?

Why can't whatever UIButton in the bottom left corner of the screen show its highlighted state?
I added another post a second ago while I was more confused about the issue and quickly got voted down. After more research, I have no clue what is causing this issue still...
The image on the left is what I want to be working, and the one on the right is the closest I have gotten to placing the images in the right spots while they still highlight.
As you can see, I have the buttons all aligned closer than the margin to the edge of the screen at 0 points away. All of the buttons correctly show their highlighted state when pressed except for the one on the bottom left. I have placed them inside a stack view, and tried multiple constraint layouts while shuffling the buttons around. Whichever button is on the bottom left won't highlight.
When I say highlight, the 2nd button in the image is highlighted. There is no UIViewController subclass attached to this storyboard view controller. Only the default state has any imagery attached to it (this is all that is normally required to get the darker highlight version automatically), and each button has both a background image and a main image.
After hurting my brain trying to figure out what was causing the issue I realized that I should have used more troubleshooting techniques before jumping to conclusions.
On my device the bottom left corner of the screen is barely touchable. The phone has had avid use being tested on by myself, and apparently the edges of the screen become less sensitive, especially with a screen protector on.
What I should have done...
Test the bug out in a brand new project to ensure that I am aware of the conditions causing the problem.
Test the project on a different device or simulator.
After doing both of those, I was guarenteed to find my solution to a bug that was very different than I am used to finding, and I will try my best to always use these techniques on future bugs before bothering all of stack overflow with a problem that they will never be able to diagnose.
Using the simulator revealed that my phone was having issues, and I will replace my phone in a couple weeks while continuing to work on my projects in the mean time!

Fling right in Xamarin Forms

is there an easyish way in Xamarin Forms to implement a "Swipe Right" event on an item, preferably a row in a grid.
I'm thinking about the way that you delete messages in the GMail app, which also nicely shows the row starting to move before you finish the swipe, so that you can tell that something is about to happen.
If this is in the category of things that is difficult enough that it is better to find a different solution then that would still be useful to know.
Thanks
Cedd
Refer https://github.com/pateljay0323/XamarinFormsGestures
for different gestures like SingleTap, DoubleTap, LongPress, Swipe, Pinch, Move, Up, Down, Unknown

Customizing slider in WP7

I have experienced some trouble with the Slider control on WP7. When I am dragging it, it will only drag a little bit, and then it goes back to where it started. If I let go of the slider quickly, then it goes a little further. E.g. if you want to drag it from the start to the end, you will have to quickly drag many times. What I want is a smooth slider, which follows my finger and stops until I release my finger, and it should stop where my finger is. Any way to get this the way I want?
I am also having a bit of trouble customizing it visually. How can I resize it and put it in the middle of the parent controller? Now, it puts itself in the top section, even though Vertical option is set to bottom..
How do you know where your finger are? Your finger is obviously going to be larger than the Slider itself.
The default slider is perfectly smooth. So all you're complaining about is the level of precision. You won't get 100% precision with a touch-interface that depends on the calibration of touch-input on your touch-screen.
Either you make the slider go in steps (which isn't smooth), or you accept the lower level of precision.
I finally solved the issue. The problem was that you can not(for some odd reason) have a slider and a gesturelistener at the same page. I removed the gesturelistener and the slider was smooth. I will not call that bad programming skills, this is definitely a bug, because the gesturelistener was on a totally different control in the page.

Magic Mouse Momentum Scrolling Not Working

Unfortunately this is hard for me to test myself because I have yet to get a Magic Mouse of my own, but I've been told by my testers who do have a magic mouse that momentum scrolling isn't working in my app. I've not subclassed NSScrollView, but scrollview's document view is all custom. I have not overridden scrollWheel: anywhere, either, and yet momentum apparently just isn't working. I'm not even sure where to begin. I thought it'd just send scrollWheel events and things would take care of themselves. (Scrolling with a wheel or on the MBP trackpad works as expected.) Obviously I must somehow be doing something that's stopping it, but I don't even know where to begin. Thoughts?
I figured this out awhile ago and the problem was that on scroll, I was doing a lot of fancy view manipulation somewhat like how on the iPhone the UITableView adds and removes views as they scroll on and off screen. This worked great for performance - but the more I got into OSX programming, the more I realized this was wrong for OSX (but the right idea of iPhone).
Anyway, what's really going on, it seems, is that when you do something like a wheel scroll, the scroll event is sent to the view that's under the mouse cursor and then it ripples down the responders/views until it gets somewhere that handles it. Normally this isn't a problem, but with momentum scrolling the OS is really just sending ever smaller scrollWheel events to the view that was under the cursor at the time the momentum started. That means if the view is removed during the course of scrolling (because it scrolls off screen or something), it breaks the chain and the momentum stops because the view that's still getting the scrollWheel messages is no longer in the view hierarchy.
The "simple" fix is to not remove the view that got the last scrollWheel event - even if it's off screen. The better fix (and the one I went with) is to not try to use NSViews like they are UIViews and instead just draw the content using drawRect. :) Not only is that about a billion times faster, it Just Works(tm) with momentum scrolling because it's how OSX expects things to be done.
Repeat after me: OSX is not iPhoneOS.. :P
Odd scrolling behavior can occur when you don't set the Line Scroll and Page Scroll properties of the NSScrollView itself.
Beyond that, you're quite simply going to have to get a Magic Mouse - easily said or not :-) - to test this yourself or post the entire code of your custom view as well as the xib containing it. There's no way others can offer you more than guesses (like the above) without it.

Resources