ViewOffsetBehavior.java
1.76 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
package android.support.design.widget;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import x;
class ViewOffsetBehavior<V extends View>
extends CoordinatorLayout.Behavior<V>
{
private x a;
private int b = 0;
private int c = 0;
public ViewOffsetBehavior() {}
public ViewOffsetBehavior(Context paramContext, AttributeSet paramAttributeSet)
{
super(paramContext, paramAttributeSet);
}
public int getLeftAndRightOffset()
{
if (this.a != null) {
return this.a.c;
}
return 0;
}
public int getTopAndBottomOffset()
{
if (this.a != null) {
return this.a.b;
}
return 0;
}
protected void layoutChild(CoordinatorLayout paramCoordinatorLayout, V paramV, int paramInt)
{
paramCoordinatorLayout.onLayoutChild(paramV, paramInt);
}
public boolean onLayoutChild(CoordinatorLayout paramCoordinatorLayout, V paramV, int paramInt)
{
layoutChild(paramCoordinatorLayout, paramV, paramInt);
if (this.a == null) {
this.a = new x(paramV);
}
this.a.a();
if (this.b != 0)
{
this.a.a(this.b);
this.b = 0;
}
if (this.c != 0)
{
this.a.b(this.c);
this.c = 0;
}
return true;
}
public boolean setLeftAndRightOffset(int paramInt)
{
if (this.a != null) {
return this.a.b(paramInt);
}
this.c = paramInt;
return false;
}
public boolean setTopAndBottomOffset(int paramInt)
{
if (this.a != null) {
return this.a.a(paramInt);
}
this.b = paramInt;
return false;
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/android/support/design/widget/ViewOffsetBehavior.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/