FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Segmentedbar crash using a number as title - 2.4.0 android · Issue #3210 · NativeScript/NativeScript · GitHub

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

Description

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

<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 + "");

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL