Skip to content

Segmentedbar crash using a number as title - 2.4.0 android #3210

@FmarquezM

Description

@FmarquezM

In android, If you use a number as title in a segmentedbar item the app crash.
Not tested in iOS.

image

<SegmentedBar>
        <SegmentedBar.items>
            <SegmentedBarItem title="1" />
            <SegmentedBarItem title="2" />
        </SegmentedBar.items>
</SegmentedBar>

Perhaps this isn't the right way but i solved it with this little "hack" in this file.

/YOUR_APP_FOLDER/platforms/android/src/main/assets/app/tns_modules/ui/segmented-bar/segmented-bar.js

In line 141 replace "||" with "+".

tab.setIndicator(tabItem.title || ""); --> tab.setIndicator(tabItem.title + "");

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions