-
-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c9fc1b5
commit c29a942
Showing
173 changed files
with
662 additions
and
949 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
namespace Sample | ||
namespace Sample; | ||
|
||
public partial class App : Application | ||
{ | ||
public partial class App : Application | ||
public App() | ||
{ | ||
public App() | ||
{ | ||
InitializeComponent(); | ||
InitializeComponent(); | ||
} | ||
|
||
MainPage = new AppShell(); | ||
} | ||
protected override Window CreateWindow(IActivationState? activationState) | ||
{ | ||
return new Window(new AppShell()); | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
namespace Sample | ||
namespace Sample; | ||
|
||
public partial class AppShell : Shell | ||
{ | ||
public partial class AppShell : Shell | ||
public AppShell() | ||
{ | ||
public AppShell() | ||
{ | ||
InitializeComponent(); | ||
} | ||
InitializeComponent(); | ||
} | ||
} | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,51 @@ | ||
namespace Sample | ||
{ | ||
using Android.Views; | ||
using Com.Skydoves.Balloon; | ||
using Microsoft.Maui.Platform; | ||
namespace Sample; | ||
|
||
public partial class MainPage : ContentPage | ||
{ | ||
public MainPage() | ||
{ | ||
InitializeComponent(); | ||
} | ||
using Android.Views; | ||
using Com.Skydoves.Balloon; | ||
using Microsoft.Maui.Platform; | ||
|
||
private void OnCounterClicked(object sender, EventArgs e) | ||
{ | ||
var balloon = new Balloon.Builder(Platform.AppContext) | ||
.SetText("Edit your profile here!") | ||
.SetTextSize(15f) | ||
.SetArrowPositionRules(ArrowPositionRules.AlignAnchor) | ||
.SetArrowSize(10) | ||
.SetArrowPosition(0.5f) | ||
.SetPadding(12) | ||
.SetCornerRadius(8f) | ||
.SetBalloonAnimation(BalloonAnimation.Elastic) | ||
.SetOnBalloonDismissListener(new BallonDismissListener(() => | ||
{ | ||
var balloon2 = new Balloon.Builder(Platform.AppContext) | ||
.SetWidthRatio(1.0f) | ||
.SetHeight(BalloonSizeSpec.Wrap) | ||
.SetLayout(new BallonContent().ToPlatform(Handler.MauiContext)) | ||
.SetArrowPositionRules(ArrowPositionRules.AlignAnchor) | ||
.SetArrowSize(10) | ||
.SetArrowPosition(0.5f) | ||
.SetPadding(12) | ||
.SetCornerRadius(8f) | ||
.SetBalloonAnimation(BalloonAnimation.Fade) | ||
.Build(); | ||
balloon2.ShowAtCenter(MauiLabel.ToPlatform(MauiLabel.Handler.MauiContext)); | ||
})) | ||
.Build(); | ||
balloon.ShowAtCenter(CounterBtn.ToPlatform(CounterBtn.Handler.MauiContext)); | ||
} | ||
public partial class MainPage : ContentPage | ||
{ | ||
public MainPage() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
internal class BallonDismissListener(Action action) : Java.Lang.Object, IOnBalloonDismissListener | ||
private void OnCounterClicked(object sender, EventArgs e) | ||
{ | ||
public void OnBalloonDismiss() | ||
{ | ||
action(); | ||
} | ||
var balloon = new Balloon.Builder(Platform.AppContext) | ||
.SetText("Edit your profile here!") | ||
.SetTextSize(15f) | ||
.SetArrowPositionRules(ArrowPositionRules.AlignAnchor) | ||
.SetArrowSize(10) | ||
.SetArrowPosition(0.5f) | ||
.SetPadding(12) | ||
.SetCornerRadius(8f) | ||
.SetBalloonAnimation(BalloonAnimation.Elastic) | ||
.SetOnBalloonDismissListener(new BallonDismissListener(() => | ||
{ | ||
var balloon2 = new Balloon.Builder(Platform.AppContext) | ||
.SetWidthRatio(1.0f) | ||
.SetHeight(BalloonSizeSpec.Wrap) | ||
.SetLayout(new BallonContent().ToPlatform(Handler.MauiContext)) | ||
.SetArrowPositionRules(ArrowPositionRules.AlignAnchor) | ||
.SetArrowSize(10) | ||
.SetArrowPosition(0.5f) | ||
.SetPadding(12) | ||
.SetCornerRadius(8f) | ||
.SetBalloonAnimation(BalloonAnimation.Fade) | ||
.Build(); | ||
balloon2.ShowAtCenter(MauiLabel.ToPlatform(MauiLabel.Handler.MauiContext)); | ||
})) | ||
.Build(); | ||
balloon.ShowAtCenter(CounterBtn.ToPlatform(CounterBtn.Handler.MauiContext)); | ||
} | ||
} | ||
|
||
internal class BallonDismissListener(Action action) : Java.Lang.Object, IOnBalloonDismissListener | ||
{ | ||
public void OnBalloonDismiss() | ||
{ | ||
action(); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,25 @@ | ||
namespace Sample | ||
{ | ||
using Calendar; | ||
using MauiBells.Calendar; | ||
namespace Sample; | ||
|
||
using Calendar; | ||
using MauiBells.Calendar; | ||
|
||
public static class MauiProgram | ||
public static class MauiProgram | ||
{ | ||
public static MauiApp CreateMauiApp() | ||
{ | ||
public static MauiApp CreateMauiApp() | ||
{ | ||
var builder = MauiApp.CreateBuilder(); | ||
builder | ||
.UseMauiApp<App>() | ||
.ConfigureFonts(fonts => | ||
{ | ||
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); | ||
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold"); | ||
}) | ||
.ConfigureMauiHandlers(x => | ||
{ | ||
x.AddHandler<CalendarView, CalendarMaterialHandler>(); | ||
}); | ||
var builder = MauiApp.CreateBuilder(); | ||
builder | ||
.UseMauiApp<App>() | ||
.ConfigureFonts(fonts => | ||
{ | ||
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); | ||
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold"); | ||
}) | ||
.ConfigureMauiHandlers(x => | ||
{ | ||
x.AddHandler<CalendarView, CalendarMaterialHandler>(); | ||
}); | ||
|
||
return builder.Build(); | ||
} | ||
return builder.Build(); | ||
} | ||
} | ||
} |
19 changes: 9 additions & 10 deletions
19
AndroidBindableLibraries/Sample/Platforms/Android/MainActivity.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
namespace Sample | ||
{ | ||
using Android.App; | ||
using Android.Content.PM; | ||
using Android.OS; | ||
namespace Sample; | ||
|
||
using Android.App; | ||
using Android.Content.PM; | ||
using Android.OS; | ||
|
||
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, LaunchMode = LaunchMode.SingleTop, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)] | ||
public class MainActivity : MauiAppCompatActivity | ||
{ | ||
} | ||
} | ||
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, LaunchMode = LaunchMode.SingleTop, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)] | ||
public class MainActivity : MauiAppCompatActivity | ||
{ | ||
} |
25 changes: 12 additions & 13 deletions
25
AndroidBindableLibraries/Sample/Platforms/Android/MainApplication.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
namespace Sample | ||
{ | ||
using Android.App; | ||
using Android.Runtime; | ||
namespace Sample; | ||
|
||
[Application] | ||
public class MainApplication : MauiApplication | ||
{ | ||
public MainApplication(IntPtr handle, JniHandleOwnership ownership) | ||
: base(handle, ownership) | ||
{ | ||
} | ||
using Android.App; | ||
using Android.Runtime; | ||
|
||
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); | ||
[Application] | ||
public class MainApplication : MauiApplication | ||
{ | ||
public MainApplication(IntPtr handle, JniHandleOwnership ownership) | ||
: base(handle, ownership) | ||
{ | ||
} | ||
} | ||
|
||
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); | ||
} |
Oops, something went wrong.