xamarin.android

(Android Xamarin) Get Resource string value instead of int

爷,独闯天下 提交于 2019-12-21 07:04:22
问题 Im just starting to create a simple android app with the use of Xamarin using VS2012. I know there is a type of Resource just for strings. In my resource folder, i have an xml file like this: <?xml version="1.0" encoding="utf-8"?> <resources> <string name="RecordsTable">records</string> <string name="ProjectTable">projects</string> <string name="ActivitiesTable">activities</string> </resources> In my code, I want to use the values of those resources like: string recordTable = Resource.String

MonoDroid Splash Screen

本秂侑毒 提交于 2019-12-21 06:04:51
问题 How can I implement a simple "splash screen" on program startup? I am copying a SQLite DB and it can be a bit of a long process that is not UI "friendly" . I would prefer not to use "java code". TIA 回答1: I recently solved this problem in the following way. In the main activity I passed a parameter via the intent to set the number of milliseconds for which the splash screen would remain visible. protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); // Set our view from the

Most user friendly option for layout in android App

喜欢而已 提交于 2019-12-21 05:56:26
问题 SO the problem I am facing is not about subjectively judge what is best for the user (I think) but what options are available to illustrate positioning. Think of some sort of team sports app, where you can put little dots for players (and then I can replace the dots with some UI component that represents the player) something like this where you can drag and drop the red and blue dots I tried this with a gridview, and it's pretty hard because I need to have a set number of rows/cols and they

Xamarin.Android Binding to 3rd party SDK with dependencies

…衆ロ難τιáo~ 提交于 2019-12-21 05:08:07
问题 I am using VS2015 Update3 with current/up-to-date Xamarin, and am trying to create a binding library to wrap a 3rd party SDK written in Java. I have a C#/.Net background, with little Java experience thus far. This SDK depends on 3 other items, which are available as AAR's or via NuGet. I was able to create a binding library for the parent AAR, with some MetaData.xml tweakery to adjust parameter types and return types and correct a class accessor to satisfy its abstract base class, all of

Timeouts in Xamarin HTTP requests

这一生的挚爱 提交于 2019-12-21 04:27:21
问题 Good evening! I was trying to clean/refine some code and ended up finding issues with timeouts in Xamarin HTTP requests (as described in my original thread: Async Download and Deserialize). Issue found (only tested with Xamarin.Android; don't know about iOS): When a host cannot be reached (e.g., an offline local server), GetAsync throws a System.Net.WebException after roughly 3 minutes with the message Error: ConnectFailure (Connection timed out) . The Inner exception is System.Net.Sockets

card.io Mono for Android (Xamarin Studio)

烈酒焚心 提交于 2019-12-21 04:14:34
问题 Has anybody successfully created a card.io wrapper they're willing to share that can be used in a Mono for Android application or can somebody shed some light on what I'm doing wrong? Create a new Android Java Bindings Library Project Add the .jar and .so files from card.io SDK 3.0.3, be sure to use the existing folder structure Add the following to Transforms/EnumMethods.xml to resolve a compiler error: <mapping jni-class="io/card/payment/CardIOActivity"> <method jni-name="onActivityResult"

Get current Activity - Xamarin Android

夙愿已清 提交于 2019-12-21 03:39:10
问题 I am developing an portable App for Android and iOS. My current function is taking a Screenshot and use that image in the code. Therefor I have an Interface in the portable library. public interface IFileSystemService { string GetAppDataFolder(); } I am taking the Screenshot also in the portable Library with the following code: static public bool TakeScreenshot() { try { byte[] ScreenshotBytes = DependencyService.Get<Interface.IScreenshotManager>().TakeScreenshot(); return true; } catch

MonoDroid, SQLite and LINQ

狂风中的少年 提交于 2019-12-21 02:31:36
问题 I can't seem to find an example of using LINQ over SQLite on MonoDroid. Is there one available anywhere? 回答1: The sqlite-net library works well with Mono for Android and provides some LINQ support. I have a post here describing how to use it in Mono for Android applications. 来源: https://stackoverflow.com/questions/8461795/monodroid-sqlite-and-linq

Xamarin.Forms MissingMethodException: 'Android.Support.V4.Widget.DrawerLayout.AddDrawerListener' not found

两盒软妹~` 提交于 2019-12-20 23:27:36
问题 I have followed everything from the following link: https://developer.xamarin.com/guides/xamarin-forms/user-interface/navigation/master-detail-page/ The code I wrote can be found here: http://github.com/foyzulkarim/XamarinFormsDrawer I successfully deployed the same project in my Windows 10 Local machine using UWP project, but whenever I want to deploy in Emulator, or in my device, it is throwing the following exception. System.MissingMethodException: Method 'Android.Support.V4.Widget

Xamarin how it is getting the Native Look and Feel?

与世无争的帅哥 提交于 2019-12-20 12:34:16
问题 I am new to Xamarin. I have few confusion here. Question: How does Xamarin get the Native Look and Feel of the UI Components?. Does Xamarin Provide their own Widgets [ like button, Layouts, ..]. Here is my understanding Correct me if I am wrong?. 1) Develop the UI [ button, layout...] by native SDK. For example iOS use Xcode. for Android ?. 2) Consider the button, when the button is pressed, the the code which is going to get executed is common across the platform. 3) So, Since UI are