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

TabbedPage Text Issue in Android

$
0
0

Hello All,

I am facing one issue in TabbedPage **control in **Xamarin forms. Whatever, text I have given in TabbedPage, it appears automatically capitalized in Android.

Can you please tell to fix this issue?

Thanks,
Prashant


Comments & Reply Section

$
0
0

Hi all,
I am going to develop comments and reply section in my application. and need your expertise on following questions.
Is there any control in xamarin forms for comments and reply. or any control which we can modify to use if for comments and their replies? or only nested listview can be used for comments and reply?
Did any free or paid control available for this?
What's the best approach for this?

Backup Restore Data

$
0
0

I m going to develop simple application to store data on mobile , one of the requirements that i need to implement (from time to time) to backup this data and later to restore it on demands. so the requirement considered in 2 points:
1- Backup and restore this Data
2- ability to keep backup away from the mobile (to store it somewhere out of mobile)
i will use :
- Xamarin forms
- sqlite
- MVVM pattern.

any proper suggestions to cover these requirements?

Detecting tap on different controls inside a listview cell

$
0
0

Two questions:

In Xamarin.Forms, I have a listview. Each item is a ViewCell containing button, labels, images etc.

First, I want to detect tap on each item inside a ViewCell. Meaning tap on label, tap on image. All separately. How do I do this?

Secondly, how do I uniquely identify my labels/images inside each item so that I know exactly which label/image was tapped since a list view will have multiple items each having its own label/image.

Thanks.

Is it possible to get rid of system.xml.dll assembly?

$
0
0

It's one of the most massive assemblies and weights 1.4 MB. But I have no clue why it is included in an application. Is it possible to get rid of this assebly?

entry border should show red validation in UWP

$
0
0

I am trying to put a validation on entry field , The Validation is the entry border should show red when there is no value in it.

Package Xam.Plugin.Connectivity 3.2.0 is not compatible with netstandard2.0

$
0
0

I am trying to install Xam.Plugin.Connectivity in my Xamarin. Forms project which is targeting .NetStandard 2.0 Standard. But I am getting following error:

Error NU1202 Package Xam.Plugin.Connectivity 3.2.0 is not compatible with netstandard2.0 (.NETStandard,Version=v2.0). Package Xam.Plugin.Connectivity 3.2.0 does not support any target frameworks.

My Forms version is : 3.4.01008975

The weird thing is it was working fine until my Computer got rested (Without deleting any data except uninstalling recently installed applications) yesterday due to some issue. After that when I try to open my project I got so many errors related to different stuffs. But it was working fine before Reset.

how to use multicolored icons on tabbedPage

$
0
0

Hi all,
I just want to add an multicolored icon on my tabbedPage but my tabbedPage display the icon with one color
thanks for ur help


Master-Detail project template gives Android error

$
0
0

Open a new project: Master-Detail for Android and UWP, with no further additions.
For UWP no problems.
For Android the app starts with the Browse page. Click on the About menu results in a white screen with no further action.

how to write anything in Removable SD Card

$
0
0

I want to unzip .zip file in removable sd card. I am selecting .zip file using file picker. After selecting the file i get a path like this "content://com.android.externalstorage.documents/document/13E7-3B0A%3Azipfolder.zip" and after selecting the folder to unzip that file on selected location it gives some path like this "content://com.android.externalstorage.documents/tree/13E7-3B0A%3ALOST.DIR". After that i am using a method to unzip .zip file
System.IO.Compression.ZipFile.ExtractToDirectory("content://com.android.externalstorage.documents/document/13E7-3B0A%3Azipfolder.zip", "content://com.android.externalstorage.documents/tree/13E7-3B0A%3ALOST.DIR"); but it gives the error which is mentioned below:

Unhandled Exception:
System.UnauthorizedAccessException: Access to the path "/content:" is denied. occurred

I have also tried to give runtime but still i am getting same error. Please help me because i have given too much time on this

Problem with add view to RelativeLayout in loop

$
0
0

Good day!

I have some strange problem with code (I put only important lines here):

...
RelativeLayout r;
Image[] ims
...

{
r = FindByName("relforimages");
float width = 400f, height = 300f;
ims = new Image[2];

for (int i = 0; i < 2 ; i++) {
ims[i] = new Image {
Aspect = Aspect.AspectFit,
HorizontalOptions = LayoutOptions.Center,
VerticalOptions = LayoutOptions.Center
};
ims[i].Source = ImageSource.FromFile(localPathyn);
r.Children.Add(ims[i], ()=> new Rectangle(width * i * 0.1f,
height * i * 0.1f,
70f, 70f));
}

After this I see only last image in RelativeLayout. Even I increase count of images to 10 (for example) nothing happens - i see only LAST image

Question: is it possible (in xmarin) to use array element for add view to layout dynammically? if it's possible - what is mistake i do?

Azure app service - Running Xamarin project (Xamarin.Forms) with SQL Azure

$
0
0

Hello.
I’m trying to run the the Xamarin project downloaded from the Azure App Service (Deployment --> Quickstart --> Xamarin.forms).

When the app service is configured with sqllite, everything runs fine. I can see all the records inserted on Azure database, on the app service trough “Easy tables”, and I can get (read) all the records from Azure to the application (droid, ios and uwp)

When the app service is configured with a connection string to SQL Azure, I can’t do nothing (insert rows, get rows, etc), but, trough the Azure “Easy tables”, I can creat the table I need to run the projet (todoitem) – it means the connection is correct, I guess.

Connection String parameters:
NAME: MS_TableConnectionString
VALUE: Data Source=tcp: srvmyapp.database.windows.net,1433;Initial Catalog=DBmyapp;User ID=user@srvmyapp;Password=mypassword
TYPE: SQL Azure

Thank you for helping.

Handle Crash Gracefully

$
0
0

Hello Everyone,
I am trying to implement unhandled exception in Xamarin Form.
Something similar to this https://github.com/Ereza/CustomActivityOnCrash.
So when the app is about to crash display a nice message to inform the user that something went wrong.
Option to restart or send the crash report.

Get type API response

$
0
0

Hello Developers,

I am call get type api it's status code StatusCode: 200, ReasonPhrase: 'OK', Version: 1.1

But in this line i am getting text not json var Data = response.Content.ReadAsStringAsync().Result;

i Attach 3 image for show my issue

1. In image 1st getting text In coding.
2. In image 2nd api worked success i select text in postman then show text in response field that is show in coding.
3. In image 3rd i select Json in postman then show json in response field i need this json in coding.

XAML previewer Error

$
0
0

I have significant problems with xaml preview. In the different projects, the most varied errors. It only works in new projects with a few simple instructions. For example, I have these errors. Does anyone have any suggestions for me?


Gesture in ViewCell will not fire Completed in StatusType if vertically scrolled.

$
0
0

Hi all, I've applied a PanGesture/ SwipeGesture in a ViewCell, and I found that only the gesture is horizontal, else the Completed will never be triggered. I guess the parent listview maybe capturing the gesture when scrolling the listview vertically. Anyway to work around it? Thanks.

Update AbsoluteLayout bounds in parent Page from ContentView

$
0
0

Hi all,

I have a custom control name ButtonX (actually is a ContentView which contains few labels & image). This button is placed inside an AbsoluteLayout of MainPage. When user clicks on this button, I would like to update its position or size by using AbsoluteLayout.SetLayoutBounds method. But it doesn't work. Remember that, I update the bounds in ButtonX code, not in the MainPage code.

I have no idea how to do that, could you please help me to figure out the cause?

Thanks & best regards,

Font loading Issue

$
0
0

Hi,

I'm receiving the following error on Android and I'm unclear as to what to check : E/FontFamily(24205): Error mapping font file Fonts/Montserrat-Light.otf

I've verified that the font is an AndroidAsset, in the folder, and can be read using the following:
var font = Typeface.CreateFromAsset(Assets, "Fonts/Montserrat-Light.otf");

I think I might be doing something wrong in my App.Xaml:

<OnPlatform x:Key="FontLight" x:TypeArguments="x:String">
<On Platform="iOS" Value="Montserrat-Light" />
<On Platform="Android" Value="Fonts/Montserrat-Light.otf" />
</OnPlatform>

And the control I'd like to style:

<Style x:Key="TransparentEntry" TargetType="control:TransparentEntry">
<Setter Property="TextColor" Value="{StaticResource Purple}" />
<Setter Property="FontSize" Value="{StaticResource Small}" />
<Setter Property="FontFamily" Value="{StaticResource FontLight}" />
<Setter Property="BackgroundColor" Value="LightSkyBlue" />
</Style>

The behavior in the UI is that the carot is available but typing is blank. Any guidance would be appreciated.

Set dynamic height for multiple webviews in a view possible?

$
0
0

I use a customrenderer for webview, found in this forum , that reads out the height of the content and set the the webview height. The problem is, i have to use many webviews on one page, that are bind to HTML sources, so the height is all different and the customrenderer only set the height for the last webview that is rendered. All other webviews are ignored. Here is the code of the Customrenderer i use for Android. How can i set the height dynamic for all webviews?
<br /> public class ExtendWebViewRenderer : WebViewRenderer{<br /> static ExtendedWebView _xwebView = null;<br /> WebView _webView;</p> <pre><code>class ExtendedWebViewClient : Android.Webkit.WebViewClient { public override async void OnPageFinished(WebView view, string url) { if (_xwebView != null) { int i = 10; while (view.ContentHeight == 0 && i-- > 0) // wait here till content is rendered await System.Threading.Tasks.Task.Delay(10); _xwebView.HeightRequest = view.ContentHeight; } base.OnPageFinished(view, url); } } protected override void OnElementChanged(ElementChangedEventArgs<Xamarin.Forms.WebView> e) { base.OnElementChanged(e); _xwebView = e.NewElement as ExtendedWebView; _webView = Control; if (e.OldElement == null) { _webView.SetWebViewClient(new ExtendedWebViewClient()); } } }

When im trying to add ZXing.Net.Mobile.Forms im getting this error can anyone help me pls.

Viewing all 91519 articles
Browse latest View live


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