Note: I am using the NuGet Package, but i made the same test at this current code and results the same.
Problem: method NavBarMagic(Activity activity, BottomBar bottomBar) always returns as false because the property bottomBar.DrawBehindNavBar which is declared as false, is never set and can't be set as true making the if clause inside the method always returning, making it impossible to draw behind it.
In-depth Explanation:
In the following if clause, taken from the NuGet code:
Or, in the following if clause, taken from this current branch:
if (!bottomBar.DrawBehindNavBar
|| navBarHeight == 0)
{
return;
}
The first property bottomBar.DrawBehindNavBar will always return as false
since it is declared as false and there is no way to set it as true because it is declared as protected. So we end up having this logical case:
In which will always results in true, doesn't matter the other cases since true || will always return true.
Solution: Changing access of the property from:
protected bool DrawBehindNavBar { get; set; }
to:
public bool DrawBehindNavBar { get; set; }
Note: I am using the NuGet Package, but i made the same test at this current code and results the same. Problem: method
NavBarMagic(Activity activity, BottomBar bottomBar)
always returns asfalse
because the propertybottomBar.DrawBehindNavBar
which is declared asfalse
, is never set and can't be set astrue
making the if clause inside the method always returning, making it impossible to draw behind it. In-depth Explanation: In the following if clause, taken from the NuGet code:Or, in the following if clause, taken from this current branch:
The first property
bottomBar.DrawBehindNavBar
will always return asfalse
since it is declared asfalse
and there is no way to set it astrue
because it is declared as protected. So we end up having this logical case:In which will always results in true, doesn't matter the other cases since
true ||
will always returntrue
. Solution: Changing access of the property from:protected bool DrawBehindNavBar { get; set; }
to:public bool DrawBehindNavBar { get; set; }