Tree doesn't scroll on touch screen devices which don't have navigation keys - lwuit

I'm using LWUIT FileTree in my File browser but on touch screen mobile the tree doesn't scroll .It only scrolls if I use the navigation keys.How to make it scroll using touch?

I just tried this in Codename One and it worked just fine. I don't think we made any major changes in this area. My only guess is that you might have mutated the tree outside of the EDT or placed it within a scrollable container that isn't appropriate for scrolling. E.g. border layout.
Make sure you place the tree in the center area of the border layout and set the form to scrollable false.

Related

Continuously scrolling UI Unity

So I am working working on something in unity (2d game). I have a list of button (UI) on my scene and I want to implement a scrolling mechanism. What is the best way to go about it? Currently , I can scroll through horizontally because I have added a "scroll rect" to the the canvas holding the buttons as I start the game. However when I try to scroll back (horizontally, it goes beyond the Buttons. Is there a way to make the scrolling continuous such that as I scroll, from the first UI element when I get to the last one and I keep scrolling, it continues with the first element. or what should I do. please let me Know If i should clarify.
In the Scroll rect you can set the movement type. I don't think the kind of "infinite scroll" you are asking for is available.
For your case, I think that the Use Elastic or Clamped mode to force the content to remain within the bounds of the Scroll Rect should do the work.
In the case of the infinite scroll specifically needed, you would need to ask for that explicitely and show your attempt for more specific help.

Unity UI List Element not showing unless I change screen size

I have a UI Scroll View in Unity showing a list of Toggles that I dynamically populate. My problem is that when I instanciate a new element in this list, it is in the inspector but it is not rendered on the screen ?
This happens also when i manually add a ListElement GameObject to the content element of the list.
What is very weird is that if I move the window so that the screen size changes, it is drawn... Cf. the two screen shots.
On the first screen shot, I added a ListElement prefab, like you can see, it is not drawn but it is there and active.
Then I resized the Editor Window and it magically pops up... This happens also on a build of the game (on Android for example, it is drawn when screen orientation changes but not before...).
I tried to Force canvas redraw, LayoutForceRebuild but it doesn't work. The fact is that i have no idea why this is happening...
Screen shot 1 :
Screen shot 2 : the red arrow shows what I did to make it drawn
Screen shot 3 : with Show mask enabled on the view port
Screen shot 4 : same as 3 but after resize
I met with this problem too and finally solved it, dunno whether it's a same situation.
I find the window or UI Elements repaints only when refered variables are changed. So when it comes to the ListView, it is not called "OnValueChanged" if you add elements to [ListView.itemsSource]. The solution is to new a list and assign to [ListView.itemsSource].

Vertical Scroll Parent on ionicScroll

This is going to be a bit hard to explain but ill do my best. I'm working on an ionic project, i have on the home screen several horizontal scrolling divs, and whole view is vertically scrollable. The problem is if i drag the screen, and start initially dragging from the items in the horizontal list, i cant vertically drag the whole view, which makes sense, cause the horizontal list has only the ionic scroll direction set to x.
But I want to mimic the effect on the facebook timeline, where there are the suggested apps ads, you can horizontally scroll through them, however if u dragged vertically u will scroll the whole timeline as normal.

UIScrollView Vertical Pan Snapping to top or bottom of view

I have an image that is 320x480 and upon orientation change this image obviously hangs out of view. There are some images where the focal point of it sits with it's bottom cut off (which isn't undesirable). My issue however is when the user pans vertically to see the full image, the view appears to snap to the bottom meaning the top of the focal point is cutoff. What I wish to happen is that the users can "free-scroll" through the image and perhaps move the images so the focal point is centre screen, instead of cutting off the top and bottom. I understand this is a difficult concept to describe in words so I've attached some images below.
This is how it starts:
This is where it snaps to the bottom:
This is the kind of view I wish to have but cannot:
Is there a way to control this "snapping" or perhaps a method I could use to override it when dealing specifically with this kind of orientation? My issue is that i WANT it to snap when panning left/right onto the other images in the ScrollView, just not up/down.
EDIT:
pagingEnabled is the property that controls this snapping, but is there anyway to detect if the movement is Up/Down or Left/Right and disable or enable this property in each occasion?
Cheers for any help you can offer
You can try using two nested scroll views; one is limited to scrolling horizontally with paging enabled, and one (or one for each page if you're displaying several images?) limited to scrolling vertically with paging disabled. By default this will work like you said, paging/snapping horizontally but free scroll vertically. However, it will only let you scroll in one direction at a time (either horizontally or vertically, not diagonally).
If you want to use nested scroll views like this but you'd like to allow scrolling/dragging in both directions simultaneously, take a look at my solution for this: Nested UIScrollViews scrolling simultaneously

View Behind View rolldown effect on iOS (Like folders on home screen)

What would be the best way to accomplish the home screen folder roll-open effect with views in Objective C?
I tried something similar to what MaxFish has described. You can check it here iOS Open Folder Animation Sample Code
If you take a look at the images inside the Springboard.app in your iPhone in "/System/Library/CoreServices" you can have an idea of how the animation works.
A simple version of the effect can be done this way:
Take a screenshot of the screen you want to "cut" and save it in an image
Create two imageviews each of which has a part of the screenshot (e.g. the first has the first upper part of the image as background, the second the rest), you could alternative use the same background image for both views, you have only to play with content alignments.
Place the two views on the original screen in the exact position to make them seem like one entire image perfectly aligned with the original screen.
Create a view (folder content) with its own background and whatever you want to put inside, place it at the same Y of the bottom imageview but beneath it.
Make the bottom image view scroll down for the entire size of the content view, you will see the folder content appear.
iOS version put on the sliding images some nice borders and applies fade effect which make the overall animation really cool. You can sure try and make it nice looking.
Hope this helps