@capgo/capacitor-native-navigation 8.0.20 → 8.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -58,7 +58,12 @@ import org.xmlpull.v1.XmlPullParserFactory;
|
|
|
58
58
|
public class NativeNavigationPlugin extends Plugin {
|
|
59
59
|
|
|
60
60
|
private static final int DEFAULT_NAVBAR_DP = 56;
|
|
61
|
-
|
|
61
|
+
// Android uses Material bottom navigation metrics; web/iOS keep their own platform-native tab bar heights.
|
|
62
|
+
private static final int DEFAULT_TABBAR_DP = 80;
|
|
63
|
+
private static final int TABBAR_ICON_DP = 24;
|
|
64
|
+
private static final int TABBAR_ITEM_VERTICAL_PADDING_DP = 8;
|
|
65
|
+
private static final int TABBAR_INDICATOR_DP = 32;
|
|
66
|
+
private static final int TABBAR_INDICATOR_LABEL_PADDING_DP = 4;
|
|
62
67
|
private static final int DEFAULT_TRANSITION_MS = 350;
|
|
63
68
|
private static final int MENU_ITEM_BASE = 10_000;
|
|
64
69
|
|
|
@@ -635,6 +640,12 @@ public class NativeNavigationPlugin extends Plugin {
|
|
|
635
640
|
|
|
636
641
|
tabbar = new BottomNavigationView(getContext());
|
|
637
642
|
tabbar.setElevation(0);
|
|
643
|
+
tabbar.setMinimumHeight(dp(DEFAULT_TABBAR_DP));
|
|
644
|
+
tabbar.setItemIconSize(dp(TABBAR_ICON_DP));
|
|
645
|
+
tabbar.setItemPaddingTop(dp(TABBAR_ITEM_VERTICAL_PADDING_DP));
|
|
646
|
+
tabbar.setItemPaddingBottom(dp(TABBAR_ITEM_VERTICAL_PADDING_DP));
|
|
647
|
+
tabbar.setItemActiveIndicatorHeight(dp(TABBAR_INDICATOR_DP));
|
|
648
|
+
tabbar.setActiveIndicatorLabelPadding(dp(TABBAR_INDICATOR_LABEL_PADDING_DP));
|
|
638
649
|
tabbar.setBackgroundColor(Color.TRANSPARENT);
|
|
639
650
|
tabbar.setOnItemSelectedListener((item) -> {
|
|
640
651
|
int itemId = item.getItemId();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/capacitor-native-navigation",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.22",
|
|
4
4
|
"description": "Capacitor plugin for native navbar, tabbar, safe-area handling, and WebView snapshot transitions.",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|