0

I'm trying to implement something like below this in a home screen widget.

Trying to use a ViewFlipper but it does not allow user control and only has option to automatically flip the views. What I want to acheive is flip on user verticle scroll. Pointers on how to acheive this would be helpful.

enter image description here

1 Answer 1

1
+50

Quoting the documentation for app widgets:

...be aware that widget layouts are based on RemoteViews, which doesn't support every kind of layout or view widget. You can't use custom views or subclasses of the views that are supported by RemoteViews.

The only RemoteViews-supported View classes that support any form of vertical gesture are ListView, GridView, and StackView. It is unclear what you expect "flip" to entail, so you will need to experiment with these three options to see which best meets your needs.

Sign up to request clarification or add additional context in comments.

2 Comments

The closest solution I can get is by using StackView. But would like to know if there is a way to hide the stacked cards (apart from the one in the front) and get the view position in focus. If you see the left-hand side of the image, the 'carousel indicators' show the intended behavior for swipe up/down.
@viv3k: "But would like to know if there is a way to hide the stacked cards (apart from the one in the front)" -- I do not believe so. The point behind StackView is to show the stack. "get the view position in focus" -- that is definitely not an option.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.