-
Notifications
You must be signed in to change notification settings - Fork 96
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
Added Fix as proposed in #6 and added Fixed Mode and Textcolor #16
Conversation
Space above bottom navigation bar dewango#6
…use FixedMode. When selecting FixedMode also the TabText and Icon color can be set by setting BarTextColor
Added a property FixedMode to BottombarPage so that you now can also use FixedMode. When selecting FixedMode also the TabText and Icon color can be set by setting BarTextColor You can only select a the Text and Icon Color of the active Tab when using Fixed Mode |
Thank you for your contribution! |
@@ -21,7 +21,9 @@ namespace BottomBar.XamarinForms | |||
{ | |||
public class BottomBarPage : TabbedPage | |||
{ | |||
public void RaiseCurrentPageChanged() | |||
public bool FixedMode { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code is not formatted....
@@ -132,7 +132,11 @@ protected override void OnElementChanged (ElementChangedEventArgs<BottomBarPage> | |||
// create bottomBar control | |||
_bottomBar = BottomNavigationBar.BottomBar.Attach (_frameLayout, null); | |||
_bottomBar.NoTabletGoodness (); | |||
_bottomBar.LayoutParameters = new LayoutParams (LayoutParams.MatchParent, LayoutParams.MatchParent); | |||
if (bottomBarPage.FixedMode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please format the code?
@@ -227,7 +231,8 @@ void UpdateBarTextColor () | |||
return; | |||
} | |||
|
|||
// haven't found yet how to set text color for tab items on_bottomBar, doesn't seem to have a direct way | |||
_bottomBar.SetActiveTabColor(Element.BarTextColor.ToAndroid()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strange it's formated at my side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see, seems a problem with tabs vs / spaces. had to switch to tabs yesterday. will change it.
Should I create a new branch and make a new PR or what is the best way?
Also I have no idea why my VS is changing the project files. I did not change anything there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's strange. must be another problem.
I create a new branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is my first PR to this project and I felt you comments quite harsh as if I'm an idiot who cannot format his code before pushing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry if you feel that way. Please read again, I didn't have any harsh comments, I just asked if you could remove the unnecessary changes, which add a lot of noise to the PR. That's in order to maintain a clean code as possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't want to push this further. Perhaps the next time first welcome a new contributor. It's about motivation to contribute on a project.
I'm fine now, we found the reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't welcome you? I'm sorry for that. Welcome again!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh written communication is so difficult if it comes to emotions :-(
This is strange, when using FixedMode I can set the TextColor, but no longer the Bar Color. any idea? |
Ok, found out how it works. You have to set DarkTheme and then provide a colors.xml file. I added a property for the theming to BottomBarPage |
Found today that the CurrentPageChangedEvent was called twice because it was called due to the asignment of the new Page to CurrentPage which triggers an OnPropertyChanged event and on the following call to RaiseCurrentPageChanged. I changed it to
As I wrote in the comment I'm not sure if we need the first call to SwitchContent as it get called again when the CurrentPage property get's changed:
If you comment it out it still works. |
@sschmidt did you have a loom at my PR? |
Hello @escamoteur !
While I am at it I made another fix in
If you want I can commit those changes to my master branch and send you the PR... Cheers |
Great, what about the other extensions? what do you think about them? |
Hi @escamoteur, thanks for the great contribution. Highly appreciated! Do we really need the changes to the sln and csproj files (i.e. changes to visual studio version/target framework version)? In case those changes don't add to the solution, I'd like to leave those files as they are. As I understand @nbsoftware and @andreinitescu already approved/tested this PR (thanks guys!). I'll test it tomorrow and we can go ahead and merge this in. |
Sorry, this seems to be an effect of VS 2015 with Xamarin 4.2. It automatcially changes it when you first open an solution with it. |
Great, thanks. Do you built a new nuget? |
Sure, can you briefly test the master version before I update nuget please? |
Hello, Before releasing to nuget, could you please integrate the two small fixes I mentioned in #16 (comment) ? Would you prefer I issue a PR from current master? Thanks |
@nbsoftware sure. A PR would be more than welcome! |
Did anybody of you try to change the fond/fontsize of the Tabb Texts in fixed mode? One of my texts get's truncated while perfectly visible on iOS. |
Just checked the current version works fine. |
#6 Added the proposed fix