Skip to content

Commit

Permalink
Fix init method name / readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Satoshi Nakamura committed Aug 24, 2019
1 parent db2a26f commit c7f6548
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 8 deletions.
2 changes: 1 addition & 1 deletion AiForms.Effects.Droid/Initialize.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace AiForms.Effects.Droid
{
[Preserve(AllMembers = true)]
public static class Initialize
public static class Effects
{
public static void Init() { }
}
Expand Down
19 changes: 16 additions & 3 deletions README-ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,29 @@ iOSで使用するために、AppDelegate.csに以下のようなコードの追

```csharp
public override bool FinishedLaunching(UIApplication app, NSDictionary options) {

global::Xamarin.Forms.Forms.Init();

AiForms.Effects.iOS.Effects.Init(); //need to write here
LoadApplication(new App(new iOSInitializer()));

return base.FinishedLaunching(app, options);
}
```

### Android プロジェクト

MainActivity.cs に以下のようなコードを追記します。

```csharp
protected override void OnCreate(Bundle bundle) {

base.OnCreate(bundle);

global::Xamarin.Forms.Forms.Init(this, bundle);
AiForms.Effects.Droid.Effects.Init(); //need to write here
...
}
```

## Floating

ページの上の任意の場所に複数のフローティングView (Floating Action Buttonなど) を配置するEffectです。
Expand Down
22 changes: 18 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,20 +85,34 @@ You need to install this nuget package to .NETStandard project and each platform

### for iOS project

To use by iOS, you need to write the following code in AppDelegate.cs.
You need to write the following code in AppDelegate.cs:

```csharp
public override bool FinishedLaunching(UIApplication app, NSDictionary options) {

global::Xamarin.Forms.Forms.Init();

AiForms.Effects.iOS.Effects.Init(); //need to write here
LoadApplication(new App(new iOSInitializer()));

...
return base.FinishedLaunching(app, options);
}
```

### for Android project

You need to write the following code in MainActivity.cs:

```csharp
protected override void OnCreate(Bundle bundle) {

base.OnCreate(bundle);

global::Xamarin.Forms.Forms.Init(this, bundle);
AiForms.Effects.Droid.Effects.Init(); //need to write here
...
}
```

## Floating

This is the effect that arranges some floating views (e.g. FAB) at any place on a page.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ protected override void OnCreate(Bundle bundle) {

global::Xamarin.Forms.Forms.SetFlags("FastRenderers_Experimental");
global::Xamarin.Forms.Forms.Init(this, bundle);
AiForms.Effects.Droid.Effects.Init();

Xamarin.Forms.Forms.ViewInitialized += (object sender, Xamarin.Forms.ViewInitializedEventArgs e) => {
if (!string.IsNullOrWhiteSpace(e.View.AutomationId)) {
Expand Down

0 comments on commit c7f6548

Please sign in to comment.