xamarin.android

CardView Design is not appear Xamarin Android

半腔热情 提交于 2021-01-29 15:45:59
问题 My CardView design is not properly appearing in Xamarin android project. It's gives me a alert "could not load controls form the android support library". Though I've added all support libraries. I really can't find the missing libraries now. I've a imageview and some other textview under the CardView which is not appearing in design. but runs the project without having any issues. Any help is highly appreciated. [![Here is my design preview. It's just showing the text CardView][1]][1] Here

Xamarin.Cognitive.Face API connecting problems

匆匆过客 提交于 2021-01-29 15:09:46
问题 I tried to use this Nuget package, but I can't connect to the API. I got an error " Rejecting re-init on previously-failed class java.lang.Class: java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/client/methods/HttpPost;" so I can't use any of the FaceClient functions- they're all return null. I use Xamarin Android 回答1: I added the line <uses-library android:name="org.apache.http.legacy" android:required="false" /> at the <applicaion> tag in the AndroidManifest.xml file

How to change font style or override default font style for complete Application in Xamarin.Android

南楼画角 提交于 2021-01-29 13:47:51
问题 I found many post saying to change font style of every label/entry/button/etc etc statically from xaml files using FontAttribute="Font_Syle.tff#Font_Style" or by making the custom renderer for every of property like label/entry/button/etc & change TypeFace for everyone of it individually. [assembly: ExportRenderer(typeof(Label), typeof(CustomLabel))] namespace *******.Droid.Renderers { public class CustomLabel : LabelRenderer { protected override void OnElementChanged(ElementChangedEventArgs

Can't find an element on iOS in my xamarin ui tests

这一生的挚爱 提交于 2021-01-29 12:41:00
问题 I wrote some tests on android and now I'm trying to make it compatible to iOS too. I have some picker : enter image description here I gave the picker automation id and also to the label inside him so I can read it text, in android I succeed but in iOS I can't even see the label. tree repl in iOS : Ios repl tree tree repl in android: android repl tree the xaml code: <scrControls:ScrPickerWithBorder x:Name="SleepStartPicker" Grid.Row="1" Grid.Column="1" Margin="0" ArrowColor="{StaticResource

Adding a Project Reference to a Xamarin Forms App

跟風遠走 提交于 2021-01-29 11:26:07
问题 VS 2017 / C#. I have a working Web and WebApi app. A web page accessing the WebApi (both written by me). I am now trying to create a Mobile App using Xamarin forms to call the WebApi. My mobile app needs access to a DTO project (part of my API). I can add the reference to the xxx.Android App, but I need to reference the DTO's in the xxx.Mobile App. There seems to be no option to add a reference in that 'shared' app. This means my code error's as it cannot find the DTO definitions. Anyone have

Click a notification to open a new temporary activity page and then return to the main activity (Xamarin Android)

家住魔仙堡 提交于 2021-01-29 09:11:14
问题 This question is related to my previous question. Now, the method SendNofitication is added. I have two activities: [Activity(Label = "@string/app_name", Theme = "@style/AppTheme", MainLauncher = true)] public class MainActivity : AppCompatActivity { DateTime time = DateTime.Now; void SendNofitication(string title, string text) { TaskStackBuilder stack_builder = TaskStackBuilder.Create(this); stack_builder.AddParentStack(Java.Lang.Class.FromType(typeof(Activity2))); Intent intent = new Intent

How to create and implement a Android CustomOverlay for ZXing Scanner?

有些话、适合烂在心里 提交于 2021-01-29 08:53:29
问题 I'm using ZXing barcode scanner plugin for my Xamarin.Forms project. According to some posts, I need to use custom overlay for ZXing scanner in order to have cancel button. But I'm not familiar with Android development in a Xamarin.Forms project. So far, I know a scanner (MobileBarcodeScanner of ZXing plugin) accept an Android.Views.View as an overlay to replace the default scanning page view. public async Task<string> ScanAsync() { MobileBarcodeScanner scanner = new MobileBarcodeScanner();

How to nest Tab views in Xamarin.Forms

空扰寡人 提交于 2021-01-29 08:43:45
问题 I am trying to create this layout in Xamarin XAML but I cannot figure out how to combine TabView within a TabView. I want 3 main tabs in the bottom and for each page 1-2 subtabs. On each subtab I will need to have a ScrollView(I think thats the right element to use) with list items, which makes it even more complex. Like this picture: Any idea or guidance of how to achieve this? 回答1: I am trying to create this layout in Xamarin XAML but I cannot figure out how to combine TabView within a

Why is TinyIoC not picked up in my Xamarin.Android project when added using nuget?

拥有回忆 提交于 2021-01-29 08:35:56
问题 So I installed TinyIoC v1.3.0 using nuget in my Xamarin.Android project, its in the references, but I cannot type using TinyIoC; without a compile error. I would like to understand why this is? PS. I know I can use the TinyIoC.cs file directly, but I thought it would be more convenient to update if I added using nuget. I get this error: 回答1: I think the issue is related to the nuget package TinyIoC 1.3.0 itself. The nuget package does not contain the lib folder with the related dll so that

Local notification not triggering in Android 10

拈花ヽ惹草 提交于 2021-01-29 08:31:33
问题 I am working on xamarin.forms app and I am setting local notification using alarm manager. It is triggering fine on android version 8 and 9 but somehow it's not triggering in Android 10 . In android device logs for Android 10 , I got 07-22 15:00:06.612 Samsung SM-M205F Verbose 4185 SamsungAlarmManager Sending to uid : 10244 action=null alarm=Alarm{a757a70 type 0 when 1595410200000 com.MyApp.andr.connect} 07-22 15:00:06.613 Samsung SM-M205F Warning 4185 BroadcastQueue Unable to launch app com