xamarin.android

How to open another xamarin forms page form a item-click in a list view

故事扮演 提交于 2021-02-08 07:51:26
问题 Hello I have a List View that I made in Xamarin forms and all I want it to do is when the user clicks a option in the List View it take them to another Xamarin forms page in my case it would be ContactInfo heres my xaml: <?xml version="1.0" encoding="UTF-8"?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="WebSearch.CountySelect" Title="ReadyMo"> <StackLayout Padding="0,20,0,0"> <Label Text="ReadyMo" FontAttributes=

How to open another xamarin forms page form a item-click in a list view

你离开我真会死。 提交于 2021-02-08 07:51:25
问题 Hello I have a List View that I made in Xamarin forms and all I want it to do is when the user clicks a option in the List View it take them to another Xamarin forms page in my case it would be ContactInfo heres my xaml: <?xml version="1.0" encoding="UTF-8"?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="WebSearch.CountySelect" Title="ReadyMo"> <StackLayout Padding="0,20,0,0"> <Label Text="ReadyMo" FontAttributes=

Authentication Error e.Message = OAuth Error = Permissions+error

故事扮演 提交于 2021-02-08 05:44:24
问题 I'm using Xamarin.Auth version 1.5.0.3 in my xamarin.android and xamarin.ios (PCL) project for application authentication/login with facebook's OAuth API. The issue arises after I click on the "Not now" link (watch the screenshot below). I get the following error dialog: Authentication Error e.Message = OAuth Error = Permissions+error Is there any way to disable this link or to fix it somehow? Or does someone have an idea why this happens? iOS code (which works now): public override void

Xamarin forms open view model on notification tap

若如初见. 提交于 2021-02-08 05:38:15
问题 I am using this code to show notification in notification bar. When the notification is tapped, main activity is launched. Is it possible to launch the view model instead of activity in Xamarin forms app with MvvmCross. Intent notificationIntent = new Intent(context,typeof(MainActivity)); notificationIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); PendingIntent pIntent = PendingIntent.getActivity(context, code, notificationIntent, PendingIntent.FLAG_UPDATE

Is it possible to access external storage in platform-independent code in Xamarin.Forms?

风流意气都作罢 提交于 2021-02-08 03:33:05
问题 I'm mainly developing for Android, so I know one can access the external storage of an Android device in Xamarin.Forms using Android.Content.Context.GetExternalFilesDir . I know its possible to access the internal storage platform-independently using Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) , but is it also possible to do the same for external storage? I know the use case might be prettty limited, as iOS doesn't allow any non-jailbreaked access to the file

How to get a color from the current theme programmatically in Android (Xamarin)

末鹿安然 提交于 2021-02-08 03:27:05
问题 I need to get some default theme color values programmatically (e.g. windowBackground, colorPrimary). I'm executing the code from an Activity. My target android API is 21 . I'm using a Theme.Material theme . I've tried: var attributeValue = new Android.Util.TypedValue(); this.Theme.ResolveAttribute(Resource.Attribute.colorPrimary, attributeValue, true) with different resource identifier, but i always get a Android.Util.DataType.Null value. 回答1: Use this code I have tested For WindowBackground

How to get a color from the current theme programmatically in Android (Xamarin)

对着背影说爱祢 提交于 2021-02-08 03:26:17
问题 I need to get some default theme color values programmatically (e.g. windowBackground, colorPrimary). I'm executing the code from an Activity. My target android API is 21 . I'm using a Theme.Material theme . I've tried: var attributeValue = new Android.Util.TypedValue(); this.Theme.ResolveAttribute(Resource.Attribute.colorPrimary, attributeValue, true) with different resource identifier, but i always get a Android.Util.DataType.Null value. 回答1: Use this code I have tested For WindowBackground

isPowerSaveMode() always returns false for Huawei devices

∥☆過路亽.° 提交于 2021-02-07 05:18:18
问题 I am currently implement a feature where the users are requested to ignore battery optimisation for the application. The reason for doing so, is that the main functionality of the application is unfortunately drastically affected by power save mode. To achieve my goal, I prompt the users by creating an Intent and setting the Action to ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS. Although, before firing the Intent , I both check for isPowerSaveMode() and isIgnoringBatteryOptimizations() to

isPowerSaveMode() always returns false for Huawei devices

点点圈 提交于 2021-02-07 05:16:54
问题 I am currently implement a feature where the users are requested to ignore battery optimisation for the application. The reason for doing so, is that the main functionality of the application is unfortunately drastically affected by power save mode. To achieve my goal, I prompt the users by creating an Intent and setting the Action to ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS. Although, before firing the Intent , I both check for isPowerSaveMode() and isIgnoringBatteryOptimizations() to

Xamarin Forms CollectionView Custom Layout Design

末鹿安然 提交于 2021-02-05 11:44:26
问题 In the app that I'm designing, I use collectionview to show loads of images. And this is my current design. And this is the design I want. where the images that are shorter in height will have the next image fill up the white spaces. Heres my code: <CollectionView x:Name="cv_WallPapers" ItemsSource="{Binding Results, Mode=TwoWay}" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" SelectionMode="Single" SelectionChanged="cv