-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Expand file tree
/
Copy pathBehaviourDelegate.java
More file actions
26 lines (19 loc) · 977 Bytes
/
BehaviourDelegate.java
File metadata and controls
26 lines (19 loc) · 977 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package com.reactnativenavigation.views;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
public class BehaviourDelegate extends CoordinatorLayout.Behavior<ViewGroup> {
private BehaviourAdapter delegate;
public BehaviourDelegate(BehaviourAdapter delegate) {
this.delegate = delegate;
}
@Override
public boolean onDependentViewChanged(@NonNull CoordinatorLayout parent, @NonNull ViewGroup child, @NonNull View dependency) {
return delegate.onDependentViewChanged(parent, child, dependency);
}
@Override
public boolean onMeasureChild(@NonNull CoordinatorLayout parent, @NonNull ViewGroup child, int parentWidthMeasureSpec, int widthUsed, int parentHeightMeasureSpec, int heightUsed) {
return delegate.onMeasureChild(parent, child, parentWidthMeasureSpec, widthUsed, parentHeightMeasureSpec, heightUsed);
}
}