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

Programmatically hiding soft keyboard does not show it on the next tap on entry for UWP

$
0
0

I have an entry which is focused on appearing event and hiding soft keyboard by calling platform specific service like: InputPane.GetForCurrentView().TryHide() for UWP
and
var imm = InputMethodManager.FromContext(CrossCurrentActivity.Current.Activity.ApplicationContext);
imm.HideSoftInputFromWindow(CrossCurrentActivity.Current.Activity.Window.DecorView.WindowToken,
HideSoftInputFlags.None) for Android

The issue is the second click on the focused entry does not show the keyboard on UWP while in Android is shown as usual.
The workaround is to unfocus the entry and focus it again, that will bring the keyboard.

Is there any solution for this issue? Am i closing it wrong on UWP?
TapGesture and Click does not work on enabled and focused entry.


UI loads on double click - iOS only

$
0
0

This happens only to some of my pages and on iOS only. When I click on a button which should open new page it calls InitializeComponent(); of the page but does not call OnAppearing() until I click somewhere else again. Same thing with labels, for example when I click on a checkbox label should increment, but it does not get updated until I click on the page. Is something blocking my UI or what might be an issue.

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?

The name 'InitializeComponent' does not exist in the current context

$
0
0

This is really strange and inconsistent. Sometimes it runs fine and sometimes I get the following error

'The name 'InitializeComponent' does not exist in the current context'

There is absolutely no change in code and project settings. Just sometimes it runs and sometimes it throws this compilation error. How to resolve this?

How to show on boarding screen once after install the app.

$
0
0

I am trying to display my on boarding screen once whenever user install the app.but i am getting every time on boarding screen.Any suggestion please?

java.exe exited with code 2

$
0
0

Hi,

I am getting:

"java.exe" exited with code 2

after adding the AdMob Nugets

I enabled Multi-Dex but still getting the same error.

I have also added:

android:name="android.support.multidex.MultiDexApplication"

In my AndroidManifest.xml

The details log as per the attached shows:

com.android.dex.DexException: Too many classes in --main-dex-list, main dex capacity exceeded

How can I fix this please?

Thanks,
Jassim

Master Detail Navigation Bar with Back Button combined

$
0
0

Hi guys,

Just wanted to ask a quick question about whether something is possible. Thought it easier to post a screen shot rather than code to begin with as I've not really got anywhere with it yet. I have the following Navigation hierarchy:

Main Menu
- Master Page
- Detail Page 1
- Detail Page 2

I've created these according to the docs and as expected the Detail Pages are displayed as per the attached screenshot:

Would anyone know if it's possible to configure so the 2 navigation bars are merged into one so the hamburger menu and back button are adjacent to each other?

I found the following with a screen shot of the amazon app which is what I'm after but the tutorial doesn't do what the image suggests:

https://wolfprogrammer.com/2016/09/02/creating-a-hamburger-menu-in-xamarin-forms/

Thanks in advance.

Native views from within Xamarin.forms app - should I use DependencyService?

$
0
0

I'm new to Xamarin.forms. Everything I've done thus far is platform independent using Xamarin.

I would like to be able to load/show a native view from both iOS and Android from a form within Xamarin when the user clicks a button. More specifically, when the button is clicked, a string parameter will need to be sent to a native class, some analysis is done and the native view will need to be shown, the user does some stuff on the native view and clicks ok, a little more analysis is done in the native class and a string gets returned to the Xamarin code related to the button push.

I'm confused on if this is even possible, and if so, if it is via using Xamarin's DependencyService.

Anyone have any pointers or thoughts as to whether this can be done, and if so, potentially how to proceed?

Thank you in advance.


Changing Page in CarouselPage programmatically

$
0
0

HI everyone,

I was wondering how you can change the pages in a CarouselPage from code. I tried the CurrentPage method but I think it completely swaps the page rather than just changing the page.

Any ideas how I could do this?

Show Touches (iOS)

$
0
0

Hello,

I am trying to find a way to automatically show touches and gestures (iOS only) like this code is trying to accomplish:

http://forums.xamarin.com/discussion/50254/ios-show-touches-free-library

Seems easy enough to get working, but I have a feeling it wasn't designed for Xamarin Forms projects? Using the above code I can either get the touches to show OR get my app controls to respond to the touches (but never both at the same time).

Has anyone done anything similar? Is there a way to capture all touches (to be handled on one layer - the animation) and then pass the touches along so the app behaves as normal? I am trying to find a way to do it once and have it work with the entire application. I want to try and avoid doing special touch handling and animation on each page separately.

I have also tried using a custom UIWindow (along side the default one) and calling MakeKeyAndVisible(). I had SendEvent overridden and calling window.SendEvent(evt) where 'window' is the default UIWindow that Xamarin Forms creates. However, the touches are not received by the app controls.

I have a feeling I'm misunderstanding something so any help would be appreciated.

Thanks,
Kevin

How can i put a secondary tabbed menu on the down side

$
0
0

How can i put a secondary tabbed menu on the down side?

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.

Dynamically Updating Bluetooth Device Picker

$
0
0

Hi,

I am trying to get a picker that will dynamically update as soon as it detects a new, compatible Bluetooth device and add it to the end of the picker list, while the picker is open.

Currently I am binding the ItemsSource to a list of available devices and this produces the list I want when clicking on the picker. However, if a new device comes into range while the picker dialogue box is open, then the device will not appear in the picker until I close the picker dialogue and reopen. The same should also happen in reverse, so if a device goes out of range, it should be removed from the picker options.

Furthermore, I would also like the picker to automatically select the first index in the ItemsSource, when one becomes available.

Currently I am calling the following when the screen appears:

devicePicker.ItemDisplayBinding = new Binding("DeviceName");
devicePicker.ItemsSource = App.bluetoothLib.AvailableDevices;
App.bluetoothLib.ScanForDevices();

And the devices are then added using AvailableDevices.Add({}); within the BLE handlers.

Thanks in advance

What is the suggested way to quickly develop Xamarin.Forms XML layouts?

$
0
0

It's taking me forever to layout a single XML screen without a live view of what the code represents. Change, run, try to remember, adjust a column, etc - a forever process.

I've seen options for "Gorilla Player", "Live (something)". Since I'm developing in Xamarin.Forms, my goal is to arrive at something decent for BOTH iOS and Android.

What is commonly being used or suggested? What are others using to speed this process? I'm on VS2019 (Windows) looking for dependable and long-term solution for rapid development.

Is there a Braintree Library/SDK for Xamarin Forms?

$
0
0

Hi,
I'm looking to use Braintree in a Xamarin Forms app (iOS, Android) and I'm having a bit of trouble finding a way to communicate to Braintree from Xamarin.Forms. Has anyone else tried this before? If so, what was your experience like?

Thanks


Button within each cell of a listview: How to figure out which cell is holding the clicked button?

$
0
0

Hello, I have a listview, where each cell contains a button and some text. When the button is clicked I want to know which cell (containing the clicked button) was pressed. Like cell with index 3 contains the clicked button, etc.

I currently have the button created in xaml and using "Clicked="checkBoxClicked"" . So in the code behind when I create the method for checkBoxClicked what would I do to find what I'm looking for?

Any help would be greatly appreciated! Thanks!

Open Unity3D game in Xamarin Form/ Xamarin App in Unity3D

$
0
0

I've developed an AR game in Unity3d. I need to open this game in Xamarin cross platform application.
1. Is it possible..?
2. how to manage the Unity assets in Xamarin...?
3. Is it possible unity game as a library and open in Xamarin...? / Xamarin app as an asset and open in Unity3D...?

Thanks in Advance..

Xamarin.Forms android push notification

$
0
0

I want my app can pop notification when it runs on background.
The function like WeChat.

My app is a network client, but not have user account system.
If my app not run on foreground or background, the server message not need to pop notification.
So I don't need the cloud system to do this.

I only want two things:
1. My app can run network receive loop on android background.
2. My app can tell the android system pop notification with my text.

Button click not firing with Nested Views

$
0
0

So the issue that I am having is I have ContentView nested in a ContentPage. The ContentView has a click event associated in the codebehind. (c#). But it does not fire. I'm thinking it's due to the fact that the click event doesn't actually reach the button.

Here is my xaml

<ContentPage.Content>
        <StackLayout>

            <views:NavBarView/>

            <StackLayout>
            <ScrollView HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
                    <!--<Button Text="Download Course" Clicked="DownloadClicked"/>-->
                    <!--<Button Text="Load Catalogue" Clicked="LoadCourses"/>-->
                   <StackLayout>
                <Label Text="{Binding Title}" StyleClass="pageTitle,fontColor"></Label>
                <StackLayout x:Name="Cat"></StackLayout>
                        <StackLayout x:Name="LP"></StackLayout>
                        <ActivityIndicator x:Name="CatalogueProgress" IsVisible="False" HeightRequest="20"/>
                    </StackLayout>            
        </ScrollView>
            </StackLayout>
        </StackLayout>
    </ContentPage.Content>

Here is the xaml for NavBarView

<ContentView.Content>
        <AbsoluteLayout>
        <StackLayout Style="{StaticResource headerContainer}" BackgroundColor="{Binding Source={x:Static constants:Constants.HeaderColour}}">
            <Grid HorizontalOptions="FillAndExpand" RowSpacing="0" ColumnSpacing="0" BackgroundColor="{Binding Source={x:Static constants:Constants.HeaderColour}}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="48"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="48"/>
                </Grid.RowDefinitions>
                <ImageButton Clicked="OpenMenu" Pressed="OpenMenu" x:Name="burger" Grid.Row="0" Grid.Column="0" Source="round_menu_white_48.png" HorizontalOptions="FillAndExpand"/>
                <ffimageloading:CachedImage Grid.Row="0" Grid.Column="1" Style="{StaticResource headerImage}" Source="{Binding Source={x:Static constants:Constants.Logo}}"></ffimageloading:CachedImage>
            </Grid>
        </StackLayout>
        </AbsoluteLayout>
    </ContentView.Content>

How to access path of external SD CARD using xamarin.forms

$
0
0

Unhandled Exception: System.UnauthorizedAccessException: occurred when i am trying to access path given below:
content://com.android.externalstorage.documents/tree/13E7-3B0A%3AMyZip

Viewing all 91519 articles
Browse latest View live


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