我正在尝试在 Xamarin 表单上为我的 Xamarin 表单映射向我的自定义搜索栏(我正在使用一个条目)添加自动完成服务,但我无法这样做。
我已经尝试过 XLabs 但没有用,到目前为止我还没有找到任何其他解决方案。
Xamarin.FormsMaps 是否包含任何自动完成功能?或者 Xamarin 上是否有任何我可能缺少的自动完成功能?你给我推荐什么?如果您需要任何代码或其他任何内容,请告诉我。
我正在尝试根据其运行的设备更改条目的背景。我尝试根据以下信息进行操作:https : //developer.xamarin.com/guides/xamarin-forms/xaml/passing-arguments/
并得到了这个:
<Entry TextColor="White"
x:Name="entryTop"
HeightRequest="40"
WidthRequest="150"
RelativeLayout.XConstraint = "{ConstraintExpression Type=RelativeToParent,
Property=Width,
Factor=.48,
Constant=10}"
RelativeLayout.YConstraint = "{ConstraintExpression Type=RelativeToParent,
Property=Height,
Factor=0,
Constant=5}" >
<Entry.BackgroundColor>
<OnPlatform x:TypeArguments="x:String">
<On Platform="Android" Value="Transparent" />
<On Platform="iOS" Value="white" />
</OnPlatform>
</Entry.BackgroundColor>
</Entry>
Run Code Online (Sandbox Code Playgroud)
当我尝试构建我的项目时,我收到此错误:没有为 找到属性、可绑定属性或事件BackgroundColor,或者值和属性之间的类型不匹配。
我尝试了颜色工厂方法和几个TypeArguments,但似乎无法得到正确的方法。
我正在尝试构建我的项目,但是当我这样做时,我收到此错误:"错误:包com.google.firebase.messaging不存在",以及其他4个相同类型的错误.
package md5f64326b4609986d97810cf2ced03c9ce;
public class MyFirebaseMessagingService
extends com.google.firebase.messaging.FirebaseMessagingService
implements
mono.android.IGCUserPeer
{
/** @hide */
public static final String __md_methods;
static {
__md_methods =
"n_onMessageReceived(Lcom/google/firebase/messaging/RemoteMessage;)V:GetOnMessageReceived_Lcom_google_firebase_messaging_RemoteMessage_Handler\n" +
"";
mono.android.Runtime.register ("FCMClient.MyFirebaseMessagingService, LimBands.Droid, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null", MyFirebaseMessagingService.class, __md_methods);
}
public MyFirebaseMessagingService ()
{
super ();
if (getClass () == MyFirebaseMessagingService.class)
mono.android.TypeManager.Activate ("FCMClient.MyFirebaseMessagingService, LimBands.Droid, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null", "", this, new java.lang.Object[] { });
}
public void onMessageReceived (com.google.firebase.messaging.RemoteMessage p0)
{
n_onMessageReceived (p0);
}
private native void n_onMessageReceived (com.google.firebase.messaging.RemoteMessage p0);
private java.util.ArrayList refList;
public void monodroidAddReference …Run Code Online (Sandbox Code Playgroud) xamarin.android firebase xamarin xamarin.forms firebase-cloud-messaging
我一直在尝试在 Xamarin iOS 上使用自定义字体,但它根本不起作用。这是我的 info.plist:
<key>UIAppFonts</key>
<array>
<string>BebasNeue-Regular.ttf</string>
</array>
Run Code Online (Sandbox Code Playgroud)
我还将 .ttf 文件的构建操作设置为 BundleResource 并“始终复制”,如我已阅读的几个教程中所示。如果我将构建操作更改为“编译”(正如我在其他教程中找到的那样),它将根本无法构建。
编辑:这就是它的使用方式
<Label Text="Hello Forms with XAML">
<Label.FontFamily>
<OnPlatform x:TypeArguments="x:String">
<On Platform="iOS" Value="BebasNeue-Regular" />
<On Platform="Android" Value="BebasNeue-Regular.ttf#BebasNeue-Regular" />
</OnPlatform>
</Label.FontFamily>
Run Code Online (Sandbox Code Playgroud)
xamarin ×3
xamarin.ios ×2
autocomplete ×1
c# ×1
firebase ×1
google-maps ×1
ios ×1
truetype ×1
xaml ×1