This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
true & null // Null | |
false & null // False | |
true | null // True | |
false | null // Null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<resources> | |
<style name="AppTheme" parent="AppTheme.Base"> | |
</style> | |
<style name="AppTheme.Base" parent="Theme.AppCompat.Light.NoActionBar"> | |
<item name="colorPrimary">@color/primary</item> | |
<item name="colorPrimaryDark">@color/primaryDark</item> | |
<item name="colorAccent">@color/accent</item> | |
<item name="windowActionModeOverlay">true</item> | |
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[assembly: ExportRenderer(typeof(MainPage), typeof(MainPageRenderer))] | |
namespace CustomBottomMenu.Droid.Renderers | |
{ | |
internal class MainPageRenderer : VisualElementRenderer<MainPage>, IOnTabClickListener | |
{ | |
public MainPageRenderer() | |
{ | |
// Required to say packager to not to add child pages automatically | |
AutoPackage = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<pages:BaseContentPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:pages="clr-namespace:CustomBottomMenu.Pages;assembly=CustomBottomMenu" | |
x:Class="CustomBottomMenu.Pages.AboutPage" | |
Title="About"> | |
<Label Text="About" VerticalOptions="Center" HorizontalOptions="Center" /> | |
</pages:BaseContentPage> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public partial class MainPage | |
{ | |
public MainPage() | |
{ | |
InitializeComponent(); | |
} | |
protected override void OnCurrentPageChanged() | |
{ | |
base.OnCurrentPageChanged(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:pages="clr-namespace:CustomBottomMenu.Pages;assembly=CustomBottomMenu" | |
x:Class="CustomBottomMenu.Pages.MainPage"> | |
<pages:AboutPage Icon="ic_about" /> | |
<pages:ContactsPage Icon="ic_contact" /> | |
</TabbedPage> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class BaseContentPage : ContentPage | |
{ | |
public void SendAppearing() | |
{ | |
OnAppearing(); | |
} | |
public void SendDisappearing() | |
{ | |
OnDisappearing(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:id="@+id/toolbar" | |
android:layout_width="match_parent" | |
android:layout_height="?attr/actionBarSize" | |
android:minHeight="?attr/actionBarSize" | |
android:background="?attr/colorPrimary" | |
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" | |
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace CustomBottomMenu.Droid | |
{ | |
[Activity(Label = "CustomBottomMenu", Icon = "@drawable/icon", MainLauncher = true, | |
ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation, | |
Theme = "@style/AppTheme")] | |
public class MainActivity : FormsAppCompatActivity | |
{ | |
protected override void OnCreate(Bundle bundle) | |
{ | |
ToolbarResource = Resource.Layout.toolbar; |