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

Avoid bar being cut at edges #625

Closed
valenji opened this issue Jan 16, 2017 · 8 comments
Closed

Avoid bar being cut at edges #625

valenji opened this issue Jan 16, 2017 · 8 comments
Labels

Comments

@valenji
Copy link

valenji commented Jan 16, 2017

Hi, I would like to avoid the bottombar to be cut at the left and right edges. I mean to keep every icon completely inside of the screen.
Is it possible? How can be done?
Thanks in advance and sorry for my english.

image

@roughike
Copy link
Owner

How many icons you have, on which device?

I was able to fit 8 items / tabs without any clipping on a Nexus S portrait screen, so I'm not sure how to replicate your problem.

@roughike
Copy link
Owner

If you have some sample code that could replicate your issue, that would help a lot.

@valenji
Copy link
Author

valenji commented Jan 16, 2017

I have 5 items placed. Now I've tried on a different phone, and it's working fine. This working device is running Android 6.0 (Sony Z3Compact), the other one Android 5.1 (Huawei G8).
I've noticed that it happens with 4 items or more and it also occur with your bottombar application sample:
image

@roughike
Copy link
Owner

Must be related to a recent change that changed the tab width calculation reference from screen width to the BottomBar width.

Still can't replicate since I don't have Huawei G8. There must be some device-specific quirk there. I modified the logic just now to have the reference width to be at most the screen width.

Could you test with the newest source for the sample if that fixed it?

@roughike roughike reopened this Jan 16, 2017
@valenji
Copy link
Author

valenji commented Jan 16, 2017

Now it's working perfect! I tried with another device; Samsung Core Prime with Android 5.1.1 and I had the same issue, but as I said now it's working good on both devices.
Wow, thank you very much for answering this fast. You are awesome dude!!

@roughike
Copy link
Owner

roughike commented Jan 16, 2017

Nice! Glad I could help.

This really isn't the norm by the way, I just had a good hunch!

@roughike
Copy link
Owner

I made a completely new release just for this, since it's a pretty major issue for affected devices.

Thanks for reporting this!

@avivcaspi
Copy link

Had the same problem with my old phone
but now it working fine so I guess what you did fixed it , thank you !

thorre added a commit to thorre/BottomBar that referenced this issue Feb 2, 2017
* upstream/master: (43 commits)
  Made a new release for  fixing a major bug (roughike#625) that could affect some devices.
  Attempt to fix roughike#625 by allowing the reference width for tab calculations to be at most the screen width.
  Added a latest version badge, since all other cool kids do it
  Updated README for dependencies for the new version.
  Removed the debugging code.
  Attempt to fix failing Travis build.
  Made some previously private BottomBarTab methods public.
  Made some previously private BottomBarTab methods public.
  Updated changelog to include a mention of fixing roughike#591.
  Got rid of the refreshTabs method thus fixing a major flaw that caused all other properties to reset.
  Updated tools and support libraries.
  Update README.md
  Merged and added tests for  roughike#585.
  Updated changelog.
  Merged roughike#457 with small modifications
  Fixed accidental setting of items twice when inflating from XML.
  Updated changelog.
  Wrote a test for verifying correct behavior when setting new items programmatically.
  Attempt to fix failing Travis builds.
  Merged roughike#504 with some optimizations to the tab resizing logic.
  ...

# Conflicts:
#	bottom-bar/src/main/java/com/roughike/bottombar/BottomBarBadge.java
#	bottom-bar/src/main/java/com/roughike/bottombar/BottomBarTab.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants