|
@@ -20,6 +20,7 @@ import android.widget.RelativeLayout;
|
20
|
20
|
import android.widget.TextView;
|
21
|
21
|
|
22
|
22
|
import com.reactnativenavigation.BuildConfig;
|
|
23
|
+import com.reactnativenavigation.R;
|
23
|
24
|
import com.reactnativenavigation.anim.TopBarAnimator;
|
24
|
25
|
import com.reactnativenavigation.anim.TopBarCollapseBehavior;
|
25
|
26
|
import com.reactnativenavigation.interfaces.ScrollEventListener;
|
|
@@ -29,7 +30,6 @@ import com.reactnativenavigation.parse.BackButton;
|
29
|
30
|
import com.reactnativenavigation.parse.Component;
|
30
|
31
|
import com.reactnativenavigation.parse.params.Button;
|
31
|
32
|
import com.reactnativenavigation.parse.params.Color;
|
32
|
|
-import com.reactnativenavigation.parse.params.Fraction;
|
33
|
33
|
import com.reactnativenavigation.parse.params.Number;
|
34
|
34
|
import com.reactnativenavigation.utils.CompatUtils;
|
35
|
35
|
import com.reactnativenavigation.utils.ImageLoader;
|
|
@@ -63,6 +63,7 @@ public class TopBar extends AppBarLayout implements ScrollEventListener.ScrollAw
|
63
|
63
|
|
64
|
64
|
public TopBar(final Context context, ReactViewCreator buttonCreator, TitleBarReactViewCreator titleBarReactViewCreator, TopBarBackgroundViewController topBarBackgroundViewController, TopBarButtonController.OnClickListener onClickListener, StackLayout parentView, ImageLoader imageLoader) {
|
65
|
65
|
super(context);
|
|
66
|
+ context.setTheme(R.style.TopBar);
|
66
|
67
|
this.imageLoader = imageLoader;
|
67
|
68
|
collapsingBehavior = new TopBarCollapseBehavior(this);
|
68
|
69
|
this.topBarBackgroundViewController = topBarBackgroundViewController;
|
|
@@ -225,11 +226,10 @@ public class TopBar extends AppBarLayout implements ScrollEventListener.ScrollAw
|
225
|
226
|
titleBar.setRightButtons(rightButtons);
|
226
|
227
|
}
|
227
|
228
|
|
228
|
|
- public void setElevation(Fraction elevation) {
|
229
|
|
- if (elevation.hasValue() &&
|
230
|
|
- Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP &&
|
231
|
|
- getElevation() != elevation.get().floatValue()) {
|
232
|
|
- setElevation(UiUtils.dpToPx(getContext(), elevation.get().floatValue()));
|
|
229
|
+ public void setElevation(Double elevation) {
|
|
230
|
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP &&
|
|
231
|
+ getElevation() != elevation.floatValue()) {
|
|
232
|
+ setElevation(UiUtils.dpToPx(getContext(), elevation.floatValue()));
|
233
|
233
|
}
|
234
|
234
|
}
|
235
|
235
|
|