Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android: improve BottomNavigation (experimental feature) #14126

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
cee32ae
xml test
m1ga Sep 27, 2024
4d7916b
badge
m1ga Sep 29, 2024
a89b6cd
use old tabgroup layout
m1ga Oct 2, 2024
4978b22
theme
m1ga Oct 2, 2024
9f3b4c2
more features
m1ga Oct 2, 2024
aa21b57
Merge branch 'master' into bottomNavigationXML
m1ga Oct 5, 2024
c1294ec
more colors
m1ga Oct 5, 2024
0851417
touchfeedback
m1ga Oct 9, 2024
dd1615d
res icons
m1ga Oct 15, 2024
62a6168
add addTab()
m1ga Oct 17, 2024
ff6d9d5
Merge branch 'master' into bottomNavigationXML
m1ga Oct 17, 2024
a657695
Merge branch 'master' into bottomNavigationXML
m1ga Oct 17, 2024
20cda85
remove redundant code, floating bar
m1ga Oct 17, 2024
48c31b0
icon font support
m1ga Oct 19, 2024
a057fb5
tintColor support for icons
m1ga Oct 19, 2024
6536b01
Merge branch 'master' into bottomNavigationXML
m1ga Oct 19, 2024
6e0ddfc
optimize selected state
m1ga Oct 20, 2024
85fc7a6
color updates
m1ga Oct 20, 2024
706cf01
add flags
m1ga Oct 20, 2024
cb1da13
status bar
m1ga Oct 21, 2024
23b1f88
Merge branch 'master' into bottomNavigationXML
m1ga Dec 14, 2024
a1930c2
chore: apidoc
m1ga Dec 14, 2024
42ff775
update property
m1ga Dec 15, 2024
fa95329
Merge branch 'master' into bottomNavigationXML
m1ga Dec 21, 2024
92c117a
Merge branch 'master' into bottomNavigationXML
m1ga Jan 2, 2025
3a52011
events
m1ga Jan 2, 2025
dbceb8e
test, bugfix for empty title
m1ga Jan 2, 2025
dec1971
add enabled property
m1ga Jan 15, 2025
a6f57f9
docs
m1ga Jan 15, 2025
ac5a629
Merge branch 'master' into bottomNavigationXML
m1ga Jan 15, 2025
60c5047
fix WindowProxy
m1ga Jan 15, 2025
4df0d81
fix WindowProxy
m1ga Jan 15, 2025
ba637af
fix linting
m1ga Jan 15, 2025
ad2748e
add back windowFlags for light status bar
m1ga Jan 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

import ti.modules.titanium.ui.android.AndroidModule;
import ti.modules.titanium.ui.widget.tabgroup.TiUIAbstractTabGroup;
import ti.modules.titanium.ui.widget.tabgroup.TiUIBottomNavigation;
import ti.modules.titanium.ui.widget.tabgroup.TiUIBottomNavigationTabGroup;
import ti.modules.titanium.ui.widget.tabgroup.TiUITabLayoutTabGroup;

Expand Down Expand Up @@ -367,7 +368,11 @@ public void windowCreated(TiBaseActivity activity, Bundle savedInstanceState)
((TiUITabLayoutTabGroup) view).setTabMode((Integer) getProperty(TiC.PROPERTY_TAB_MODE));
}
} else {
view = new TiUIBottomNavigationTabGroup(this, activity);
if (TiConvert.toBoolean(getProperty("newLayout"), false)) {
hansemannn marked this conversation as resolved.
Show resolved Hide resolved
view = new TiUIBottomNavigation(this, activity);
} else {
view = new TiUIBottomNavigationTabGroup(this, activity);
}
}
// If we have set a title before the creation of the native view, set it now.
if (this.tabGroupTitle != null) {
Expand Down
16 changes: 0 additions & 16 deletions android/modules/ui/src/java/ti/modules/titanium/ui/TabProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import org.appcelerator.titanium.util.TiUIHelper;
import org.appcelerator.titanium.view.TiUIView;

import ti.modules.titanium.ui.widget.TiUIBottomNavigation;
import ti.modules.titanium.ui.widget.tabgroup.TiUIAbstractTabGroup;

import android.app.Activity;
Expand All @@ -40,11 +39,9 @@ public class TabProxy extends TiViewProxy
private static final String TAG = "TabProxy";

private TabGroupProxy tabGroupProxy;
private TiUIBottomNavigation navBar;
private TiWindowProxy window;
private boolean windowOpened = false;
private int windowId;
private int navBarId;

public TabProxy()
{
Expand Down Expand Up @@ -144,12 +141,6 @@ public void setTabGroup(TabGroupProxy tabGroupProxy)
}
}

public void setNavBar(TiUIBottomNavigation bottomNav, int idx)
{
this.navBar = bottomNav;
this.navBarId = idx;
}

public void setWindowId(int id)
{
windowId = id;
Expand Down Expand Up @@ -238,13 +229,6 @@ public void onPropertyChanged(String name, Object value)
{
super.onPropertyChanged(name, value);

if (navBar != null) {
if (name.equals(TiC.PROPERTY_BADGE)) {
navBar.updateBadge(this.navBarId);
}
return;
}

// Fetch the TabGroup's view. If currently null, then we have to wait for TabGroup activity to be created.
TiUIView view = (this.tabGroupProxy != null) ? this.tabGroupProxy.peekView() : null;
if (!(view instanceof TiUIAbstractTabGroup)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ public void onPageScrollStateChanged(int i)
// Set action bar color.
if (proxy != null) {
final ActionBar actionBar = ((AppCompatActivity) proxy.getActivity()).getSupportActionBar();
if (actionBar != null) {
if (actionBar != null && !this.tabs.isEmpty()) {
final TiWindowProxy windowProxy = ((TabProxy) this.tabs.get(tabIndex).getProxy()).getWindow();
final KrollDict windowProperties = windowProxy.getProperties();
final KrollDict properties = getProxy().getProperties();
Expand Down
Loading
Loading