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

How to prevent word wrap in tabView #5314

Closed
dbay920 opened this issue Jan 23, 2018 · 2 comments
Closed

How to prevent word wrap in tabView #5314

dbay920 opened this issue Jan 23, 2018 · 2 comments

Comments

@dbay920
Copy link

dbay920 commented Jan 23, 2018

Dear friend, we, the rest of the NativeScript community really
appreciate your feedback! While we are doing all we can to take care of every
issue, sometimes we get overwhelmed. Because of that, we will consider issues
that are not constructive or problems that cannot be reproduced "dead".
Additionally, we will treat feature requests or bug reports with unanswered
questions regarding the behavior/reproduction for more than 20 days "dead". All
"dead" issues will get closed.

Please, provide the details below:

Did you verify this is a real problem by searching Stack Overflow and the other open issues in this repo?

#4637, still open, seems somewhat similar but not resolved, no updates since 10/17/17

Tell us about the problem

Using StackLayout children within TabView parent to display title and icon for each tab item. My problem is words are being wrapped to two lines.
Examples:
Loca-
tions

Provide
rs

How do I prevent this?

Which platform(s) does your issue occur on?

iOS/Android/Both
Android

Please provide the following version numbers that your issue occurs with:

  • CLI: (run tns --version to fetch it) 3.2.1
  • Cross-platform modules: (check the 'version' attribute in the
    node_modules/tns-core-modules/package.json file in your project) 3.2.0
  • Runtime(s): (look for the "tns-android" and "tns-ios" properties in the
    package.json file of your project) 3.2.0 both platforms
  • Plugin(s): (look for the version number in the package.json file of your
    project)

Please tell us how to recreate the issue in as much detail as possible.

The best approach would be to get your code running in the NativeScript Playground and share the link with us, along with any additional details or steps to reproduce needed for examining the issue there.
Link to my app's items.component on github:
https://github.com/dbay920/phn-app/blob/master/MyPHN/app/items.component.html

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

<TabView
   #ref
   (selectedIndexChanged)="onSelectedIndexChanged($event)"
    style="android-selected-tab-highlight-color: transparent;"
>
   <StackLayout
       *tabItem="{title: 'Home',  iconSource: 'res://home'}"
   >
       <router-outlet name="home"></router-outlet>
   </StackLayout>
...
   <StackLayout 
       class="navbar-item"
       *tabItem="{title: 'Locations', iconSource: 'res://icon_location'}" 
   >
       <router-outlet name="locations"></router-outlet>
   </StackLayout>
...
</TabView>

@tsonevn
Copy link
Contributor

tsonevn commented Jan 24, 2018

HI @dbay920,
Thank you for contacting us.
As it is mentioned in issue #4637 it seems that wrapping the tab title on two lines is acceptable according to the material design guide. Also, the suggestions are to have all tabs with equal width.

Preventing word wrap in TabView required implementing new functionality to the component and at this time there is no workaround that could be used. Regarding that, I would suggest to vote on this feature and to keep track on issue #4637.

@tsonevn tsonevn closed this as completed Jan 24, 2018
@ghost ghost removed the question label Jan 24, 2018
@lock
Copy link

lock bot commented Aug 27, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Aug 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants