xamarin.android

Monodroid Transparent WebView

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-12 03:21:22
问题 I'm trying to re-write a java android app into monodroid, however I have come across an issue with the background transparency of the webview that I use to display the contents of each screen. This code works correctly on the java version (Black text on a green background), but in the C# version, the webview's background is black (black rectangle on the green background). Java Code: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); LinearLayout

Finding the com… to use in Android Layout

◇◆丶佛笑我妖孽 提交于 2019-12-12 03:11:43
问题 I am using this tutorial to try to replace the default TitleBar with a custom ActionBar. I am to the part where I am trying to create the xml layout for the custom title (#2 Under INCLUDING THE ACTIONBAR WIDGET IN YOUR APPLICATION), and the tutorial defines the ActionBar in the xml using com.thira.examples.actionbar.widget.ActionBar I have no idea how to figure out what to put there for my ActionBar. I believe this is called the package name. If so, how do I figure out what mine is. If not,

Xamarin Android HttpClient Error when use from a Class

旧时模样 提交于 2019-12-12 03:05:39
问题 I have the following code that errors out when going to site what has SSL. (Error: SecureChannelFailure (The authentication or decryption has failed.) Their SSL cert is valid. When the HttpClient code is called directly there is not issue. What is wrong with my code? Uri uri =new Uri("https://jsonplaceholder.typicode.com/posts/1"); using (HttpClient httpclient = new HttpClientClass()) { var tt = await httpclient.GetAsync(uri); string tx = await tt.Content.ReadAsStringAsync(); Log.Info(TAG, tx

Can't add Microsoft Azure Configuration Manager library for .NET package in Xamarin Studio

泪湿孤枕 提交于 2019-12-12 02:53:48
问题 I need to use the CloudConfigurationManager class that the Microsoft Azure Configuration Manager library for .NET provides to parse a connection string from a configuration file. Skip down to the "Parse the connection string" step of this tutorial to see what I'm doing. I'm following along as close as I can using the Xamarin platform. I'm creating an Android app that I want to save two strings to a table using Azure Storage. When I try to add the Microsoft Azure Configuration Manager Library

Custom EventHandler in Xamarin.Forms doesn't work in xaml

 ̄綄美尐妖づ 提交于 2019-12-12 02:33:33
问题 In Xamarin.Forms , in PCL, I have custom control, with custom event: public class TestGrid : Grid { public EventHandler OnTapped; public TestGrid() { var tgr = new TapGestureRecognizer { NumberOfTapsRequired = 1 }; tgr.Tapped += Tgr_Tapped; this.GestureRecognizers.Add(tgr); } private void Tgr_Tapped(object sender, EventArgs e) { OnTapped?.Invoke(sender, e); } } in my StartPage I have: public partial class StartPage : ContentPage { public StartPage() { InitializeComponent(); BindingContext =

Can updating a TextView off the UI Thread cause an exception in it?

China☆狼群 提交于 2019-12-12 02:19:42
问题 If a View is manipulated (ie, a TextView's text) in OnCreateView() (which is not on UI thread from my understanding), could it cause an exception in it (when this statement finally executes and trys to update the TextView , whenever that may be)? For example, when the set text doesn't actually show up on the screen widget, could an exception have occurred that prevented it from showing that is eaten by the UI thread (or should the exception show up in the logger regardless)? public class

How to convert a generic list from and to Java.Lang.Object in Mono for Android

喜夏-厌秋 提交于 2019-12-12 02:18:40
问题 Now I'm facing this problem and don't know about a solution yet. The doc on Xamarin is pretty vague to me on this matter. The fact that Java Generics are implemented as type erase which is quite different from .NET's approach also makes the matter quite complex. Could anyone point me to the right direction? It seems that the generic type parameter should implement IJavaObject, but I did this and it does not work in this case. 回答1: I think I'll have to answer it myself. After contacting

How to build x86 and ARM in a single apk under Xamarin?

回眸只為那壹抹淺笑 提交于 2019-12-12 02:16:58
问题 In my setup, I have a simple Xamarin app MyApp under Visual Studio 2015. The wizard automatically generates various sub-projects such as MyApp.Droid, MyApp.iOS , etc. I also have a C++ Android Shared Dynamic Library project MyShared in the solution and MyApp.Droid has a reference to MyShared project. Here is the relevant information from MyApp.Droid.csproj file: <ItemGroup> <ProjectReference Include="..\..\MyShared\MyShared.vcxproj"> <Project>{4301be08-ecf3-4c36-a487-473858bc5506}</Project>

Get Touch Coordinates Relative To A Custom ImageView

橙三吉。 提交于 2019-12-12 02:07:44
问题 I implemented custom ImageView. Because my image is large I'm using ScrollView and HorizontalScrollView to scrolling image. I want to draw circle in onTouch event, but its not work in all cases. When I scroll image and fire touch event the x,y coordinates apply to current visible sector of image ( in top right corner its e.g. 0x0, but when I scroll somwhere and in visible top corner it will be 0x0 too), but circle is drawing according to image size. Another problem is that app could be used

MvvmCross fragments resolving

放肆的年华 提交于 2019-12-12 01:54:39
问题 I'm using Xamarin with MvvmCross, and have problem with fragments usage. I call ShowViewModel so: public class MainViewModel : MvxViewModel { public override void Start() { ShowViewModel<MainMenuViewModel>(); } } Where MainMenuViewModel it's class: public class MainMenuViewModel : MvxViewModel { } Implemented fragment as follows: [MvxFragment(typeof(MainMenuViewModel), Resource.Id.navigation_frame)] [Register("mvvm.droid.views.MainMenuView")] public class MainMenuView : MvxFragment