Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all 77050 articles
Browse latest View live

AutomationID Showing inconsistently

$
0
0

I have had this problem for some time. If I add AutomationID to, e.g., 5 controls on a page, and then run app.Repl(), I see one or two of the controls with their AutomationID but most without. Have you seen this, and do you have a solution or workaround?

Thanks!


Using Slider with audio

$
0
0

I need an example to change the position of the audio, but using the slider control?

Xamarin Android:

$
0
0

Hi,

We are using Xamarin forms to develop our application. For xamarin Android (apk) application some security audit happen & they have found some security issue in our application. "Found elf built without Stack Protection" for this some solutions are there in Java. But i'm not able to find any equivalent solution in Xamarin forms or in Xamarin Android. Can any one help me out in fixing this issue.

Regards,
Thejesh.

Is possible to avoid slow startup time of xf app on Android in this way?

$
0
0

I made a big xamarin form app for ios and android, all is working great, but on Android app take till 8 seconds to starts.
I already try to use XAML Compilation and AOT...the AOT gain 2seconds, but it double the size of my apk, so is not a solution for my needs.

My question:
If I try to:
- rewrote only the first page in xamarin android
- start the app in native way
- while first view is shown, init the xamarin form engine (using callback, timers or in other async way) and after the init use only xf page
the startup time for my xamarin android app should be better?

Thanks for answer
Matteo

Xamarin form - Firebase notification with image

$
0
0

i want to send notification from firebase console with image, i have successfully implement in my xamarin form i can get device token and can send notification to device from firebase console, but the problem is that i want to send notification with image and i dont know how i can do that, as in firebase console there is no option to select image or write url, so it must be something from xamarin form where we recieve notification. Please check the image below how i want to recieve notification.

notification with image

How to set svg Image as background in Xamarin Froms

$
0
0

Hey everyone.
I want to set a svg image as the background of my differnet pages. How can I set the image to automatically scale to the screen size?
I hope that someone can help me!

Custom fonts and FontAttributes: how to apply Italic or Bold?

$
0
0

I work on a Xamarin.Forms project where I added 2 Google fonts: Montserrat and RobotoCondensed.

I can use these fonts without any problem in my app, with Labels or Buttons, on iOS and Android.

But when I try to apply a FontAttributes like Italic or Bold, this doesn't work.

I've first only added the "main" font ("Montserrat-Regular" and "RobotoCondensed-Regular"). Then I've added "secondary" fonts ("Italic", "Bold", "BoldItalic") but this doesn't change anything.

Is there something I'm doing wrong?

How to change Title font for Navigation bar ?

$
0
0

Can't find place where to change font for Navigation page title.
Is there ability to do it ?


How do I change the text lineheight?

$
0
0

Hi guys,

Im trying to change the lineheight of a label but I cou;dn't figure it out. Can somebody help me out?

how to print a pdf without view ?

$
0
0

Hello,

it's possible print a pdf without view in xamarin forms?
(no bluetooth)

Thanks for help.

How to change Pin position on location changed event

$
0
0

I am developing an app to track users live location.I have the updated positions from geolocator plugin.when i get new positions i change the pin position.But it is not changing in the map.Here is the code,
this method is called in every 1 sec
private async void TrackMe()
{
var current = await CrossGeolocator.Current.GetPositionAsync();
current.Accuracy = 30;
float bearing =float .Parse ( current.Heading.ToString ());
var pins = new Pin { Label = "ME", Icon = BitmapDescriptorFactory.FromBundle("path4646.png"), Flat = true };
var latitude = current.Latitude;
var longitude = current.Longitude;
Device.BeginInvokeOnMainThread(() =>
{
pins.Position = new Position(latitude, longitude);
pins.Rotation = bearing;
if (MapTrack.Pins.Count == 0)
{
MapTrack.Pins.Add(pins);
}
MapTrack.MoveCamera(CameraUpdateFactory.NewPosition(new Position(latitude, longitude)));
});
}

Any help will appreciated, thanks in advance
Regards

Java.Lang.IllegalStateException: Error using newLatLngBounds(LatLngBounds, int): Map size can't be 0

$
0
0

com.google.maps.api.android.lib6.common.apiexception.c: Error using newLatLngBounds(LatLngBounds, int): Map size can't be 0. Most likely, layout has not yet occured for the map view. Either wait until layout has occurred or use newLatLngBounds(LatLngBounds, int, int, int) which allows you to specify the map's dimensions.

Hii, I want to execute only mock database not "main", when i am running unit tests

$
0
0

Can i execute only mock database when i am running the unit tests

Navigation.PushAync() method issue on Lollipop devices in Xamarin.Forms ?

$
0
0

Hi everyone,
I am facing some issues in my Xamarin.Forms application with Navigation.PushAsync()
method but only on android lollipop devices. The app perfectly works on pre lollipop
and post lollipop devices and on all ios devices.
Here are the different scenarios of my application.
-I have a signUp page with two Entry(Email,Password) and when i navigate to this page from from my SignIn page
using await Navigate.PushAsync(new SignInPage()). The page successfully loaded and also has back button option on navigation bar but all the page functionalities got stuck, Entry don't show the text while typing from keyboard.
-In the same way i have another page with ListView but the page got stuck on loading and similarly an other page with Webview and it also got stuck when i navigate only the back button works.
-If i use Navigation.PushModelAync(), then it works fine on all devices including lollipop but its not my requirement. Navigation.PushAync() should also work on lollipop , i don't know why its behaving like :( Please help me out to get rid of this issue.
Thanks in advance

Is nested navigation in the Master view of a MasterDetail possible?

$
0
0

I am trying to create an Android tablet and phone app with a side pane on the tablet version with full hierarchical navigation. It should be a menu with sub-menus, and selecting a child in the sub menu sends a page to the Detail view. The phone version should have this menu and it's children as the full screen, and the detail screen becomes the full screen.

I am aware that ListViews can be embedded in a Master view, and that grouping is available. However I'm hoping to have a fully hierarchical navigation like you might find in, say, a settings module of an app, but in the master side of a Master Detail.

Is a Master Detail the right way to go about this? If not, I think I'm going to have use the ListView with navigation on the first 3rd of the screen in tablet mode, and just have this view fill the entire screen on the mobile version. My biggest concern is handling the navigation stack.

I have tried Googling my requirement but so far haven't found anything quite like what I'm trying to do.

I would be grateful for anyone's experience of a similar problem. A code sample would be even better.


How to keep copy-paste and scroll for editor inside scrollview (Xamarin Forms for Android)?

$
0
0

Hi everyone,

I am struggling with Editor for Android, using Xamarin.Forms v3.1.0.697729. If I test with editor as single item inside a stack layout (without scrollview), it is possible to both do a copy and paste of the text, and scroll. After adding scrollview, the scroll inside editor stops working, but copy-paste still works. To fix that, I implemented a custom renderer for Android with DroidTouchListener, as suggested in topic "Editor inside Scrollview not scrolling" from this forum. Now scrolling is working, and long-press to paste is working, but not long-press to copy text. So it seems that I have to choose between having fully functional copy-paste, or to have only paste but with functional scroll.

Does anyone have a workaround for this issue?

Dynamic value change and showed in UI, but can't use the property in formatted string format.

$
0
0

I have created a page where I am showing the api fetched data without refreshing the page by implementing the inotifypropertychanged.
When I am using property _bookQuantity its working fine.
But when I am binding the value of property with formatted string, it's not working, means the data is not changing dynamically.
I want to use formatted string for proper format of data showing in the UI.
Any suggestion?

I am attaching the code here:

    public double BookQuantity { get; set; }
    public double _bookQuantity  //This is showing data and changing dynamically. Working fine.
    {
        get{return BookQuantity; }
        set
        {
            BookQuantity = value;
            OnPropertyChanged();}
        }
    public event PropertyChangedEventHandler PropertyChanged;
    protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
    {
        PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
    }

    public FormattedString FormattedBookQuantity   // This is showing data at initial time, but not changing dynamically.
    {
        get
        {
            FormattedString fs = new FormattedString();
            fs.Spans.Add(StyleClass.GetListLabelNoBold("Book Quantity "));
            fs.Spans.Add(StyleClass.GetListLabelNoBold(_bookQuantity.ToString()));
            return fs;
        }
    }  

Popup windows within a webview?

$
0
0

Does anyone know what kind of support there is for popup windows in webview? We are opening some intranet links within a webview and a new package we have is using javascript to open up it's own styled window to show some elearning courses. Everything looks fine if we open in a native mobile browser but webview isn't handling these very well.

Any help would be appreciated.

Dynamic ListView with TextCells

$
0
0

Hey,

I'd like to to create a ListView with a dynamic amount of items (TextCells) in it. Sometimes the ListView needs to contain 5 TextCells, sometimes it needs to contain more, ... How can I achieve that? Creating a ListView is fairly simple, but I am not sure how to add a TextCell to it.

Cheers!

Launchscreen imageview is not in center position on IOS

$
0
0

Hi,

I tried to make the launchscreen, following the microsoft link, but it's a total nightmare. When I change simulator device then the full image change it's position from central to the side.
In the Viewing of the designer I use IPhone 8 Plus, set the image etc. Then I change to IPhone SE and then the whole image move to the left. What do i'm doing wrongly?
Many thanks in advance!

Viewing all 77050 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>