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

Fail to use AutoCompleteView(Xamarin.CustomControls.AutoCompleteView)

$
0
0

i am new to xamarin software. i am try to write a android,ios app with autocompleteview.

Currently i have three project with the package "Xamarin.CustomControls.AutoCompleteView"

The below are my layout

`
<?xml version="1.0" encoding="UTF-8"?>

<ContentPage.Content>


<Grid.RowDefinitions>




</Grid.RowDefinitions>




                    <StackLayout x:Name="StackLayout_Bottom" Orientation="Vertical" Spacing="20">
                        <StackLayout x:Name="StackLayout_Entries" HorizontalOptions="FillAndExpand">
                            <customControls:AutoCompleteView
                                x:Name="Entry_ImgTags" BackgroundColor="#F8F8F8" Placeholder="image tags" 
                                TextColor="#6B6E6D" PlaceholderColor="#6B6E6D" FontFamily="Brandon_Reg_Italic" 
                                FontSize="17" Margin="20,10,20,0" HorizontalTextAlignment="Center" HorizontalOptions="FillAndExpand"
                                VerticalOptions="CenterAndExpand">

                               </customControls:AutoCompleteView>

                        </StackLayout>

                    </StackLayout>
                </StackLayout>
            </StackLayout>
            <Grid x:Name="Grid_Loader" Grid.Row="1" IsVisible="false" BackgroundColor="White" Opacity="0.7">
                <ActivityIndicator x:Name="Loader_UploadImage" IsRunning="false" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand" />
            </Grid>
        </Grid>
    </ScrollView>
</ContentPage.Content>

`

This layout work fine in compile time but fail in run time

the exception

{Xamarin.Forms.Xaml.XamlParseException: Position 52:34. Type
customControls:AutoCompleteView not found in xmlns clr-namespace:Xamarin.CustomControls at Xamarin.Forms.Xaml.CreateValuesVisitor.Visit (Xamarin.Forms.Xaml.ElementNode node, Xamarin.Forms.Xaml.INode…}

Do anyone have any idea on this issue? Or can help me to use autocompleteview in xamarin.android and xamarin.IOS project


Custom View Renderer as PCL Library/Nuget Package?

$
0
0

Hey,

i am trying to create a custom view renderer as a library/nuget package. Unfortunately my sample project does not pick up the platform specific renderer and only uses the shared project element which leads to a blank element.

The sample shared project and droid project both reference the corresponding library project:

  • Library.Common PCL
    -> CustomViewElement
  • Library.Droid PCL
    -> CustomViewElementRenderer
  • Sample.Common PCL references Library.Common
  • Sample.Droid PCL references Library.Droid

Any ideas what i am missing? Is it even possible to create a PCL library with custom view renderers that get picked up by the project?

Thanks

Issue with .csproj of droid project

$
0
0

I tried to install Mkicrosoft.Bcl.Build in my project and i don't get to install and my .csproj was bad. Is there how to solve it? I'm trying to download from TFS my project, but still has problem. I cannot to create another project and this is the second time this has happened when i try to install a package by nuget.

Volume UP / DOWN buttons in xamarin forms

$
0
0

Hello,
It is possible to create events on volume up and down clicks? I am pretty new to xamarin and only used a bit to xamarin forms, never combined with xamarin android. Searched and tried multiple things and never got it done. How can I access these buttons? :s

Horizontal Parallax View

$
0
0

Hello Xamarin Friends ,
i want to need to
this type of parallax view in xamarin forms. how to create please me.

Please Help .......... the cart icon on Navbar

$
0
0

how to do the same thing to show the number of items on the cart icon of right top corner.
any ideas ?

Coach Screen in Xamarin forms

$
0
0

How to create the coach screen in Xamarin forms, My issue is I want to overlay the button (Main screen) with same button image (Image overlay the button). and some text to show steps. I have tried GridLayout, Absolute layout but the alignments change on iphone 5s, 8 and 8+.

Any suggestion or idea please.

What is the solution of this Error : java.lang.IllegalArgumentExcept ??

$
0
0

Error : java.lang.IllegalArgumentException: already added : Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat;


Text containing a clickable link

$
0
0

I'm wanting to add some text to my Forms application to get the user to accept T&C's. This is required to be along the lines of "I accept the terms and conditions" with only the 'terms and conditions' section being clickable (to display the details via a URL).

I've tried using the TapGestureRecognizer but i'm not sure how to format this to include the normal text section ('I accept the').

Would have thought that this would be a regular request for mobiles applications.

Any suggestions much appreciated.
Thanks.

Data binding of text fields in xaml

$
0
0

I am trying to enter first name and last name in a form and display them on a page. I am able to bind only the last name since only the last name shows twice on the next page.

Does anyone want to look at my code?

Here is the edit page:

    <?xml version="1.0" encoding="utf-8" ?>
    <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
                 xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                 x:Class="Relate.Views.EditMemberPage"
                 Title="{Binding Name}">
      <ContentPage.Padding>
        <OnPlatform x:TypeArguments="Thickness"
                    iOS="20, 40, 20, 20"
                    Android="20, 20, 20, 20" />
      </ContentPage.Padding>
      <ContentPage.Content>
        <StackLayout VerticalOptions="FillAndExpand"
                     HorizontalOptions="FillAndExpand"
                     Orientation="Vertical"
                     Spacing="15">
            <Label Text="First Name:" />
            <Entry Text="{Binding Name}"></Entry>
            <Label Text="Last Name:" />
          <Entry Text="{Binding Name}"></Entry>
            <Image x:Name="image"/>
          <Button x:Name="saveButton" Text="Save" Clicked="SaveButton_OnClicked" />
        </StackLayout>
      </ContentPage.Content>
    </ContentPage>

Here is the display page:

            <?xml version="1.0" encoding="utf-8" ?>
            <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
                         xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                         x:Class="Relate.Views.MemberDetailPage">
              <ContentPage.Padding>
                <OnPlatform x:TypeArguments="Thickness"
                            iOS="20, 40, 20, 20"
                            Android="20, 20, 20, 20" />
              </ContentPage.Padding>
              <ContentPage.Content>
                <StackLayout VerticalOptions="FillAndExpand"
                             HorizontalOptions="FillAndExpand"
                             Orientation="Vertical"
                             Spacing="15">
                  <Label Text="{Binding Name}"/>
                  <Label Text="{Binding Name}"/>
                </StackLayout>
              </ContentPage.Content>
            </ContentPage>

Can't install Json.net NuGet Package

$
0
0

Dear Xamarin Community,

I would really need to install json.net into my xamarin.forms project, but when i try to install it via nuGet package manager, I always get this message:

"Unable to resolve dependencies. 'Xamarin.Android.Support.Transition 25.4.0.1' is not compatible with 'Xamarin.Android.Support.Design 25.4.0.2 constraint: Xamarin.Android.Support.Transition (= 25.4.0.2)'."

And is it right to check both checkboxes for .android and .iOS in package manager?

How to change the nav bar background color on Android?

$
0
0

Hello I'm having issues with setting the navbar color with this:

var mainNav = new NavigationPage (new TodoListPage ());
mainNav.BarBackgroundColor = Color.FromHex ("a97946");
MainPage = mainNav;

This works great... until I push a Modal page then when I go back the navbar is the default color.
(this is happening on a Nexus 5 with Android 5.0, on my simulator running Android 4.4 does not happen)
is there a way to change the navbar color after setting it the first time?

Thanks!

new Navigation.RemovePage not working

$
0
0
                var preCount = this.Navigation.NavigationStack.Count;

                        this.Navigation.RemovePage(this.Navigation.NavigationStack.Last());

                var postCount = this.Navigation.NavigationStack.Count;

preCount and postCount are both the same. How is this possible?

ListView inside ListView Exception

$
0
0

Hi,

I am working on listview inside listview.
In iOS it's working fine.
But facing problem with android.
When scroll up/down crash the application
Error is : Unable to activate instance of type Xamarin.Forms.Platform.Android.ListViewAdapter from native handle 0xbe8ce1ec (key_handle 0xca27487).

Please help to solve this problem.

Help me with SQLite

$
0
0

I've been trying to figure out what's going wrong, but I can't.

I've modeled my SQLite usage based on the ToDoPCL project found on the xamarin documentation. As far as I can tell it is the same thing. One difference is that I'm using Prism when the example does not... But I'm not sure why that would matter.

12-13 16:23:49.296 D/Mono ( 4555): Config attempting to parse: 'System.Reflection.dll.config'. 12-13 16:23:49.296 D/Mono ( 4555): Config attempting to parse: '/usr/local/etc/mono/assemblies/System.Reflection/System.Reflection.config'. 12-13 16:23:49.296 D/Mono ( 4555): Assembly Ref addref SQLite-net[0xa7b26180] -> System.Reflection[0xa7b27740]: 7 12-13 16:23:49.300 D/Mono ( 4555): Assembly Ref addref SQLite-net[0xa7b26180] -> System.Reflection.Extensions[0xa7b28400]: 5 12-13 16:23:49.347 D/Mono ( 4555): DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so'). 12-13 16:23:49.347 D/Mono ( 4555): Searching for 'sqlite3_prepare_v2'. 12-13 16:23:49.356 D/Mono ( 4555): DllImport searching in: 'e_sqlite3' ('libe_sqlite3.so'). 12-13 16:23:49.356 D/Mono ( 4555): Searching for 'sqlite3_errmsg'. 12-13 16:23:49.392 F/ ( 4555): * Assertion at /Users/builder/jenkins/workspace/xamarin-android-d15-5/xamarin-android/external/mono/mono/mini/debugger-agent.c:4765, condition array->len == 1' not met
12-13 16:23:49.392 F/libc ( 4555): Fatal signal 6 (SIGABRT), code -6 in tid 4555 (ompanyname.BOTW)
`
There's a few lines of output when I try to run my project.

I get to these 2 lines:
database = new SQLiteAsyncConnection(dbPath);
database.CreateTableAsync().Wait();

And when it tries to create the table, it crashes.

Here's the project on my github: github.com/Evan-Coleman/BOTW


A login system in Xamarin.Forms?

$
0
0

Hello folks

I need to make a login system (connected to my sql server for username/pwd) but all i can find is tutorials for android or ios.
There is no such possibility to make a shared code for both systems?

I also would like to make the app stay connected on relaunch.
For that should i store the credentials (when they are correct) in some var (with akavache?) and relogin in background at every launch?

Thanks

Convert Image to byte[]

$
0
0

I've search for this but none of the options work for me. In the threads that I see, they are using BitmapImage or some .net assembly that does not exist in the pcl.

I have a xaml Image on the page & need to convert that image to a byte array so that I can store it in a blob.

Any help would be appreciated.

Steve.

to improve the droid performance

$
0
0

Hi,

I have a forms app that runs mostly image processing algorithms written in c# and located on a PCL file. At droid devices, my code runs 5 times slower compared to iOS. I choose the same CPU powered devices to do this test. I know that iOS building converts my code to %100 static native iOS code without any need for a JIT engine but Droid build doesn't do that and you must deploy a mono runtime also. Why Droid building also can't generate %100 static code for the platform? Is there any future plan to this?

Kind Regards,
Bulent.

tabbed page's tabs disappear

$
0
0

Hi,

another strange problem,

I have a navigation page, the root page of the navigation stack is Tabbed page,
after I push any page to the navigation stack and pop it, the tabbed page tabs dissapear

this problem shown after xamarin forms update

I did a layout but it's broken, doesn't work

$
0
0

I have this layout below, but it doesn't work. If i remove it and i uncomment the layout commented it works.
This layout below doesn't work:

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:Operacional"
             x:Class="Operacional.MainPage">

    <ContentPage.Content>

        <StackLayout VerticalOptions="Center">
            <StackLayout Orientation="Horizontal" HorizontalOptions="Center">
                <Label HorizontalTextAlignment="Center" Text="Notifications" FontSize="18"/>
                <local:Badge x:Name="BadgeNotifications" BoxColor="red"
                             WidthRequest="18" HeightRequest="18" 
                             VerticalOptions="Center" HorizontalOptions="Center">
                    <x:Arguments>
                        <x:Double>30</x:Double>
                        <x:Double>10</x:Double>
                    </x:Arguments>
                </local:Badge>
            </StackLayout>

            <Button Text="Add Notification" Clicked="AddNotification"/>
        </StackLayout>
</ContentPage.Content>

</ContentPage>

The layout below work

<StackLayout Spacing="10" Orientation="Vertical" x:Name="Layout">

           <StackLayout HorizontalOptions="StartAndExpand" Orientation="Horizontal">
                <Entry x:Name="txtUser" FontSize="Small" WidthRequest="180" Placeholder="Id do Usuário"></Entry>
                <Entry x:Name="txtGaragem" FontSize="Small" WidthRequest="180" Placeholder="Id da Garagem"></Entry>
            </StackLayout>

            <StackLayout HorizontalOptions="Center" Orientation="Horizontal">
                <Button x:Name="btnWs" 
                    HorizontalOptions="Center"
                    BackgroundColor="Gold"
                    HeightRequest="30" 
                    WidthRequest="80"
                    Text="Web Service" 
                    TextColor="Green"
                    FontSize="9" />
            </StackLayout>

            <StackLayout HorizontalOptions="Center" Orientation="Horizontal">

                <Button x:Name="btnFaturamento" 
                    HorizontalOptions="End"
                    BackgroundColor="Gold"
                    HeightRequest="30" 
                    WidthRequest="80"
                    Text="Faturamento" 
                    TextColor="Green"
                    FontSize="9" />
                <Button x:Name="btnOcupacao" 
                    HorizontalOptions="End"
                    BackgroundColor="Gold"
                    HeightRequest="30" 
                    WidthRequest="80"
                    Text="Ocupação" 
                    TextColor="Green"
                    FontSize="9" />
                <Button x:Name="btnTckCancelado" 
                    HorizontalOptions="End"
                    BackgroundColor="Gold"
                    HeightRequest="30" 
                    WidthRequest="100"
                    Text="Tic. Cancelados" 
                    TextColor="Green"
                    FontSize="9" />
            </StackLayout>

        </StackLayout>

What am I doing wrong?

Viewing all 58056 articles
Browse latest View live


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