Skip to content
28 changes: 16 additions & 12 deletions android/modules/ui/res/layout/titanium_ui_bottom_navigation.xml
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">

<FrameLayout
android:id="@+id/bottomNavBar_content"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/bottomNavBar" />
android:layout_height="match_parent">

<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottomNavBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" />
<FrameLayout
android:id="@+id/bottomNavBar_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/bottomNavBar" />

<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottomNavBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" />

</RelativeLayout>
</RelativeLayout>
</androidx.drawerlayout.widget.DrawerLayout>
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@
TiC.PROPERTY_AUTO_TAB_TITLE,
TiC.PROPERTY_EXIT_ON_CLOSE,
TiC.PROPERTY_SMOOTH_SCROLL_ON_TAB_CLICK,
TiC.PROPERTY_INDICATOR_COLOR
TiC.PROPERTY_INDICATOR_COLOR,
TiC.PROPERTY_LEFT_VIEW,
TiC.PROPERTY_RIGHT_VIEW
})
public class TabGroupProxy extends TiWindowProxy implements TiActivityWindow
{
Expand Down Expand Up @@ -780,6 +782,54 @@ public void fireSafeAreaChangedEvent()
}
}

@Kroll.method
public void toggleLeft()
{
if (view instanceof TiUIBottomNavigation bottomNavigation) {
bottomNavigation.toggleLeft();
}
}

@Kroll.method
public void openLeft()
{
if (view instanceof TiUIBottomNavigation bottomNavigation) {
bottomNavigation.openLeft();
}
}

@Kroll.method
public void closeLeft()
{
if (view instanceof TiUIBottomNavigation bottomNavigation) {
bottomNavigation.closeLeft();
}
}

@Kroll.method
public void toggleRight()
{
if (view instanceof TiUIBottomNavigation bottomNavigation) {
bottomNavigation.toggleRight();
}
}

@Kroll.method
public void openRight()
{
if (view instanceof TiUIBottomNavigation bottomNavigation) {
bottomNavigation.openRight();
}
}

@Kroll.method
public void closeRight()
{
if (view instanceof TiUIBottomNavigation bottomNavigation) {
bottomNavigation.closeRight();
}
}

@Override
public String getApiName()
{
Expand Down
Loading
Loading