🤷♂️
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
#if __ANDROID__ | |
ViewHandler.ViewMapper[nameof(IView.BackgroundColor)] = (handler, view) => | |
(handler.NativeView as AView).SetBackgroundColor(Android.Graphics.Color.Green); | |
var textView = crossPlatformLabel.Handler.NativeView as TextView; | |
#endif |
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
<application android:label="MVP" | |
android:icon="@mipmap/ic_launcher" | |
android:roundIcon="@mipmap/ic_launcher_round"> | |
... | |
</application> |
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"?> | |
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> | |
<background android:drawable="@color/ic_launcher_background"/> | |
<foreground android:drawable="@mipmap/mvp_logo"/> | |
</adaptive-icon> |
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(DatePicker), typeof(MyDatePickerRenderer))] | |
namespace MyProject.iOS.Renderers | |
{ | |
public class MyDatePickerRenderer : DatePickerRenderer | |
{ | |
protected override void OnElementChanged(ElementChangedEventArgs<DatePicker> e) | |
{ | |
base.OnElementChanged(e); | |
if (e.NewElement != null && Control != 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
using Android.Content; | |
using Android.Graphics; | |
using Android.Widget; | |
using Google.Android.Material.BottomNavigation; | |
using Google.Android.Material.Internal; | |
using MyProject.Droid.Renderers; | |
using Xamarin.Forms; | |
using Xamarin.Forms.Platform.Android; | |
using Xamarin.Forms.Platform.Android.AppCompat; |
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 xmlns:tools="http://schemas.android.com/tools"> | |
<dimen name="design_bottom_navigation_text_size" tools:override="true">14sp</dimen> | |
<dimen name="design_bottom_navigation_active_text_size" tools:override="true">14sp</dimen> | |
<dimen name="design_bottom_navigation_icon_size">20dp</dimen> | |
<dimen name="design_bottom_navigation_height">60dp</dimen> | |
</resources> |
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 App() | |
{ | |
InitializeComponent(); | |
// Set the theme that the user has picked. | |
Current.UserAppTheme = (OSAppTheme)Preferences.Get(Settings.AppTheme, Settings.AppThemeDefault); | |
} |
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 class ThemePickerViewModel | |
{ | |
public IList<AppThemeViewModel> AppThemes { get; set; } = new List<AppThemeViewModel> { | |
new AppThemeViewModel() { Key = (int)OSAppTheme.Unspecified }, | |
new AppThemeViewModel() { Key = (int)OSAppTheme.Light }, | |
new AppThemeViewModel() { Key = (int)OSAppTheme.Dark } | |
}; | |
public ICommand SetAppThemeCommand { get; set; } |