Ability to vertically scroll outer layout within a horizontal scrollbox - android

I'd like to be able to scroll through my main, outer layout vertically even if my thumb (touch) is within a horizontal scrollbox (which allows me only to scroll through its items horizontally). I've already tried replacing the horizontal scrollbox with a standard TScrollBox but without luck.
Examples of this can be found in applications such as Instagram (with their stories) and Facebook. A concept image is shown below from another question whose answer isn't applicable in Delphi.
Edit: there's a component in Android called 'Nested Recycler View' that does this exact thing I'm looking for. Is there anything similar for Delphi Firemonkey?

have you tried awsome controls from https://github.com/Zeus64/alcinoe
try to build single row of main layout with tabs and slide efect

Related

How can I have RecyclerView children ignore relative positioning?

I am experimenting with a RecyclerView and it currently displays four CardViews vertically on the screen. Using an adapter, I am able to resize each CardView's height equally in the space given.
What I'm trying to accomplish:
On click, I would like the selected RecyclerView child to expand to fullscreen. Currently, I can programmatically set the height and expand the selected CardView dimensions, but the other CardViews after it are pushed down off-screen. How can I have all the selected CardView positioning become absolute, and lock the other views positions and expand "over" them? Is this the proper approach, or should I be looking into shared-element transitions or something else?
Side-ask: Is there a way to control all top/left positioning of RecyclerView children in an adapter?
The comments above seem to be correct - after looking into shared transitions, I found numerous examples performing the exact behavior I described. Crediting #AmratSingh since he answered first.
If it helps anyone, here is the one I am following currently: Michael Scammell - Shared Element Transitions
This one in particular: Shared element transitions within a RecyclerView

Split activity with adjustable children height

I am trying to create an activity layout with two parts, where their respective size is dynamic. The activity should have two states:
Starting state:
The user scrolls the bottom part up to the second state (and back):
It's important that the change will be animated. I tried a few solutions so far but didn't manage to find the exact way to do that:
AndroidSlidingUpPanel - The panel acts as another layout, covering the upper view and moving the toolbar out of the screen.
Android Split Pane Layout - Correct behavior, but the splitter is dragged and not the bottom part (I don't want to have a visible splitter).
CoordinatorLayout with CollapsingToolbarLayout - I didn't find a way to limit the upper part from totally disappearing. Anyway I think that it's a bit abusing because I don't want to collapse a toolbar but just change the children's height with animation.
Is there a good way to implement this using another library, one of these that I perhaps didn't use correctly or with simple layouts? Thanks!
I found a custom version of the SlidingPaneLayout created by VLC, which is basically a vertical SlidingPaneLayout - the exact functionality that I was looking for.

Vertical Stacked Views

I'm struggling for the past 2 days to find/implement an working solution for my UI requirements for an on boarding flow. This is how the UI should look like:
These pages should be scrollable vertically only.
As you can see, the pages should be stacked on top of each other. The current page (the top one) should also resize if not the first one so that the user can see the top edges of the already swiped up pages.
Beside the arrangement of the pages, when the user swipes an page up or down, there should also be an page transition, something similar to DepthPageTransformer, or at least to easily support changes for these transitions.
Until now I've tried:
Custom vertical ViewPager
Custom ScrollView with custom listener and one-by-one item scroll
Flippable StackView (and multiple other implementations of StackView)
But I've failed to achieve the desired result using any of these approaches.
The flow is similar to the linkedin flippable stackview, with the difference that my requirements are for an vertical widget and with some small minor adjustments which can be adjusted afterwards.
Can someone please help me with this or at least guide me into the correct direction?
Thank you.

Android: Arranging apps which widgets do I use: GridLayout / GridView

I understand the items that are visible to the user will be loaded when using GridView. Does this also applied when using GridLayout?
I currently working on laying out the applications' icon like the applications screen does. When user pressed the icon of the application they are allowed to arrange the icon in an unoccupied space.
At the moment, I don't know which widgets is preferred to use. If GridLayout behave the same as GridView, I would stick with that so no need to change the code.
If you want to be able to drag icons to rearrange them I would consider using GridLayout with RecyclerView. Take a look at Drag and Swipe with RecyclerView
Part Two: Handles, Grids, and Custom Animations.
If you are unfamiliar with RecyclerView and ItemTouchHelper then also look at Part One first

Create Windows Phone Styled screen in android

I am new to android XML layout and trying to make a layout that is similar to windows phone home screen. Following image tells what i am looking for.
What I have tried,
1) Horizontal Scroll View: this works for left-right swipe until the grid or list does not have a vertical scroll bar
2) Linear Layout with orientation Horizontal: Same issue as above
You can use a gesture detector to detect a swipe left or right.
http://developer.android.com/training/gestures/detector.html
You can then add an animation to animate the movement from one view to the other. How this works varies depending on how your layout is structured ( i.e. two views in one layout with one hidden, fragments that get swapped out ). There are a lot of examples on stack overflow.
swap fragment in an activity via animation
There is a Gallery View, but this is deprecated in API 16. They suggest ViewPager or HorizontalScrollView neither of which really provides the same functionality.
http://developer.android.com/reference/android/widget/Gallery.html
Here are some other options that I personally have not used.
Options for replacing the deprecated Gallery
I got this working using the ViewPager controller available in android
working code can be found here
https://github.com/harshitgoel96/ZoZo-Launcher-2
its still a work in progress, but my main two page start is working as expected.

Categories

Resources