Questions tagged [android-motionlayout]
The android-motionlayout tag has no usage guidance, but it has a tag wiki.
411
questions
0
votes
0
answers
10
views
Why "public boolean onTouchEvent(MotionEvent event)" is not getting called when reetlayout is "androidx.constraintlayout.motion.widget.MotionLayout"?
can you guys do a short demo of using motionLyout and try to get log or toast messages from public boolean onTouchEvent(MotionEvent event) in activity class ?
In my case. I'm trying to capture drag ...
0
votes
0
answers
15
views
MotionLayout shows final constraints suddenly before starting transition
The problem I am having is my layout is showing the final position of the constraints (or the final few), before actually starting the transition.
So when all panels are allClosed and go to allOpen, ...
0
votes
1
answer
32
views
NestedScrollView not working with MotionLayout
Why Google, why do you have to make things sooo difficult???
Here is my situation, I am using Google's code for MotionLayoutsCodeLab as my base.
I added a NestedScrollView to my layout and what was ...
0
votes
0
answers
32
views
HorizontalScrollView is jumping to the start on motion layout animation
When animating a motion layout(expand animation) inside a HorizontalScrollView at the end of the animation the scroll view jumps to the start(see attached video). Tried to use the following code to ...
0
votes
1
answer
37
views
Motionlayout two transitions not working properly
We are creating a transitions like youtube. We have exo player area and recyclerview underneath.
When user drags top player area it should collapse and become mini player.
When vertical video comes(9:...
0
votes
0
answers
24
views
Card views in recycler view using motionlayout
I have a recycler view that displays a horizontal list of cards.
When I select a single card the card's size is meant to scale up by 1.1 and the other cards will remain the same size, but they are ...
1
vote
0
answers
22
views
In Android, how do I transform a FAB into a view, when a user scrolls down the fragment?
I want to have two buttons doing the same thing. One a FAB, and one a big plus sign that looks like a card.
Is it possible to have the FAB "explode" into the PlusSignView, maybe with a ...
0
votes
1
answer
40
views
MotionLayout seems to lose some constraints during animation
I have a problem:
I have a TextView whose content is constantly changing via LiveData. This looks all right when the animation isn't executing, but when the MotionLayout starts executing, my text gets ...
0
votes
0
answers
28
views
Changes after convert to MotionLayout not recorded in git
In a new fragment with a ConstraintLayout I convert it to MotionLayout by selecting the menu option "Convert to MotionLayout"
The conversion completes successfully and the xml file with the ...
1
vote
1
answer
79
views
How to add click listener to Carousel item
I've created a Carousel using MotionLayout by following this guide: https://developer.android.com/training/constraint-layout/motionlayout/carousel
I've gotten everything from this guide working - I ...
1
vote
0
answers
39
views
How to make smooth MotionLayout?
I have a RecyclerView in my application, there is a layout above and below it, I need the top layout to collapse while I scroll the RecyclerView, and when the RecyclerView goes down to the end, the ...
0
votes
0
answers
116
views
Lottie Animation - Switch Button goes back to starting state - Android Studio
I'm trying to recreate a switch button using Lottie Animations and it does work good on click (when clicked), but goes back to the original state instantly. I have disabled AutoPlay and Loop as well ...
0
votes
0
answers
30
views
MotionLayout swipe reaction acceleration
I use a motion layout in conjunction with a carousel (constraintlayout.helper.widget.Carousel) that captures left-to-right and right-to-left swipes. The problem is that in one pass over the screen, ...
0
votes
0
answers
21
views
Is there any way to get exact coordinate of a component in react native like that it's possible in html using element.getBoundingClientRect();
I have tried this way
const layout = event.nativeEvent.layout;
console.log(
"height:",
layout.height,
);
console.log("width:", layout.width);
...
0
votes
0
answers
27
views
Animated-vector-drawable don´t work properly in motionlayout
I build up a motionlayout as a collapsable toolbar layout. I also added an imagebutton inside my motionlayout with an animated-vector-drawable as image. The motionlayout progress is triggered with ...
0
votes
0
answers
54
views
ListView inside MotionLayout and BottomSheet pushes content of screen when expanding
I used a motion layout to create an extended view, where the list view is filled using an array adapter. The problem is that if too many entries are filled into the list view, the lowest extended view ...
0
votes
0
answers
43
views
Android visibility not working for MotionLayout
I'm trying to make visibility changes for a view under MotionLayout using this answer https://stackoverflow.com/a/62658424/5412554
but for me, it's not working under observe. For eg:
viewModel....
0
votes
0
answers
16
views
MotionLayout stops working on RecyclerView after rebinding
I have an issue on using MotionLayout over recycler view items. It works when loading the items to recycler view. But after scroll up/down a few times, all the constraints are gone. This happens only ...
0
votes
0
answers
15
views
How to check collision between view motion layout and imageview
I want to build simple game in android studio java, when the object fall and catch it with view motion layout, but i dont know how to check collision, can you help me about this?
I try use Rect class, ...
0
votes
0
answers
31
views
OnSwipe not working when SwipeRefreshLayout in MotionLayout
I faced with the issue with MotionLayout when creating collapsing header with motion layout and SwipeRefreshLayout with RecyclerView under the header. So when I try to swipe on SwipeRefreshLayout up, ...
0
votes
0
answers
38
views
Motion layout on swipe is not working I have use tab view with view pager
I have created a bottom sheet with motion layout having default open 35% and in side that we have tabview and view pager and on Swipe of tabView I want that view pager height gone.
But onSwipe is not ...
1
vote
1
answer
48
views
Is it possible to have two swipe handlers in a MotionLayout?
I want to recreate a menu (See screenshot below) from Google Play Store (Or many others google apps), but I don't know how.
Screenshot of the menu
I've tried to use MotionLayout with two vertical ...
0
votes
0
answers
39
views
How to bring a new full screen fragment on screen from right by swiping using MotionLayout in Android?
I am trying to achieve a DrawerLayout like scene using MotionLayout. I have a home fragment and another card fragment that I want to come above home fragment when I swipe it from right. While ...
0
votes
1
answer
37
views
Android OnClick on main layout does not work, is it because of MotionLayout?
I want to be able to perform onClickListner on root RelativeLayout called "rl". Not it does not work I suspect it can be because of MotionLayout as a children. How to solve that?
Here is ...
1
vote
0
answers
30
views
Animating RecyclerView from Grid to Linear with MotionLayout
Can I animate transition of RecyclerView items from Grid layout to Linear (Horizontal) layout with use of MotionLayout?
I was unable to find any example of that.
My goal is to use RecyclerView in this ...
1
vote
0
answers
26
views
How to implement custom GridLayoutManager for RecyclerView
How to implement custom LayoutManager for RecyclerView with similar (but yet, very different) behavior as GridLayoutManager? (see picture)
Am I able to use (or extend) GridLayoutManager with ...
0
votes
0
answers
21
views
How to do a drag-and-drop motion animation with first or last ViewPager item?
I need to implement an animation in ViewPager2
where user can drag first or last item
beyound the bounds (for half of screen width),
and items will bounce back with animation automatically.
Please ...
0
votes
0
answers
23
views
Android MotionLayout starts to transition to start when NestedScrollView is not on top
The problem is that my MotionLayout starts to transition to start position when NestedScrollView is not on top. It goes to end correctly - when I start swiping my nestedScrollView to bottom. Going to ...
0
votes
0
answers
25
views
Cropping at the bottom of the Expand/Collapse MotionLayout
I have used this article to create an expand/collapse cardview component with my own changes. Right now, whats happening is that when I expand the view, the botom part of the view is getting cropped. ...
-1
votes
1
answer
83
views
Is it possible to move A layout towards left so that other side of screen can be visible? [closed]
Actually, I am trying to build a game in which the scene is outside the screen.
I want my screen to scroll towards the right so that my that scene comes to the screen when I click any button.
I am ...
0
votes
2
answers
126
views
RecyclerView blocks swipe in MotionLayout
I have problem with swipe in my views in front (add folder kind of dialog) of recycler view. When I perform the swipe gesture it's just scrolling in RecyclerView behind it.
However when I tried to set ...
0
votes
1
answer
92
views
Is there a way to have multiple independent transitions in motion layout?
Let me explain the problem with an example. I wish to animate two (or more) "cubes" in motion layout.
Cube:
<View
android:id="@+id/cube"
android:layout_width="100dp&...
0
votes
1
answer
52
views
Android my motionlayout constraints does not react to child views
I wonder if this is possible to modify child of direct view in MotionScene. I have FrameLayout with two views inside and one of them (iv_avatar) I want to make smaller width and height at the end of ...
0
votes
0
answers
63
views
How to make MotionLayout scroll like CollapsingToolbarLayout when using the enterAlwaysCollapsed flag?
Consider the following Coordinator+AppBar+MotionLayout and its MotionScene from Google's demo. This creates a MotionLayout that sync's its Transition progress when the user is scrolling.
Video: https:/...
0
votes
1
answer
154
views
Issue with preferedWrapContent and ConstraintLayout
I'm using a Composable which take a content @Composable in parameter, and it seems that with the final version of ConstraintLayout, there is no update.
Here is the code
@Composable
fun Example(
...
1
vote
0
answers
45
views
Android motionlayout not animating
I want to animate my swipe from bottom to top gesture. When I do this gesture on tv it should shrink height and reduce alpha of rl. Now it does not animate, just switch between two states start one ...
0
votes
1
answer
112
views
How to scroll a sync'd up MotionLayout+AppBarLayout programmatically?
Consider the following Coordinator+AppBar+MotionLayout and its MotionScene from Google's demo. This creates a MotionLayout that sync's its Transition progress when the user is scrolling.
Video Preview:...
-1
votes
1
answer
35
views
Draw a point path using MotionLayout
Is there a way to draw in MotionLayout a view path without canvas.drawPath(path, p) ?
example1
example2
0
votes
0
answers
44
views
how to set KeyFrameSet with motion layout in android programmatically?
I want to set KeyFrameSet with motion layout in android programmatically but I cant find a way to add it in motion scene or transition
0
votes
1
answer
57
views
how can i create this horizontal recycler view(or view pager) in android?
when I scroll screen down the item of recycler view became collapse(when scroll down) and expand(when scroll up)
this is expand mode of item
and this is collapse mode of item of recycler view
my ...
0
votes
1
answer
66
views
Apply bezier curve to MotionLayout at runtime
I have used this article to create an expand/collapse cardview component. Right now, the expand/collapse animation is linear. I want to apply a bezier curve to the animation so that the animation will ...
0
votes
1
answer
264
views
How to change the way MotionLayout animates view visibility
Default MotionLayout view visibility animation is proportional scaling of view's size.
Not even scaling of resulting image, but actual View size changes.
On TextView this causes text realigning, so it ...
0
votes
1
answer
75
views
MotionLayout not recyclable as a child of RecyclerView
i try to implement programmatically version of MotionLayout by extending it. And i have a base activity ayout using RecyclerView.
However, when i add my motion layout as an item of the RecyclerView, ...
1
vote
0
answers
48
views
MotionLayout not rendered when set the Scene
have a nice day
I try to create Motion layout programmatically by extending it. Just add view to it and invoke the motion.
However, when i try to setScene(...) my layout is blank like no render ...
0
votes
1
answer
53
views
Unwanted gap in MotionLayout after child-item collapse
Im studying how to work with MotionLayout right now and each project facing strange problem with unwanted white gap at the bottom of parent frame after my TextView (or TextView wrapped by other frame) ...
0
votes
0
answers
164
views
MotionLayout animation not working properly inside RecyclerView item
I use this library StackExpandable to add an Expand/Collapse cardViews as a recyclerview item. Expand/Collapse works fine. But the issue I am facing is that when I expand two items and while scrolling,...
0
votes
1
answer
452
views
How to populate Constraintlayout as view in carousel apdapter in motionlayout android?
I'm trying to use carousel widget in motionlayout for making OnBoardActivity. I'm create three layout contain first, second and third layour. Then I create on_board_activity layout. This is my code:
&...
2
votes
0
answers
282
views
Jetpack Compose - MotionLayout with scrollableView
I have a Compose MotionLayout with :
a title at the middle of the screen first
a bellow content which can be a LazyColumn or a Column with verticalScroll()
When I dragUp the content, the title must ...
0
votes
1
answer
137
views
Motion layout with individual moveWhenScrollAtTop flag for views
I want to create a screen with a motion layout, here is the layout scheme:
Header visible if a user is on top of the RecyclerView, otherwise it's gone;
Filters visible if the user swipes up, gone if ...
0
votes
0
answers
115
views
<OnSwipe> MotionLayout not working properly inside RecyclerView
have a nice day!
I found an issue when create sample App using MotionLayout and put it inside the Recyclerview. So basically my motion layout is a recyclerview item.
But, the swipe event not working ...