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

How to get rid of persistent loading icon in iOS WkWebView?

$
0
0

https://github.com/xamarin/Xamarin.Forms/blob/master/Xamarin.Forms.Platform.iOS/Renderers/WkWebViewRenderer.cs

Using this code I created a WkWebViewRenderer for my project, hoping to fix the bug that's causing a loading icon to stay on my page forever, even though it seems like my page has finished loading. I can type in values, scroll through the page, etc. but the loading icon is still there.

It looks like this:

What do I need to do to get rid of the icon/if it's actually continuously loading forever, what can I do to fix that?

I have heard of some people online saying it's an issue with the webview trying to detect phone numbers or something like that??

Thanks


CollectionView inside Stacklayout doesn't fill page

$
0
0

I have an app that has a page with a CollectionView and a small StackLayout which are both inside a StackLayout which is the root of the content page. It all worked last Friday. Visual Studio for Mac might have upgraded itself alone with Xamarin.iOS.

On Monday, the CollectionView no longer filled the Stacklayout. I was going to create a simple sample project to show the problem; but then decided to just try modifying the Xanimals source.

I changed BearsPage.xaml from this...

to this...



After the change, the CollectionView is cut off and this page looks like this...

Prompt user to change battery optimization settings - Android

$
0
0

Hi,
I am looking for some solution for disabling battery optimization setting for my application.
When user install app first time and Battery optimization is enable, App should prompt custom popup (Popup text based on user language), and after clicking on button, It should navigate to setting page, there user can disable battery optimization.
Same setting app should save, And should not ask again and again.

Resume on Android breaks page layout

$
0
0

I am creating an app that revolves around launching a different app, then eventually returning to my app.
The issue I'm having is after the 2nd or 3rd resume, the layout of the page breaks (somehow) and I am left with buttons that don't work and an ugly page.
The first time the user resumes the app it seems to work fine.

This is what the page looks like (this is after the first resume):

And here's what it looks like after 2 or 3 resumes:

I've verified that OnResume gets called in the main page, and I've tried using InvalidateMeasure with no success (doing a hot-reload while connected to the debugger fixes the problem)

For the stack, I'm using a NavigationPage layout and this is the second or third page in. The "popup" is simply a grid that overlays the entire screen with a black background and opacity of 0.8, and then another grid with a white background inside, both horizontal and vertical options are "Center", but no sizing calculations or constraints. Inside that grid is a StackLayout that has the rest of the content in it

I also don't want to specify the size of the background, as it could be a different size image and can look different on different devices/orientations.

Context Menus via long-press/right-click feature request

Will be any problem if I use a Xiaomi's smartphone to develope Xamarin Forms Apps?

$
0
0

I mean, right now I'm using my motorola g5 plus to test my apps. I want to buy a Xiaomi's smartphone but a know they use a.. "Miui" as firmware, What is that? I will have some different problem working with that type of phones insted using a motorola, samsung, etc... ? Or I just will work fine as the otheres and have the same problems in all of them?

My future buy is on your hands :)

Xamarin ios white screen after press login button

$
0
0

I am using Visual studio 2017 and 2019. I am getting white screen after press login button in tablet ios. Only tablet have this issue.

Xamarin forms: Gif image is not working with FFimageloading in UWP

$
0
0

I am using FFImageLoading for playing a gif file in my project. It is working fine on android and ios but not working in UWP.

I have added the following NuGet packages to every project in my solution.

  1. Xamarin.FFImageLoading.

  2. Xamarin.FFImageLoading.Forms.

  3. Xamarin.FFImageLoading.Transformations.

  4. Xamarin.FFImageLoading.Svg.

  5. Xamarin.FFImageLoading.Svg.Forms.

Added the following code on UWP MainPage.xaml.cs:

FFImageLoading.Forms.Platform.CachedImageRenderer.Init();

In XAML:

xmlns:ffimageloading="clr-namespace:FFImageLoading.Svg.Forms;assembly=FFImageLoading.Svg.Forms"

<ffimageloading:SvgCachedImage 
    HorizontalOptions="CenterAndExpand" 
    x:Name="GifImage" 
    Grid.Row="0"
    VerticalOptions="CenterAndExpand"
    WidthRequest="200"
    HeightRequest="200"
    Source="ic_dove_loading_xx.gif"/>

Gif is not playing in the UWP app. Are there any additional settings in the windows part for UWP?


Power BI integration in Xamarin

$
0
0

Hi Team,

I integarated POWERBI with Xamarin using below link.

But it not showing in Mobile View layout, Can anyone suggest how to implement PowerBI reports to view in Xamarin in mobile layout. And how to add the POWERBI javascript file into the Xamarin and call that to display as mobile layout.

Thanks

Editor inside Scrollview not scrolling.

$
0
0

I have an editor control inside a StackLayout which is inside a ScrollView. I can scroll all the controls but when I go into an editor control if the text superpasses the editor's height I cannot scroll into the previously added text. So if the line goes out of the visible part of the editor I cannot go back to it, the only way is to erase the whole text and write something up again. So basically trying to scroll inside the editor results in scrolling out the controls inside the scrollview but I just want to scroll inside the editor. By the way editors are added to the stacklayout dynamically.

<ScrollView>
                <StackLayout x:Name="content" Orientation="Vertical"></StackLayout>
            </ScrollView>

Any suggestions?

Thank you.

I want to display OSM or GSI Tiles in Xamarin using Leaflet

$
0
0

Hello!
Right now I'm using Leaflet to view OSM or GSI Tiles, but I can't move my location or add pins.

  • Is this method wrong?
  • If possible, the map is displayed even when offline.

double Lat = Convert.ToDouble(LatitudeLabel.Text);
double Lot = Convert.ToDouble(LogitudeLabel.Text);

var html = new HtmlWebViewSource
{ 
Html = @"<html>
     <head>
    <meta charset= ""UTF-8"">
    <link rel = ""stylesheet"" href = ""https://unpkg.com/leaflet@1.3.0/dist/leaflet.css""/>
    <script src = ""https://unpkg.com/leaflet@1.3.0/dist/leaflet.js""></script>
    <script>
    function init(){
                    var map = L.map('mapcontainer',{ zoomControl:false});
                    var mpoint = [" + Lat + "," + Lot + "];" +
                    "map.setView(mpoint, 15);" +
                    "L.tileLayer('https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png', {" +
                    "attribution: \"<a href='https://maps.gsi.go.jp/development/ichiran.html' target='_blank'>地理院タイル</a>\"" +
                    "}).addTo(map);" +
                    //"var popup1 = L.popup().setContent(\"現在地\");" +
                    //"L.marker([" + Lat + "," + Lot + "]).bindPopup(popup1).bindTooltip(\"現在地\").addTo(map);" + 
                    "L.marker(mpoint,{title:\"現在地\",draggable:true}).addTo(map);" +
    "}" +
    "</script>" +
    "</head>" +
    "<body onload = \"init()\" >" +
    "<div id=\"mapcontainer\" style=\"width: " + ScreenDimensions.Width + "px; height:" + ScreenDimensions.Height + "px\"></div>" +
    "</body>" +
    "</html>",

};
var webView = new WebView
{
Source = html // <-3
};

webView.Reload();

Padding = new Thickness(-10, -10, 0, 0);
Content = webView;

How to achieve Geofencing in xamarin forms?

$
0
0

Hi Everyone,
I need to achieve the Geofencing functionality for my app. Suppose there will be a certain location and a user is moving to that location. When the user is out of that particular location it will send a reminder or something else. I have gone through some sample projects- https://github.com/rdelrosario/xamarin-plugins/tree/master/Geofence
in this project there are some plugins which are deprecates from Nuget.
https://allancritchie.net/posts/introducingshiny
The sample is not working.

I didn't get any exact information. Can someone please help me out regarding this?

help

Can't see saved data

$
0
0

Hi,

I am building xamarin forms sample app.
I am using SQLite.Net-Pcl pakage to perform CURD operations, the path to save data is defined as following
_dbPath = System.Environment.GetFolderPath (Environment.SpecialFolder.Personal);

I kept brake point and the path it pointing is like this
/data/data/com.companyname.sqliteexppractice/files

It is woking fine i am able to perform CURD operations.

But, i could not browse to the folder and see the data. I want open and see data.
I heard a software which allowing windows phone developers to see files like this using "IsoStoreSpy" software.

Is there any such software or way to see stored data file in xamarin forms.

Any suggestions greatly appreciated.

Thank you,
Mahesh.

A photo which is taken from iOS camera rotating 90 degree on android

$
0
0

Hello, I have Xamarin.Forms application and using FFIMAGELOADING for photos. Photo which is taken from iphone camera rotation 90 degree to left on android phones. Anyone knows the solution? Someone sent a dependency service code but it didn't work well.

How to remove ripple effect from Collection view?

$
0
0

I have a collection view in my Xamarin forms project. in iOS it is working fine But in Android I am getting a ripple effect when I select item from collection view. How can I remove this ripple effect from android. Please help.


Mono errors when connecting to an API

$
0
0

I am connecting to an API from my Xamarin Forms app to get data. I am seeing a lot of errors in the form:-

ObjectDisposedException
Cannot access a disposed object.
Object name: 'SslStream'.

and

ObjectDisposedException
Cannot access a disposed object.
Object name: 'MobileAuthenticatedStream'.

A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (Cannot access a disposed object.
Object name: 'MobileAuthenticatedStream'.)

Does anyone have experience of what could be causing this issue?

Passing data in xaml

$
0
0

hi everyone,

I've got trouble to pass data in xaml. I would like to initialize a component named PDebugListPage passing a list of business items :

ListeLogs is a List declared in the ViewModel. The constructor of PDebugListPage is :

I don't know how to "bind" the ListeLogs between my xaml and my viewmodel.

Thanks for your answer !

Adrien.

httpclient not working for https service

$
0
0
when i use http service it works
and when i try to use https that time httpclient always give 200 status .. please help

How to implement infinite scrolling in collection view ?

Files required for app gets deleted from LocalStorage on popping a navigation page

$
0
0

Hi,

I am working on an app which uses "WKWebview"(ios customrenderer) to play embedded YouTube videos.
It has two navigation pages Page-1 and Page-2.
Page-1 is root page.

Page-1 contains : Wkwebview (To show advertisement video and this link always remains same) and ListView-1 (category links)
Page-2 contains : Wkwebview (To show videos) and ListView-2 (Actual video links)

It work like:

  1. I am using Same WkWebview CustomRendere for both Pages.

  2. Working on Simulator with ios version 12.0

  3. When i visit page-1 it loads advertisement video and populate category links in ListView-1 . (Here it automatically stores https_www.youtube.com_0.localstorage, https_www.youtube.com_0.localstorage-wal and https_www.youtube.com_0.localstorage-shm) in local storage.

  4. On clicking any item in ListView-1 it uses Navigation.PushAsync() to load Page-2 and shows corresponding Video links in ListView-2 and a video in Wkwebview corresponding to first video in ListView-2. And then we can choose any video and it displays quit well. (Here no we files are created in local storage, as they use existing files).

Problem:

  1. On clicking the Back button of Page-2 following Message appears three times. (For https_www.youtube.com_0.localstorage, https_www.youtube.com_0.localstorage-wal and https_www.youtube.com_0.localstorage-shm)

[logging] BUG IN CLIENT OF libsqlite3.dylib: database integrity compromised by API violation: vnode unlinked while in use: /Users/ZZZ/Library/Developer/CoreSimulator/Devices/5BA-702-44C-9B-4465FA982/data/Containers/Data/Application/A1F-B71-1FA-A-D43BA9C/Library/WebKit/com.companyname.ZZZ/WebsiteData/LocalStorage/https_www.youtube.com_0.localstorage

When i looked in LocalStorage the files were actually deleted.

This happens only once when we navigate from Page-1 to page-2 and back for first time, if we perform the same repeatedly no message appears (even though files are still getting deleted.)

What Should i do?

Viewing all 89864 articles
Browse latest View live


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