|
@@ -20,7 +20,6 @@ import android.widget.LinearLayout;
|
20
|
20
|
import android.widget.RelativeLayout;
|
21
|
21
|
import android.widget.TextView;
|
22
|
22
|
|
23
|
|
-import com.reactnativenavigation.BuildConfig;
|
24
|
23
|
import com.reactnativenavigation.R;
|
25
|
24
|
import com.reactnativenavigation.anim.TopBarAnimator;
|
26
|
25
|
import com.reactnativenavigation.anim.TopBarCollapseBehavior;
|
|
@@ -29,6 +28,7 @@ import com.reactnativenavigation.parse.Alignment;
|
29
|
28
|
import com.reactnativenavigation.parse.AnimationOptions;
|
30
|
29
|
import com.reactnativenavigation.parse.params.Colour;
|
31
|
30
|
import com.reactnativenavigation.parse.params.Number;
|
|
31
|
+import com.reactnativenavigation.utils.CollectionUtils;
|
32
|
32
|
import com.reactnativenavigation.utils.CompatUtils;
|
33
|
33
|
import com.reactnativenavigation.utils.UiUtils;
|
34
|
34
|
import com.reactnativenavigation.viewcontrollers.TitleBarButtonController;
|
|
@@ -36,6 +36,7 @@ import com.reactnativenavigation.views.StackLayout;
|
36
|
36
|
import com.reactnativenavigation.views.titlebar.TitleBar;
|
37
|
37
|
import com.reactnativenavigation.views.toptabs.TopTabs;
|
38
|
38
|
|
|
39
|
+import java.util.ArrayList;
|
39
|
40
|
import java.util.Collections;
|
40
|
41
|
import java.util.List;
|
41
|
42
|
|
|
@@ -52,6 +53,7 @@ public class TopBar extends AppBarLayout implements ScrollEventListener.ScrollAw
|
52
|
53
|
private View border;
|
53
|
54
|
private View component;
|
54
|
55
|
private float elevation = -1;
|
|
56
|
+ private List<TitleBarButtonController> rightButtons = new ArrayList<>();
|
55
|
57
|
|
56
|
58
|
public TopBar(final Context context, StackLayout parentView) {
|
57
|
59
|
super(context);
|
|
@@ -218,6 +220,8 @@ public class TopBar extends AppBarLayout implements ScrollEventListener.ScrollAw
|
218
|
220
|
}
|
219
|
221
|
|
220
|
222
|
public void setRightButtons(List<TitleBarButtonController> rightButtons) {
|
|
223
|
+ if (CollectionUtils.equals(this.rightButtons, rightButtons)) return;
|
|
224
|
+ this.rightButtons = rightButtons;
|
221
|
225
|
titleBar.setRightButtons(rightButtons);
|
222
|
226
|
}
|
223
|
227
|
|