|
@@ -11,6 +11,7 @@ import android.support.v4.widget.TextViewCompat;
|
11
|
11
|
import android.support.v7.widget.TintTypedArray;
|
12
|
12
|
import android.text.TextPaint;
|
13
|
13
|
import android.text.TextUtils;
|
|
14
|
+import android.util.Log;
|
14
|
15
|
import android.view.animation.DecelerateInterpolator;
|
15
|
16
|
import android.view.animation.Interpolator;
|
16
|
17
|
import android.widget.FrameLayout;
|
|
@@ -20,6 +21,9 @@ import android.widget.TextView;
|
20
|
21
|
import com.reactnativenavigation.R;
|
21
|
22
|
import com.reactnativenavigation.params.StyleParams;
|
22
|
23
|
import com.reactnativenavigation.utils.ViewUtils;
|
|
24
|
+import com.reactnativenavigation.views.utils.Point;
|
|
25
|
+
|
|
26
|
+import static android.R.attr.y;
|
23
|
27
|
|
24
|
28
|
public class CollapsingTextView extends FrameLayout {
|
25
|
29
|
private static final float TEXT_SCALE_FACTOR = 1.75f;
|
|
@@ -123,11 +127,9 @@ public class CollapsingTextView extends FrameLayout {
|
123
|
127
|
}
|
124
|
128
|
|
125
|
129
|
private void calculateTextPosition(Canvas canvas) {
|
126
|
|
- final int[] positionOnScreen = new int[2];
|
127
|
|
- getLocationInWindow(positionOnScreen);
|
128
|
|
- currentY = initialY = positionOnScreen[1] + canvas.getHeight() - dummy.getMeasuredHeight();
|
|
130
|
+ currentY = initialY = ViewUtils.getStatusBarHeight() + canvas.getHeight() - dummy.getMeasuredHeight();
|
129
|
131
|
float bottomMargin = ViewUtils.convertDpToPixel(10);
|
130
|
|
- collapseY = positionOnScreen[1] + bottomMargin;
|
|
132
|
+ collapseY = ViewUtils.getStatusBarHeight() + bottomMargin;
|
131
|
133
|
}
|
132
|
134
|
|
133
|
135
|
private float linearInterpolation(float from, float to, float fraction) {
|