BaselineLayout.java
3.1 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
package android.support.design.internal;
import android.content.Context;
import android.support.v4.view.ViewCompat;
import android.support.v7.widget.ViewUtils;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
public class BaselineLayout
extends ViewGroup
{
private int a = -1;
public BaselineLayout(Context paramContext)
{
super(paramContext, null, 0);
}
public BaselineLayout(Context paramContext, AttributeSet paramAttributeSet)
{
super(paramContext, paramAttributeSet, 0);
}
public BaselineLayout(Context paramContext, AttributeSet paramAttributeSet, int paramInt)
{
super(paramContext, paramAttributeSet, paramInt);
}
public int getBaseline()
{
return this.a;
}
protected void onLayout(boolean paramBoolean, int paramInt1, int paramInt2, int paramInt3, int paramInt4)
{
int j = getChildCount();
int k = getPaddingLeft();
int m = getPaddingRight();
int i = getPaddingTop();
paramInt2 = 0;
if (paramInt2 < j)
{
View localView = getChildAt(paramInt2);
int n;
int i1;
int i2;
if (localView.getVisibility() != 8)
{
n = localView.getMeasuredWidth();
i1 = localView.getMeasuredHeight();
i2 = k + (paramInt3 - paramInt1 - m - k - n) / 2;
if ((this.a == -1) || (localView.getBaseline() == -1)) {
break label141;
}
}
label141:
for (paramInt4 = this.a + i - localView.getBaseline();; paramInt4 = i)
{
localView.layout(i2, paramInt4, n + i2, i1 + paramInt4);
paramInt2 += 1;
break;
}
}
}
protected void onMeasure(int paramInt1, int paramInt2)
{
int i4 = getChildCount();
int i2 = 0;
int m = 0;
int j = -1;
int k = 0;
int i3 = 0;
int i = -1;
int n;
if (i2 < i4)
{
View localView = getChildAt(i2);
if (localView.getVisibility() == 8) {
break label235;
}
measureChild(localView, paramInt1, paramInt2);
int i5 = localView.getBaseline();
n = i;
int i1 = j;
if (i5 != -1)
{
i1 = Math.max(j, i5);
n = Math.max(i, localView.getMeasuredHeight() - i5);
}
i3 = Math.max(i3, localView.getMeasuredWidth());
k = Math.max(k, localView.getMeasuredHeight());
i = ViewUtils.combineMeasuredStates(m, ViewCompat.getMeasuredState(localView));
j = i1;
}
for (m = n;; m = n)
{
i2 += 1;
n = i;
i = m;
m = n;
break;
n = k;
if (j != -1)
{
n = Math.max(k, Math.max(i, getPaddingBottom()) + j);
this.a = j;
}
i = Math.max(n, getSuggestedMinimumHeight());
setMeasuredDimension(ViewCompat.resolveSizeAndState(Math.max(i3, getSuggestedMinimumWidth()), paramInt1, m), ViewCompat.resolveSizeAndState(i, paramInt2, m << 16));
return;
label235:
n = i;
i = m;
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/android/support/design/internal/BaselineLayout.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/