25 demonstrateConstructor(context);
26 demonstrateZoomControlsConfig();
27 demonstrateFollowMeButtonConfig();
28 demonstrateFloorSelectorViewConfig();
29 demonstrateConfigAtInit(context);
30 demonstrateRuntimeConfigUpdate();
31 demonstrateWidgetAccess();
37 private void demonstrateConstructor(Context context) {
41 navigationView.setLayoutParams(
new ViewGroup.LayoutParams(
42 ViewGroup.LayoutParams.MATCH_PARENT,
43 ViewGroup.LayoutParams.MATCH_PARENT
62 private void demonstrateZoomControlsConfig() {
65 .buttonBackgroundColor(0xF2FAFAFA)
66 .textColor(0xFF152D47)
68 .zoomControlsHeight(96f)
77 private void demonstrateFollowMeButtonConfig() {
80 .accentColor(0xFF30AAD9)
81 .buttonBackgroundColor(0xF2FAFAFA)
82 .textColor(0xFF152D47)
93 private void demonstrateFloorSelectorViewConfig() {
96 .accentColor(0xFF30AAD9)
97 .textColor(0xFF152D47)
98 .buttonBackgroundColor(0xF2FAFAFA)
108 private void demonstrateConfigAtInit(Context context) {
110 DefaultNavigationViewConfig viewConfig = DefaultNavigationViewConfig.
builder()
111 .
visibleWidgets(DefaultNavigationViewConfig.WIDGET_ZOOM_CONTROLS | DefaultNavigationViewConfig.WIDGET_FOLLOW_ME)
113 ZoomControlsConfig zoomConfig = ZoomControlsConfig.builder()
114 .buttonBackgroundColor(0xF2FAFAFA)
116 FollowMeButtonConfig followMeConfig = FollowMeButtonConfig.builder()
117 .accentColor(0xFF30AAD9)
127 private void demonstrateRuntimeConfigUpdate() {
129 if (navigationView !=
null) {
130 DefaultNavigationViewConfig newViewConfig = DefaultNavigationViewConfig.builder()
131 .visibleWidgets(DefaultNavigationViewConfig.WIDGET_FOLLOW_ME)
133 FollowMeButtonConfig newFollowMeConfig = FollowMeButtonConfig.builder()
134 .accentColor(0xFFFF0000)
136 navigationView.setConfig(newViewConfig,
null, newFollowMeConfig,
null);
144 private void demonstrateWidgetAccess() {
146 if (navigationView !=
null) {
147 ZoomControls zoomControls = navigationView.getZoomControls();
148 FollowMeButton followMeButton = navigationView.getFollowMeButton();
149 FloorSelectorView floorSelector = navigationView.getFloorSelectorView();