1
1
import { state , stateSets } from '@nativescript-community/ui-material-core/android/utils' ;
2
- import { Color , ImageSource , Utils } from '@nativescript/core' ;
2
+ import { Color , ImageSource , Utils , heightProperty } from '@nativescript/core' ;
3
3
import {
4
4
BottomNavigationBarBase ,
5
5
BottomNavigationTabBase ,
@@ -105,6 +105,8 @@ export class BottomNavigationBar extends BottomNavigationBarBase {
105
105
_items : BottomNavigationTab [ ] ;
106
106
reselectListener : OnNavigationItemReselectedListener ;
107
107
selectListener : OnNavigationItemSelectedListener ;
108
+ // default height property
109
+ height = 56 ;
108
110
createNativeView ( ) {
109
111
return new com . google . android . material . bottomnavigation . BottomNavigationView ( this . _context ) ;
110
112
}
@@ -157,7 +159,6 @@ export class BottomNavigationBar extends BottomNavigationBarBase {
157
159
[ tabsProperty . setNative ] ( tabs : BottomNavigationTab [ ] ) {
158
160
this . createTabs ( tabs ) ;
159
161
}
160
-
161
162
[ titleVisibilityProperty . setNative ] ( titleVisibility : TitleVisibility ) {
162
163
this . nativeViewProtected . setLabelVisibilityMode ( titleVisibility ) ;
163
164
}
@@ -255,8 +256,8 @@ export class BottomNavigationTab extends BottomNavigationTabBase {
255
256
this . inactiveColor instanceof Color
256
257
? this . inactiveColor . android
257
258
: this . nativeViewProtected . getIconTintList ( )
258
- ? this . nativeViewProtected . getIconTintList ( ) . getColorForState ( stateSets . BACKGROUND_DEFAULT_STATE_2 , color1 )
259
- : 0 ;
259
+ ? this . nativeViewProtected . getIconTintList ( ) . getColorForState ( stateSets . BACKGROUND_DEFAULT_STATE_2 , color1 )
260
+ : 0 ;
260
261
const colorStateList = createColorStateList ( color1 , color2 ) ;
261
262
// this.nativeViewProtected.color(colorStateList); // can we set the text color?
262
263
this . nativeViewProtected . setIconTintList ( colorStateList ) ;
@@ -269,8 +270,8 @@ export class BottomNavigationTab extends BottomNavigationTabBase {
269
270
this . activeColor instanceof Color
270
271
? this . activeColor . android
271
272
: this . nativeViewProtected . getIconTintList ( )
272
- ? this . nativeViewProtected . getIconTintList ( ) . getColorForState ( stateSets . SELECTED_STATE_SET , color2 )
273
- : 0 ;
273
+ ? this . nativeViewProtected . getIconTintList ( ) . getColorForState ( stateSets . SELECTED_STATE_SET , color2 )
274
+ : 0 ;
274
275
const colorStateList = createColorStateList ( color1 , color2 ) ;
275
276
// this.nativeViewProtected.setText(colorStateList); // can we set the text color?
276
277
this . nativeViewProtected . setIconTintList ( colorStateList ) ;
0 commit comments