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

Disable the Return button on the Keyboard in Editor?

$
0
0

I'm attempting to extend the Editor text input field to behave more like a regular Entry, but multi-line.
As the title suggests, I want to disable the Return button and replace it with a Done button that receives events, similar to how the keyboard behaves with Entry fields.
I don't care about being able to insert new lines, the box word-wraps automatically anyway.

It would also be helpful if I can set the colour of the Done button to match the aesthetics I've been provided.

Thanks!


archive all is disable in Xamarin visual studio

$
0
0

I am getting error "java.exe" exited with code 1. so I change the configuration file which is as shown in image
but after that archive all is disable

Thanks

Best way to create non full screen popup?

$
0
0

Hi,

I am trying to create a menu that will take over 80% of the screen.
This is a customer request and I can't use the master details.
I tried few popup lib but non of them gave me a solution for non full screen popup.

  • the white area will be a list control.

Thanks,

Ady.

Extract qr code data into varibles

$
0
0

Hi,
I am trying to develop a qr code scanner using ZXing library. And now i'm want to take scanned data to different variables. how can i do that???

Google Places autocomplete in Xamarin.Forms

$
0
0

Hello guys, im pretty new to Xamarin and I'm working with Xamarin.Forms.
My question is: how can I achieve a "Google Places search bar" in Xamarin.Forms? I don't need map integration, just like a textbox in a page with the autocomplete, working in both Android/IOS.

I have searched but i didn't find nothing useful.

Thanks all :)

Locked screen problems on deployed Android app

$
0
0

I have a media app, which uses CrossMediaManager. But I am having problems when the screen is locked on Android.
Note that when I test with debugger connected, there is no problem. But after publishing, the queue will not work when the screen is locked. Upon starting playback, I add several audio files to the queue.

Case 1: User starts playing. I automatically add more items to queue. User locks screen. After current audio file, playback stops.

Case 2: User starts playing. I automatically add more items to queue. User keeps screen on. After current audio file, playback continues to next in queue.

Is it something I missed, or a problem with CrossMediaManager?

SIGABRT while debugging async methods

$
0
0

These methods used to work fine, but iOS rejected our latest App version because an unspecified error.

While debugging, they work fine, unless you go step by step after a breakpoint. After said methods finish, we get this exception:

´=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================´

We cannot progress and send the app to the store unless this gets corrected.

A brief example of one of our async methods:

async Task chargeLists () {
//Hide main screen
scroll.IsVisible = false;
//Show hidden screen with an ActivityIndicator and a "Loading" text
overlay.IsVisible = true;
await Task.Run (() => {
//Do something while thinking
});
//Hide creen with an ActivityIndicator
overlay.IsVisible = false;
//Show main screen
scroll.IsVisible = true;
}

This method is used in the first screen and is called by:

protected override async void OnAppearing () {
try {
await chargeLists ();
base.OnAppearing ();
} catch (Exception ex) {
Debug.WriteLine (string.Format ("Error: {0}", ex.Message));
}
}

protected override async void OnDisappearing () {
try {
await chargeLists ();
base.OnDisappearing ();
} catch (Exception ex) {
Debug.WriteLine (string.Format ("Error: {0}", ex.Message));
}
}

Please and thank you for your help.

Anybody got time to try reproducing a XF issue on UWP?

$
0
0

I've been intermittently seeing a problem on UWP for a while. I finally got around to creating a repro sample, but Xamarin aren't seeing the problem when running that sample on their machines. If anybody has got 10-15 minutes to spare, could you try to reproduce bug 59244 please and let me know if you see the issue. There is a small project attached to the bug at https://bugzilla.xamarin.com/show_bug.cgi?id=59244


Customizable calendar

$
0
0

My friend and I would like to create an app with a calendar view whose appearance can be easily customized.
With our effort to find a library that allows us to do so with minimal amount of headaches, it became clear to us that we might have to end up making our own calendar for each platform and then utilize it with a shared interface via the PCL.
Can anyone advise us on how to do that? Should we start completely from scratch for each platform? Perhaps there are libraries that could help us achieve that without stepping into oblivion? Or maybe there's a completely different approach that doesn't require a lot of platform-specific code?

How to delete an item from a ListView in MVVM

$
0
0

Hi, I am new to Xamarin, Forms and MVVM, so this might sound a little dumb, but what is the proper way to delete an item from a ListView? I tried to do it with a ContextAction, but I can't figure a way to know in my ViewModel which item to delete from the ObservableCollection. Binding the SelectedItem of the ListView does not help, since a long tap on Android or a swipe on iOS don't select the item. I use Prism with Unity for MVVM, if this is of any importance. Here's my ListView:

<ListView x:Name="List" ItemsSource="{Binding Users}" HasUnevenRows="True">
    <ListView.Behaviors>
        <b:EventToCommandBehavior EventName="ItemTapped" Command="{Binding SelectUserCommand}" EventArgsConverter="{converters:ItemTappedEventArgsConverter}"/>
    </ListView.Behaviors>
    <ListView.ItemTemplate>
        <DataTemplate>
            <ViewCell x:Name="Item">
                <ViewCell.ContextActions>
                    <MenuItem Text="Delete" BindingContext="{Binding Source={x:Reference List}, Path=BindingContext}" Command="{Binding DeleteCommand}" CommandParameter="{Binding .}" IsDestructive="True"/>
                </ViewCell.ContextActions>
                <Grid Padding="10">
                    <Label Style="{DynamicResource ListItemTextStyle}" Grid.ColumnSpan="2" Text="{Binding Name}"/>
                    <Label Style="{DynamicResource ListItemDetailTextStyle}" Grid.Row="1" Text="{Binding Login}"/>
                    <Label Style="{DynamicResource ListItemDetailTextStyle}" Grid.Row="1" Grid.Column="1" Text="{Binding Role}"/>
                </Grid>
            </ViewCell>
        </DataTemplate>
    </ListView.ItemTemplate>
</ListView>

And the corresponding ViewModel (I removed some code to save space):

public class MainPageViewModel : BindableBase, INavigatedAware
{
    //services
    INavigationService _navigationService;
    IPageDialogService _dialogService;

    //fields and props
    private ObservableCollection<User> _users;
    public ObservableCollection<User> Users => _users;

    //commands
    private DelegateCommand _deleteCommand;
    public DelegateCommand DeleteCommand => _deleteCommand ?? (_deleteCommand = new DelegateCommand(DeleteUser));

    //methods
    public MainPageViewModel(INavigationService navigationService, IPageDialogService dialogService)
    {
        _navigationService = navigationService;
        _dialogService = dialogService;

        _users = new ObservableCollection<User>() { new User() { Login = "Login", Name = "Name", Role = "Role" } };
    }

    private void DeleteUser() => Debug.WriteLine("This should delete a user");
}

I would appreciate if anyone could explain me how should I implement the deletion of an item using the MVVM pattern. Thanks

Selected item BackgroundColor overwrites button BackgroundColor (ListView)

$
0
0

Hello to all.

I have this custom ViewCell:

        <ViewCell>
          <Grid>
              <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="auto"/>
              </Grid.ColumnDefinitions>

              <StackLayout Grid.Column="0" Style="{StaticResource VerticalCenteredStackLayout}">
                <Label Text="{Binding LineNo}"/>
                <Label Text="{Binding Quantity}" />
              </StackLayout>

                <Button Grid.Column="1" Text="Button" BackgroundColor="Red"/>
          </Grid>
        </ViewCell>

And the aspect in iOS is:

However, when I select some item in the list, the background of the item overwrites the background color of the red button:

How can I avoid this? I want to keep the red color in the button once the item has been selected.

Thanks.

How to add steps to my slider?

$
0
0

Hi ppl! I have a simple slider on my xaml <Slider x:Name="DesSlider" Minimum="0" Maximum="5" Value="0" ValueChanged="DesSlider_OnValueChanged" VerticalOptions="CenterAndExpand"/>
How can i add steps to it ? I would like the StepFrequency=1 (so totally 5 steps). Is that possible without using any extra nuget packages? Thanks

How to assign Item template for Picker control in Xamarin Forms?

$
0
0

I have a Bindable picker control but for multi selection I need to use Check box as Item template for this picker control.
Please suggest how can I achieve this in Xamarin Forms.. kindly provide any links which can be useful for my criteria..

Thanks,

System.Net.Http.HttpRequestException exception will running the UI Test on Physical Device..

$
0
0

I have created a simple Xamarin.Forms(Portable) project and included UI Test project in it. But when i am trying to run the test in physical device it giving me below mentioned exception.

Test Name:  AppLaunches
Test Outcome:   Failed
Result Message:
SetUp : System.Net.Http.HttpRequestException : An error occurred while sending the request.
  ----> System.Net.WebException : The underlying connection was closed: The connection was closed unexpectedly.
Result StandardOutput:  Full log file: C:\Users\Admin\AppData\Local\Temp\uitest\log-2016-10-22_11-04-53-698.txt
Skipping IDE integration as important properties are configured. To force IDE integration, add .PreferIdeSettings() to ConfigureApp.
Android test running Xamarin.UITest version: 2.0.0.1534
Initializing Android app on device ZX1D63GCCL with installed app: co.veloxcore.UITestSample2
Signing apk with Xamarin keystore.
Skipping installation: Already installed.

Here is the link to my project: XamarinUITest

Visual Studio 2015 XAML Designer Not Showing or Showing Error

$
0
0

I am on VS2015 and I have little UWP project (Xamarin.Forms) but when I open my MainPage.xaml file or App.xaml file in editor, it does not show the designer.

In case of MainPage.xaml, I get error:

Exception: Cannot create an instance of "WindowsPage".

In case of App.xaml, I get:

App.xaml cannot be edited in the Design view.

Why is the designer failing to load and what is the way around it?



Xamarin Live - Shared Project not hitting breakpoint

$
0
0

Hey guys.

I created a new Shared Project so i could debug on iPhone using Xamarin Live Player (since PCL is not supported yet).
The project is empty so basically is just a "Hello Xamarin Forms!" app.

When I add a breakpoint on App.xaml.cs InitializeComponent() method, the same is not hit but the app runs right away on my iPhone.
Same happens anywhere else on the code. Already tried to add the breakpoint on AppDelegate.cs within my iOS project, but with no success.

Could you guys help?

Thank you!

Android Debug Bridge won't stop

$
0
0

Hi,

I have an WinForm app who uses ADB to detect an Android device connection. It works fine, but when I close the software, the ADB thread won't stop even if there is a Stop in the Form_Closing event, so the program stays in memory forever. How can I fix this?

Here's the code:

AndroidDebugBridge m_ADB;

In the Form_Load:
string S = Directory.GetCurrentDirectory();
S = S + "\adb.exe";
m_ADB = AndroidDebugBridge.CreateBridge(S, true);
m_ADB.DeviceConnected += this.MADB_DeviceConnected;
m_ADB.DeviceDisconnected += this.MADB_DeviceDisconnected; ;
m_ADB.Start();

In the Form_Closing:
m_ADB.Stop();
m_ADB = null;

thanks for your time and help

How to add a device in my account to certificate it and so compile it and debug it?

$
0
0

I have an app and when I connect the iphone to the PC for compiling the app the with visual studio a error appear in console: "No installed provisioning profiles match the installed iOS signing identities.". I must add the device to my developer account or am I wrong?

What I need to solve this issue?

How to send message for my App?

$
0
0

We have 7 store. Seller sells some products. The client ask a discount, but the discount is big and the seller do not have permission. So, seller send a message to a manager or other that can do a discount. How can I send this message to a manager or other? I need send a message, manager say YES or NO to discount and message back to seller. I'm have a dificult with this. I'm read about Firebase. Is the way? All 7 stores can send request for a discount. When I get messages for What's App, example, in the icon of the what's app appear an orange circle and inside has 2 or 3 or 4, depends on the a amount of messages and in my cell phone appear too(when screen blocked). I'm read about Firebase and Azure NotificationsHub. But, azure is paid.

Activity Indicator when using Material Design and Forms

$
0
0

Hello,

Since i changed to material design, the activity indicator stopped showing. I tested going back the theme and it worked again. Is there any workaround?

Thanks

Viewing all 91519 articles
Browse latest View live


Latest Images

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