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

Resources.Layout folder not shown in a Crossplatform Xamarin.Forms project.

$
0
0

Hello everyone!
I am currently working with Xamarin.Forms and I am trying to create a custom PageRenderer for Android which would display a stream from the camera. In every example I have met, the custom view was created thanks to a layout axml file located in Resources\layout that was called thanks to the command view = activity.LayoutInflater.Inflate (Resource.Layout.CameraLayout, this, false); such as in this example, which I am trying to replicate.
The problem is that Visual Studio does not display the subfolder layout inside Resources (the only subfolder shown is drawable). I tried navigating there and creating manually CameraLayout.axml but my program still refused to build when I called view = activity.LayoutInflater.Inflate (Resource.Layout.CameraLayout, this, false); explaining that "Resources.Layout contains no definition for CameraLayout". The strange thing is that when I work on another application developed with Xamarin (not Xamarin.Forms), that folder is shown and I face no problem when building the application.
Has anyone faced that problem before? If yes, how did you create your custom Android view?

I am quite new to Xamarin and Xamarin.Forms so there might be something obvious I have missed. I am working with Visual Studio 2015 on Windows 7.
Thank you kindly to anyone who will take the time to answer.

Maxime Larcher


Xamarin Forms WPF Target

$
0
0

I was told that Xamarin Forms will soon be targeting .NET with the WPF UI libraries. I was told that this would be done officially by the Xamarin Forms team and not just some 3rd party repo hanging around on the web.

Was the person who told me this a filthy liar, or not?

Where should I put my main code in the solution?

$
0
0

Hi,
I am developing a Cross Platform application using Visual Studio 2017 and Xamarin. I can see 4 projects under the same solution - Main Project, Android, IOS and Windows.

My application is to display some categories, then based on the chosen category items under that category will be displayed. User will select an item and then send a message to the App Owner via app.

Where should I put all my code to display categories, items and message?
Should it be on the main project or each of the other projects (Android, IOS and Windows)?
Thanks

Preview: Xamarin.Forms Embedding

NFCForms UWP Example

$
0
0

Hi, Has anyone got NFCForms working with UWP? The sample only has Android and Winphone.

Thanks Paul.

Could we draw a circle upon google maps in Xamarin.Forms

$
0
0

We have set of points that form a circle on the map, could we connect those points to draw a circle over google maps in Xamarin.Forms i.e. for all three platforms (Windows, Android & iOS) ?

UWP Performance Issues, but iOS and Android Fine

$
0
0

We are having some major issues with UWP performance, while iOS and Android are plenty snappy. My main question is whether there are known issues/workarounds to what appears to be UWP-specific problems.

Our app implements an expandable tree for data entry using nested StackLayouts in one big scroll view; we've learned the hard way that the StackLayout nesting does bog down performance, and are working on switching some of our organization to Absolute/Relative layouts, and generally reducing the number of Stack Layouts involved. That said, however, current performance on iOS and Android is more than adequate for our purposes.

UWP, however, is a different story. Upon expanding our tree (populating StackLayouts with children), the UI completely freezes for upwards of 20 seconds. Some larger expansions freeze the app indefinitely. A little investigation with Visual Studio's built in profiling tool reveals that a ton of CPU work is going to (I think) negotiating the layouts.

With breakpoints, I was able to determine that the vast majority of the time spent from our calling code occurs when adding children (usually StackLayouts themselves) to already visible StackLayouts.

Here are some screenshots from the diagnostic session:

The app becomes completely unresponsive for the selected view. (The section without UI thread usage, which is admittedly quite confusing).

And these are the juiciest bits of called code. They all appear to be related to layout negotiation.

I can give further details as needed. Thanks tons for the help!

Hide tab bar on push

$
0
0

I would like to hide the tab bar of a TabbedPage when a specific page is pushed with Navigation.PushAsync(). In iOS UIViewController.hidesBottomBarWhenPushed does the job, is there any way to do the same with Xamarin.Forms? Or is there a method/property to hide the tab bar? I can't seem to find anything.


How get Navigation Stack (page) after receive a MessagingCenter at Top page (master detail page)?

$
0
0

Hi everyone,
I have a problem as below description:

Top page (master detail page) has menu list. Now, select a menu item (page 1) -> push to display Page 1 -> push to display Page 2 -> push to display Page 3
In Page 3, I can detect: Navigation.NavigationStack.Count = 3
From Page 3, I have a button, after clicked it, it will send a messagingCenter to TopPage.
At TopPage.cs, I have OnSubscribe_Page3() method. In here, I check value: Navigation.NavigationStack.Count = 1
It is always 1. That is Page 1. I want to get Page 3 from NavigationStack.

How to do it? I see that Navigation can not return correctly the number of NavigationStack after using MessageCenter to process at another page.
Thanks in advance!

Unable to add window -token android.os.BinderProxy@16c174d3 is not valid; is your activity running ?

$
0
0

i get linkedin signup info , but i am getting these error ,"Unable to add window -token android.os.BinderProxy@16c174d3 is not valid; is your activity running ?" what should i do ?

Background image CarouselPage

$
0
0

Hi guys!
How can i put a panorama in CarouselPage?

I am working on a project where I need to Implement CoverFlow.

$
0
0

I am working on a project where I need to Implement CoverFlow with Three images in left right and centre.

Pre-release: Xamarin.Forms 2.3.5.256-pre6

$
0
0

We've pushed Xamarin.Forms 2.3.5.256-pre6 to NuGet and have begun QA in preparation for making this our next stable release.

To install the pre-release, check the pre-release option in your NuGet manager and install this version.

For some quick highlights, check out our blog announcement. Hint: Fast Renders for Android, ListView performance enhancements and fixes, and MacOS preview.

If you’ve got a bug to report, drop us a quick report here so we can troubleshoot in detail.

As you have performance specific feedback, please join the discussion in this performance specific thread.

Important notes

  • Xamarin.Forms is now compatible with .NET Standard projects! Not all build features may work.
  • Behavior change: Device.RuntimePlatform now returns WinRT on WinRT and UWP on UWP.
  • Behavior change: Using the new AutomationProperties may impact UI Test execution on Android. AutomationId, Name, and HelpText will all set the native ContentDescription property, with Name and/or HelpText taking precedence over AutomationId (Name and HelpText will be concatenated). This means that any tests looking for AutomationId will now fail if Name and/or HelpText are also set on that element. To work around this issue, please alter your UI Tests to look for the value of Name/HelpText in this scenario.
  • Behavior change: Calling Focus on a Picker on WinRT/UWP will now open the drop down.
  • Deprecation: Android IVisualElementRenderer.ViewGroup is now obsolete. Please use View instead.

2.3.5.256-pre6

  • 56795 - "DataTriggers do not work on UWP in RELEASE mode"

2.3.5.255-pre5

  • [Android] Dispose check before setting properties on Button (PR)
  • 36031 - "Button border not drawn on Android without a BorderRadius" (PR)
  • 57717 - "Setting background color on Button in Android FormsApplicationActivity causes NRE" (PR)
  • 57749 - "[UWP] After enabling a disabled button it is not clickable" (PR)
  • [Android] Dispose check on FastButtonRenderer to prevent crash (PR)
  • [Android] Set the Id field for Android Views created by Forms (PR)
  • 55588 - "Cannot open more than one ContextAction in different ListViews on IOS" (PR)
  • 56444 - "A small "dot" shows up as value in Android labels when the value is null/empty." (PR)
  • 56895 - "VS2017 stable - previewer exception crash- no method found Button_click on type" (PR)
  • 56896 - "ListViews for lists with many elements regressed in performance on iOS" (PR)
  • 57108 - "Fix possible crash on API 21+ at launch when using Holo theme and FormsApplicationActivity" (PR)

Release Notes

2.5.3.239-pre3

Release Notes

2.3.5.235-pre2

Release Notes

2.3.5.233-pre1

Release Notes

How to set bullet points to this?

$
0
0






















I need bullet point this page

System Type Load Exception While calling API ??

$
0
0

I m Getting above Exception Please suggest me solution..


Tooltip in both IOS and Android

$
0
0

Hello guys,

i'm new here in the world of Xamarin and i'm stuck in my dev
I want to display tooltip on some buttons click like this

I've found a nuget for Android and I achieved to display my tooltips on Android but nothing for IOS
The Ideal would be to find a nuget which implement both platforms

Do you know some way to do that ? Any Ideas ? Cause Xamarin forms doesn't have tooltip in it

Thanks a lot

Html clickable link in Label

$
0
0

Hello,
I would like to put some html content inside a Label (or something else if needed).
I managed to do a Custom renderer so that the html is displayed in the Label.
On Android there is no problem with making the links clickable, but on iOS the UILabel doesn't have the "shouldInteractWithURL" attribute, only UITextView has it.
Is there a way to make the html links clickable on both iOS and Android?

Thank you.

How to stop running activity indicator in xamarin forms ?

$
0
0

Hello World !
I have a xamarin forms app in which i have to load activity indicator on app launch Meanwhile app fetches and displays data from sql azure database with the help of Web API. When I start the app, activity indicator is shown running but it does not hide when content in the listview is displayed. It should be stopped running and hidden when content is shown which following code is not doing. Kindly spend few minutes and help me how to do this ?
Thanks

Viewmodel is given as :

` public class RelativeListITemsViewModel:INotifyPropertyChanged
{
public static ObservableCollection _list = new ObservableCollection();

   public ObservableCollection<Product> list
   {
        get { return _list; }
        set { _list = value; OnPropertyChanged(); }
   }
   public static int count = 0;

   private static  bool isLoading=true;

   public  bool IsLoading
   {
       get { return isLoading; }
       set
       {
           isLoading = value;
           OnPropertyChanged();
       }
   }

   public RelativeListITemsViewModel()
   {

        CallWebApiAsync();
   }

   public static async Task CallWebApiAsync()
   {


       using (var client = new HttpClient())
       {
           client.BaseAddress = new Uri("http://fypapivs.azurewebsites.net/api/");
           client.DefaultRequestHeaders.Accept.Clear();
           client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
           //GET Method
           HttpResponseMessage response = await client.GetAsync("Product");

           if (response.IsSuccessStatusCode)
           {
               if (count < 1)
               {
                   var products = await response.Content.ReadAsStringAsync();
                   var des = JsonConvert.DeserializeObject<List<Product>>(products);
                   foreach (var i in des)
                   {
                       // if(productsList==null)
                       _list.Add(new Product()
                       {
                           Product_Name = i.Product_Name,
                           Total_Cash_Price = i.Total_Cash_Price,
                           Product_Image = i.Product_Image,

                       });

                       // ImageUrl = (StreamImageSource)ImageSource.FromStream(() => new MemoryStream(i.Product_Image));

                   }

                   count++;
               }
            }

           else
           {
               await App.Current.MainPage.DisplayAlert("Failure", "Internal server Error", "OK");
                //return "";
            }

       }

   }

   public event PropertyChangedEventHandler PropertyChanged;

   protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
   {
       PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
   }

}`

And XAML code is given below:

`

<ListView.ItemTemplate>





    <ActivityIndicator
        RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent,Property=Width,Factor=0.5,Constant=-20}"
        RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent,Property=Height,Factor=0.5,Constant=-20}"
        IsRunning="{Binding IsLoading}" IsVisible="{Binding IsLoading}" Color="DodgerBlue"
        >

    </ActivityIndicator>
</RelativeLayout>`

Xamarin Forms Maps VisibleRegion

$
0
0

Xamarin Forms custom Maps VisibleRegion is null

var x = customMap.VisibleRegion.Center;

how to resolve this issue?

Crash on Xiaomi MiPad2 with armeabi-v7a ABI, but x86 is fine?

$
0
0

Hi all,

I'm not sure if this is because of a coding issue on my end, or is it because of other issues, but my exported Xamarin.Forms project APK with armeabi-v7a ABI crashes on the device. If I include the x86 ABI into the APK (bloating it up by a whopping 50MB), it runs fine. Just wondering if anyone else is having this same issue? I can't debug the app because it forces an install of the Mono Shared Runtime, and by having this shared runtime, it does not crash in debug mode.

Viewing all 91519 articles
Browse latest View live


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