草庐IT

form_handler

全部标签

c# - 如何使用自定义渲染器更改 TableSection 文本颜色 - Xamarin.Forms C#

我有一个TableView,在根目录中有3个TableSection:vartableView=newTableView{RowHeight=60,Root=newTableRoot{firstTableSection,secondTableSection,thirdTableSection,}}varfirstTableSection=newTableSection("First"){//Cells}varfirstTableSection=newTableSection("First"){//Cells}varfirstTableSection=newTableSection("F

android - Xamarin.Form 元素中的 Material 主题

在我的应用程序中,使用stepshere创建的AppCompat主题运行良好.我要申请RaisedButtonXamarin.Forms按钮中的颜色。为此,我尝试了以下操作:在MyApplication.Droid>Resources>Values>style.xml中添加样式refering如:在ViewMyView.xaml中的MyApplication.Shared可移植表单库中添加了一个按钮:但是它不起作用。由于这两个文件(MyView.xaml和style.xml)位于不同的项目中。如何使用Widget.AppCompat.Button.Colored在Xamarin.For

android - Xamarin Forms WebView 禁用自动完成

我有一个Xamarin表单WebView,它使用Source="myInternalSite.CompanySite.com"加载一个网页,该网页在HTML表单中有一个HTML输入文本字段。这是正在发生的事情。用户在输入字段中键入内容并提交。然后他们回来并再次开始输入,输入字段上会出现一个下拉列表,其中包含最后输入的内容。(在chrome中有一个设置“启用自动填充以在一次单击中填写网络表单”,在边缘“保存表单条目”)如何在XamarinformsWebView中禁用HTML表单的自动填充?或者这是否必须在HTML中完成 最佳答案 这

android - uptimeMillis() 多久重置一次,它会影响 Handler.postAtTime

方法的描述uptimeMillis说:Returnsmillisecondssinceboot,notcountingtimespentindeepsleep.Note:Thisvaluemaygetresetoccasionally(beforeitwouldotherwisewraparound).这种情况发生的频率如何(更重要的是)它会影响应由Handler.postAtTime执行的可运行程序吗?? 最佳答案 uptimeMillis调用以systemTime()为基础,在Linux系统上变为clock_gettime(CL

android - GoogleAuthUtil.getToken() 抛出 : RuntimeException: Can't create handler inside thread that has not called Looper. prepare()

这个GoogleAuthUtilgetToken()调用:Stringtoken=GoogleAuthUtil.getToken(appContext,accountName,scope);偶尔会因以下异常而失败:java.lang.RuntimeException:Can'tcreatehandlerinsidethreadthathasnotcalledLooper.prepare():ak:GooglePlayServicesNotAvailableatcom.google.android.gms.auth.GoogleAuthUtil.a(UnknownSource)atcom

java - Activity 结束后停止 Handler Runnable

我有一个方法可以让TextView充当“正在加载...”指示器。我正在使用每.5秒更新一次TextView的Runnable来执行此操作。这是我的功能:publicvoiddisplayFlash(){animate=true;Handlerhandler=newHandler();Runnablerunnable=newRunnable(){publicvoidrun(){while(animate){try{Thread.sleep(500);}catch(InterruptedExceptione){e.printStackTrace();}handler.post(newRun

android - Xamarin.Forms 在 Android 和 IOS 中的设计分离

我对Xamarin.Forms有点陌生,我正在尝试找到一种方法来分离每个设备的设计,例如Android使用MaterialDesign,我希望Android使用MaterialDesign,而IOS使用不同的东西。我正在尝试使用Xamarin.Forms来做到这一点,到目前为止我所知道的是,使用Xaml来设计布局/Storyboard,对我来说似乎并没有在特定平台的设计上将它分开(即Android通过使用支持设计或支持xaml上的小部件库)。有谁知道如何说如果是Android,请使用MaterialDesign,如果是IOS,请使用其他设计(也许OnPlatform标签可以解决问题。但

android - 如何在 Xamarin Forms 的 NavigationBar 中包含 View ?

我需要你的帮助!我从事跨平台移动开发项目。我将VisualStudio与XamarinForms结合使用。我有一个SearchBar(Xamarin.Forms类),但是,我的问题是将其包含到NavigationBar中。目前,我有一个MasterDetailPage并使用newNavigationPage(newcustomPage())初始化this.Detail。我也有一个SearchBar渲染器。所以,我需要原始的NavigationBar(我想保留返回按钮),但我想在里面添加我的SearchBar。如果您知道一种特别是对android执行此操作的方法,我将不胜感激。提前谢谢你

android - Xamarin跨平台(Xamarin.Forms)中如何识别后退按钮事件

有什么方法可以知道“Android手机”上的“后退”按钮事件何时被按下?当在Xamarin.Forms中按下此按钮时,我想退出游戏并向其添加一些功能。我在谷歌上搜索了一下,但我得到了关于Xamarin.Android后退按钮但不是Xamarin.Forms的文章。由于我对Xamarin.Forms比较陌生,请帮助我publicoverridevoidOnBackPressed(){//base.OnBackPressed();}我想要在Xamarin.Forms中做同样的事情。伙计们,需要一些帮助。 最佳答案 如果你的意思是Xama

c# - Xamarin Forms 从 PCL 请求互联网许可 Android 6

我正在使用Xamarin.Forms构建跨平台应用程序。对于内容,我使用对返回JSON的API的异步调用。所以我需要互联网许可。联系API的代码示例:vardata=awaitwc.GetStringAsync("http://website.for.content/content-api/Category/?format=json");这一行在AndroidManifest中:我为应用程序编写的所有代码都在一个可移植类库中。所以我(还)没有任何特定于平台的代码。如何从可移植类库中检查和请求互联网许可? 最佳答案 有Normal和D