草庐IT

android - 使用 ObtainStyledAttributes 的 monodroid/xamarin 自定义属性为空

尝试将自定义属性从父布局传递到子布局。从ObtainStyledAttributes()返回的TypedArray似乎没有我创建的自定义属性的相应自定义值,尽管我可以将它们的ID映射到Resource.designer中的值。属性.xml:主.xaml:查看类:publicHeaderView(Contextcontext,IAttributeSetattrs):base(context,attrs){int[]styleAttrs=Resource.Styleable.HeaderView;TypedArraya=context.ObtainStyledAttributes(attr

c# - xamarin 中的 "layout renderer failed"错误

我有一个运行良好的示例Android项目(可以在手机上构建和安装)。但是每当我在xamarin环境中双击Layout文件夹中的任何文件以查看设计模式下的布局时,都会出现以下消息。(我的xamarin版本是4.0.13)我看到this问题,但没有提供答案。任何帮助将不胜感激。 最佳答案 Xamarin团队在4.0.13中发现了一个问题,目前正在努力修复Link在此之前,让渲染器工作的唯一方法是卸载4.0.13并重新安装4.0.12 关于c#-xamarin中的"layoutrenderer

c# xamarin 圆形进度条 - Android

创建了一个圆形进度条,它与动画配合得很好。但在尝试使用动态数据进度条显示时未更新。下面的代码是有效的progrssBarObj=FindViewById(Resource.Id.progressBarSync);ObjectAnimatoranimation=ObjectAnimator.OfInt(progrssBarObj,"progress",0,100);//seethismaxvaluecomingbackhere,weanimaletowardsthatvalueanimation.SetDuration(3000);//inmillisecondsanimation.Se

c# - 无法使用 PCLStorage 或 Xamarin Forms Labs 在 Android 文件系统中创建文件夹/文件

我正在使用Xamarin平台开发一个Android应用程序,我试图在我的本地存储上创建一个文件夹,但我没有成功。首先,我尝试通过XamarinFormsLabs创建的FileManager类使用System.IO命名空间。我通过“/storage/emulated/0/`”路径传递的函数fragment。publicvoidCreateDirectory(stringpath){this.isolatedStorageFile.CreateDirectory(path);}publicStreamOpenFile(stringpath,FileModemode,FileAccessac

android - card.io Mono for Android (Xamarin Studio)

有没有人成功创建了一个他们愿意分享的card.io包装器,可以在MonoforAndroid应用程序中使用,或者有人可以阐明我做错了什么?创建一个新的AndroidJava绑定(bind)库项目添加来自card.ioSDK3.0.3的.jar和.so文件,请务必使用现有的文件夹结构将以下内容添加到Transforms/EnumMethods.xml以解决编译器错误:在我的主应用程序中添加对上述库的引用一切都编译好了,我可以访问card.io类:usingIO.Card.Payment;privatevoidWireupScanCardButton(){Log.Debug(this.Ge

android - 记录 Xamarin 未处理(Android 未捕获)异常

我想记录未处理的异常,但我看到关于是否可行以及如何可行的相互矛盾的信息。我知道Xamarin引发了一个AndroidEnvironment.UnhandledExceptionRaiser或AppDomain.CurrentDomain.UnhandledException事件并且我可以订阅这个事件,但我的印象是Android正在终止我的进程并且我无权访问Android.Utils.Log或文件系统。如果您查看Xamarin的AdvancedAppLifecycleDemos/HandlingCrashes/App.cs有一个令人信服的论点,即您不能记录此异常。//////Whenap

c# - 使用 Xamarin.Forms 显示来自 URL 的图像

我正在使用此代码显示来自URL的图像.xaml.csusingSystem;usingSystem.Collections.Generic;usingXamarin.Forms;namespaceLandAHand{publicpartialclassVolunteerView:ContentPage{publicVolunteerView(){InitializeComponent();backgroundImage.Source=newUriImageSource{Uri=newUri("https://s9.postimg.org/aq1jt3fu7/handshake_8712

c# - 你必须调用 Xamarin.Forms.Init();使用前

在我的app.xaml.cs中创建一个新页面。publicApp(){InitializeComponent();MainPage=newNavigationPage(newWrapLayoutPage());}这个页面调用了一个静态类,它使用DependencyService来执行一些任务。抛出错误的行:vartmpTable=SqLiteHelper.GetItem("someId");SqLiteHelper:publicstaticclassSqLiteHelper{privatestaticreadonlySQLiteConnectionDatabaseConnection=

android - Visual Studio 2015 上的 Xamarin - 在指定的 SDK 路径中找不到 adb.exe

在指定的SDK路径中找不到adb.exe:C:\ProgramFiles(x86)\Android\android-sdk\platform-tools\platform-tools\adb.exe我知道它在那里,因为我可以在文件夹中看到adb.exe,有​​人知道如何解决这个问题吗? 最佳答案 以管理员身份运行“SDK管理器”:C:\ProgramFiles(x86)\Android\android-sdk\SDKManager.exe下载缺少的库。AndroidSDK工具AndroidSDK平台工具在VisualStudio中设

android - Xamarin Forms Android 问题,包 android.support.design.* 不存在

我有一个Xamarin.Forms项目,我无法在其中构建Android,事实上,即使是一个全新的项目,我也遇到同样的问题,Android失败并出现大量错误。我已经安装并重新安装了AndroidSDK、Java,并确保安装了AndroidSDK中的所有内容,但还是不行。SeverityCodeDescriptionProjectFileLineSuppressionStateErrorerror:packageandroid.support.design.widget.TabLayoutdoesnotexistandroid.support.design.widget.TabLayout