diff --git a/AiForms.Effects.Droid/AddTextPlatformEffect.cs b/AiForms.Effects.Droid/AddTextPlatformEffect.cs
index b185950..1854fbe 100644
--- a/AiForms.Effects.Droid/AddTextPlatformEffect.cs
+++ b/AiForms.Effects.Droid/AddTextPlatformEffect.cs
@@ -6,6 +6,7 @@
using Xamarin.Forms.Platform.Android;
using System;
using Android.Content;
+using System.Threading.Tasks;
[assembly: ExportEffect(typeof(AddTextPlatformEffect), nameof(AddText))]
namespace AiForms.Effects.Droid
@@ -162,11 +163,12 @@ static void UpdateLayout(TextView textview, Element element, Android.Views.View
var textpaint = textview.Paint;
var rect = new Android.Graphics.Rect();
- textpaint.GetTextBounds(textview.Text, 0, textview.Text.Length, rect);
+ //textpaint.GetTextBounds(textview.Text, 0, textview.Text.Length, rect); // GetTextBound.Width is sometimes a little small less than actual width.
+ var textWidth = (int)textpaint.MeasureText(textview.Text);
var xPos = 0;
if (AddText.GetHorizontalAlign(element) == Xamarin.Forms.TextAlignment.End) {
- xPos = v.Width - rect.Width() - textview.PaddingLeft - textview.PaddingRight - (int)margin.Right - 4;
+ xPos = v.Width - textWidth - textview.PaddingLeft - textview.PaddingRight - (int)margin.Right - 4;
if (xPos < (int)margin.Left) {
xPos = (int)margin.Left;
}
@@ -174,7 +176,7 @@ static void UpdateLayout(TextView textview, Element element, Android.Views.View
}
else {
xPos = (int)margin.Left;
- textview.Right = (int)margin.Left + rect.Width() + textview.PaddingLeft + textview.PaddingRight + 4;
+ textview.Right = (int)margin.Left + textWidth + textview.PaddingLeft + textview.PaddingRight + 4;
if (textview.Right >= v.Width) {
textview.Right = v.Width - (int)margin.Right;
}
@@ -189,6 +191,8 @@ static void UpdateLayout(TextView textview, Element element, Android.Views.View
textview.Top = yPos;
textview.Bottom = yPos + height;
+
+ textview.Text = textview.Text; // HACK: For some reason, Invalidate is not work. Use reassign text instead of.
}
internal class ContainerOnLayoutChangeListener : Java.Lang.Object, Android.Views.View.IOnLayoutChangeListener
diff --git a/AiForms.Effects.Droid/FeedbackPlatformEffect.cs b/AiForms.Effects.Droid/FeedbackPlatformEffect.cs
index 3aadf41..53b8fd2 100644
--- a/AiForms.Effects.Droid/FeedbackPlatformEffect.cs
+++ b/AiForms.Effects.Droid/FeedbackPlatformEffect.cs
@@ -28,7 +28,11 @@ public class FeedbackPlatformEffect:AiEffectBase
typeof(Xamarin.Forms.AbsoluteLayout),
typeof(Grid),
typeof(Xamarin.Forms.RelativeLayout),
- typeof(StackLayout)
+ typeof(StackLayout),
+ typeof(Xamarin.Forms.Button),
+ typeof(Xamarin.Forms.Image),
+ typeof(Xamarin.Forms.BoxView),
+ typeof(Xamarin.Forms.Label),
};
private Android.Views.View _view;
@@ -142,7 +146,7 @@ void OnOverlayTouch(object sender, Android.Views.View.TouchEventArgs e)
PlaySound();
}
- _view.DispatchTouchEvent(e.Event);
+ _view?.DispatchTouchEvent(e.Event);
e.Handled = false;
}
diff --git a/README-ja.md b/README-ja.md
index 6f647d1..6ed46c8 100644
--- a/README-ja.md
+++ b/README-ja.md
@@ -744,6 +744,21 @@ viewをタップするとPickerが表示され、日付を選択すると、そ
* [yuka-abn](https://github.com/yuka-abn)
* [gentledepp](https://github.com/gentledepp)
+## 寄付
+
+開発継続のため、寄付を募集しています。
+
+寄付をいただけるとやる気が非常にアップしますので、どうかよろしくお願いいたします🙇
+
+* [PayPalMe](https://paypal.me/kamusoftJP?locale.x=ja_JP)
+
+## スポンサー
+
+スポンサーも募集しています。
+こちらはサブスクリプション制になります。
+
+* [GitHub Sponsors](https://github.com/sponsors/muak)
+
## License
MIT Licensed.
diff --git a/README.md b/README.md
index d38eebc..3375dbd 100644
--- a/README.md
+++ b/README.md
@@ -768,6 +768,22 @@ This effect supports Editor only.
* [yuka-abn](https://github.com/yuka-abn)
* [gentledepp](https://github.com/gentledepp)
+## Donation
+
+I am asking for your donation for continuous development🙇
+
+Your donation will allow me to work harder and harder.
+
+* [PayPalMe](https://paypal.me/kamusoftJP?locale.x=ja_JP)
+
+
+## Sponsors
+
+I am asking for sponsors too.
+This is a subscription.
+
+* [GitHub Sponsors](https://github.com/sponsors/muak)
+
## License
MIT Licensed.
diff --git a/nuget/AzurePipelines.nuspec b/nuget/AzurePipelines.nuspec
index ce9ee7a..88d0621 100644
--- a/nuget/AzurePipelines.nuspec
+++ b/nuget/AzurePipelines.nuspec
@@ -15,11 +15,13 @@
## Changes
-* Add the Android platform init method.
+* Feedback – On Android, a button is now ringed a sound. #50
## Bug fixes
-* AlterColor – Slider thumb color isn't changed.
+* AddText – Fixed the end of characters is sometimes omitted #48.
+* Feedback – Fixed Android OnOverlayTouch crash #49.
+
Xamarin.Forms Effects Command NumberPikcer LineHeight LineSpacing FlatButton Validation SoundEffect Border TimePicker DatePicker Placeholder Color SizeToFit TouchEvents Floating
en-US