I could not disable highlight item. I tried to use this code (I took it from forum):
listView.ItemTapped += (object sender, ItemTappedEventArgs e) => { if (e.Item == null) return; ((ListView)sender).SelectedItem = null; // de-select the row };
But if I click in the item then I can see blue highlight that will disabled after some time.
How I can disable highlight item in ListView?
Images on top of background images are not selectable in Android Talk back accessibility mode
I have a page with an image set as a background. On this page I have images with tap gesture recognizers resting on top of the background image.
On Android in accessibility mode when ever I try to select these images instead of the images gaining talk back focus the background image gains focus.
I've tried having the talk back service ignore the background image by writing a custom renderer for the background image an setting
Control.ImportantForAccessibility = ImportantForAccessibility.No;
but that doesn't seem to change the behavior of talk back at all. Is there a way to access the talk back service directly from a custom renderer so that I can either manually turn it off for the UI element or at least capture the event where talk back gives the background image focus?
Localization not working on iOS
I am using plugin.multilingual, and I have the translate extension in my shared project (.NET Standard)
It is working fine on Android, but on iPhone it only displays English, which is my default.
I have:
TranslateExtension.cs
AppResources.resx
AppResrouces.dk.resx
On Android, I change my phone's language to Danish, and the app shows danish text. But on iOS it doesn't. It continues to show English.
I have added english and danish to info.plist:
My translate extension:
`using System;
using System.ComponentModel;
using System.Reflection;
using System.Resources;
using Plugin.Multilingual;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace myApp.Helpers
{
[ContentProperty("Text")]
public class TranslateExtension : IMarkupExtension
{
const string ResourceId = "myApp.ResX.AppResources";
static readonly Lazy<ResourceManager> resmgr = new Lazy<ResourceManager>(() => new ResourceManager(ResourceId, typeof(TranslateExtension).GetTypeInfo().Assembly));
public string Text { get; set; }
public object ProvideValue(IServiceProvider serviceProvider)
{
if (Text == null)
return "";
var ci = CrossMultilingual.Current.CurrentCultureInfo;
var translation = resmgr.Value.GetString(Text, ci);
if (translation == null)
{
if DEBUG
throw new ArgumentException(
String.Format("Key '{0}' was not found in resources '{1}' for culture '{2}'.", Text, ResourceId, ci.Name),
"Text");
else
translation = Text; // returns the key, which GETS DISPLAYED TO THE USER
endif
}
return translation;
}
}
}`
Is it possible to share and install the app on other device using APK file generated in debug mode?
I am new to Xamarin development and developing an app in Xamarin.forms using Visual Studio 2017 on Mac. I am testing my app using USB-Debugging/Genymotion on devices and also getting generated APK file at location: XYZ.Android/bin/debug/com.XYZ.XYZ-Signed.apk
The app crashes when I am trying to install it on other devices using the generated APK file at the above-mentioned location right after the Splash screen disappears?
In error reporting I am getting the error: "Unable to find application mono.android.platform.api level 27 or xamarin.android.platform" on Mi5a device
I have tried the solutions at URLs:
https://stackoverflow.com/questions/42243195/unable-to-find-application-mono-android-platform-apilevel-24-or-xamarin-android
https://stackoverflow.com/questions/37063507/unable-to-find-application-mono-android-platform-apilevel-23-or-xamarin-android?rq=1
https://stackoverflow.com/questions/48781713/xamarin-android-app-crashing?rq=1
So is it possible to share and install the app on other device using APK file generated in debug mode OR I need to create APK file in the release mode?
code: https://www.dropbox.com/s/525zce3ysoi56j6/FlashControl.zip?dl=0
Please Assist me for the right settings.
Thanks in advance.
How to change navigation bar background color for each content page?
I want to change xamarin forms app content page's navigation bar background color for each page instead of common color, has any plugin or default feature how can I change it?
I need to change for each page separately to match with content page's body.
HTTP OPTIONS in Xamarin Forms
How to send a HTTP OPTIONS method request to communicate with web via API call. In Postman it's working fine but I don't how to call it from xamarin as OPTIONS are not available. Please help me out.
How to hide backbutton from particular page,
I tried NavigationPage.SetHasBackButton(this, false);
But it is not working. can any one help to solve .
Service Stop and Restart Alone
Well Before than nothing i want say that I don't speak English very well, sorry if I write anything wrong..
Well My problem is the next, i am working with a services, want a timer that count the time that my app is working, I created a Service of this form:
And this is the task that i want to do:
when i run the app the service execute correctly, and the process too, and if I close the app all continue working fine.
Past a few time how 40 seconds or less with the app closed the process stopped. The Service continue but the process not.
In knows that the problem is with this:
But with 'ContinuationMask' is the unique form that i can get the process executing, With NotSticky, RedeliverIntent, Sticky or StickyCompatibility, I can't get the object of the process executting in the Service.
I Don't know what to do..
Text Field: freezing on focus
I have this problem on galaxy s8: when User focus on text field my app get freezed for 1min
Any idea?
Using a WCF service in Xamarin.Forms
Hello, I have a WCF Service that works fine in Xamarin.Android but does not work on Android when using Xamarin.Forms. It works on UWP but not on Android. I initialize it like this: Service.ServiceClient client = new Service.ServiceClient();
.
Am I doing it wrong?
How can I parse an XML file in Xamarin.Forms ???
I want to parse an xml file and put the data in sqlite database.
I've copied the XML file in portable as well as android folder.
Build action is "Embeded resource" for "portable" & "android resource" for "android"
No errors while building,but while debugging the app, it fails with no errors.
Local Wireless/Bluetooth network
hi.i want to make an app that can connect to the same app on other phones Locally through wireless.
what i mean is that we have like 4 phone.#1 #2 #3 #4.phone #1 starts a Wireless Network so that #2 #3 #4 can join that network and #1 can send a simple string to the other to show them in their app.
is it possible with Xamarin Forms?and if yes how to go forward?
p.s: i know common network things like how gateway works, how subnet works and things like this.
MasterDetailPage can not back
Hi all
I create a MasterDetailPage and insert a button on Master. When I click on button go to MySosRequests.
But in MySosRequestswhen I click on back of android app close. There is no back arrow on top left of MySosRequestsfor backing.
Whats wrong?
<MasterDetailPage.Master>
<ContentPage Title="منو">
<StackLayout Orientation="Vertical">
<Button HorizontalOptions="Center" Text="درخواست های من" Command="{Binding GoToMySosRequests}" />
</StackLayout>
</ContentPage>
</MasterDetailPage.Master>
<MasterDetailPage.Detail Title="">
<NavigationPage>
<x:Arguments>
<pages:MainView />
</x:Arguments>
</NavigationPage>
</MasterDetailPage.Detail>
using Bit.ViewModel;
using Prism.Navigation;
namespace Sanaap.App.ViewModels
{
public class MenuViewModel : BitViewModelBase
{
public BitDelegateCommand GoToMySosRequests { get; set; }
public MenuViewModel(INavigationService navigationService)
{
GoToMySosRequests = new BitDelegateCommand(async () =>
{
await navigationService.NavigateAsync("MySosRequests");
});
}
}
}
show a pin on center of map and get its location
Hi all
I made an app for home cleaner request.
when map opens , user see his location on map and every thing is ok.
Now I want show a pin on center of map and user can change map position manually and I get its location(pin on center of map) .
How can I do that? Please get code for that if you made this before. Thanks
(my c# code is in ViewModel)
Create Button.Clicked in a loop
Hello!
I wanted to make buttons in layout, based on number of lines in file. Everything, but click event, works fine.
How to make it in this case?
for (some values) {
//button making
//button event
}
Button.Clicked += (sender, e) =>
{
//do sth
}
doesn't work
Feel free to ask if my description is unclear
Opening .xaml and .xaml.cs files from outside the app
Hello!
Is there any way to open such file the same way as scripts inside the app?
My app creates number of buttons, each of them for one .xaml file in directory. When clicking them, the script must be executed inside app just like the ones you publish the app with.
As always, ask me for details if my description is unclear
iPhone X, iOS 11 - Tabbar Background
Hi Xamarin-Community,
I have some questions about iOS 11 on the iPhone X. Particularly about the Tabbar.
How can I change the Tabbar background image, text color, image position like in iOS 10?
It seems that the functions TabBar.BackgroundImage
, UITabBarItem.ImageInsets
or UITabBarItem.TitlePositionAdjustment
has no effect (iOS; Custom TabbedRenderer).
Do anyone have an idea how to solve my problem?
System.Runtime.Remoting.. problem
How shall System.Runtime.Remoting be used with Xamarin.Forms and VS2017? It cannot be referenced with the said combination. I am most grateful with an explation over the usage of remoting.
Best regards GoranA
Can't enter text in Xamarin forms for macOS target
I'm developing for the first time a Xamarin Forms application for a macOS target and I'm struggling with the Entry/Editor controls.
In my app, I need the user to enter text but at runtime, I'm unable to type any character in it.
When I launch the same App on a iOS target (Here an IPad), the soft keyboard is displayed when the control is selected and I can enter text.
I don't see anything about this issue on the forum. Thanks for your help !
Android Custom Frame Renderer Help
Hello Community,
I created a custom FRAME renderer that creates a gradient background. It works for iOS however in Android the gradient works but none of the child controls inside the frame display. Can someone tell me what I am doing wrong that causes the child controls to not display?
`
protected override void OnElementChanged( ElementChangedEventArgs<Frame> e )
{
base.OnElementChanged( e );
if( e.OldElement != null || Element == null )
return;
Background = GetGradientDrawable();
}
private GradientDrawable GetGradientDrawable()
{
Xamarin.Forms.Color[] gradientColors = new Xamarin.Forms.Color[ 2 ];
gradientColors[ 0 ] = Card.StartColor;
gradientColors[ 1 ] = Card.EndColor;
int[] androidColors = new int[ gradientColors.Length ];
for( int i = 0; i < gradientColors.Length; i++ )
{
Xamarin.Forms.Color temp = gradientColors[ i ];
androidColors[ i ] = temp.ToAndroid();
}
GradientDrawable gradient = new GradientDrawable( GradientDrawable.Orientation.LeftRight, androidColors );
gradient.SetCornerRadii( new float[] { Element.CornerRadius, Element.CornerRadius, Element.CornerRadius, Element.CornerRadius,
Element.CornerRadius, Element.CornerRadius, Element.CornerRadius, Element.CornerRadius } );
return gradient;
}
`
Thank you in advance for the help.
Chris