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

dwqe


Forms or Android PNG library suggestions (to make index color PNG)

$
0
0

I know I can't be the first person to want this, but after a day and a half of searching I can't find anything to fit the bill and I find that odd.

Workflow: Shoot photo on android... make it Black white (not gray but really 1 bit)... save it as a PNG, preferably true 1-bit or at least indexed color in order to make a small file size and keep the data.

Doing the convert to gray to b&w wasn't a problem. I have that done. But its still a 900kb file when it could be 50k. I'm sure that's because its still being saved as a full-color image. I'm thinking that if I turn that into indexed color of only 2 colors then it should be at least 10 times smaller.

I was hoping to avoid adding huge libraries that are vastly overkill for this one need. Researching I find reference to Android libraries such a pngj that have this small scope of need but they date back to 2013/2014 - Making me think something else has risen up to take their place but I can't for the life of me find something to handle this need in today's era: Preferably something Xamarin friendly.

Any suggestions?

How to unit test a ViewModel with MessageCentre

$
0
0

In the constructor of my ViewModel I have this subscription

MessagingCenter.Subscribe(Application.Current, "updateMapJobs", UpdateMapJobs);

The problem is when I have come to write unit tests for the ViewModel. On creation I get an ArgumentNullException for subscriber and it fails on the MessageCenter line.

I have done some searching but no seen any similar issues, I could use a point in the right direction, documents or something

Thanks

FreshMVVM can't resolve page from pagemodel on iOS

$
0
0

Hi @MichaelRidland,
I'm currently facing an issue in resolve page from pagemodel using FreshMvvm, which is working perfectly on Android phone, but while using iOS simulator getting null on "Type.GetType(name) : in ResolvePageModel() method".

IsToggledProperty not working as expected

$
0
0

Hi, I have a problem with the "isToggleProperty" . The Switch is in binding with a property in the ViewModel. I expect to see the toggles on or off at the application's startup, depending on the relative viewmodel's property State, but it seems it's always off. Do you have any tip?

Here is my code:

var switch = new Switch();
switch.SetBinding(Switch.IsToggledProperty, "State");

Thanks :)

How to add and use the .Net Framework to a project?

$
0
0

greetings I am new in visual studio and with Xamarin.forms I am trying to make a multiplatform app, the app requires that I use a nuget package but that package is 100% compatible with the .Net standard 2.0 that I am using so when compiling it gives me a series of warning and errors, I want to change to the .Net Framework 4.6.1 that my VS recommends but when I try to change I can not since it does not give me the option to select another .Net Framework attached an image where I highlight the problem and with the warning messages that I find after compiling, it seems strange to me since I have installed the .Net Framework from 3.5 to 4.7.1 but it does not give me the option to use them. Please help me with this problem if you can tell me how to use the different versions of the .Net Framework, I thank them and please can explain it to me in an easy way since as I mention I am new and it is costing me a lot to understand these things I appreciate it a lot.!

EntryCell Password

$
0
0

Anyone found a way to make an EntryCell a password field so you get ********** when the user enters a password ?

Format an entry

$
0
0

Hello,
Is it possible to format a keyboard entry ? As an example for a credit card number to specify that the number should be only 16 numbers long ? 4x4?
Thx,
cjacquel


How to create multiple image cropper in Xamrin.Forms?

$
0
0

Hi,

I want to achieve following functionality. Can anybody please suggest me any way or example that can be work worthy in iOS and Android. However, the priority is of iOS.

I have a page where user can upload 8 pictures. I want to provide multiple image selection. User can select 8 pictures together or user can select in group like 2-3 pictures. Even user can select only one picture.

Now the twist that I want to provide image cropper option. Let say user have selected 5 picture. After selecting pictures, I want to show image cropper screen with Next button. So, user must be able to crop all 5 image one by one with one go. Next button will show to next image to crop. At 5th image, there will be Done button that will take user back to image gallery which will show all 5 pictures.

Can anybody please suggest me?

What ad network are you using for interstatials and banners

$
0
0

Just curious what ad networks folks are using and which are giving the best returns.

On Android, I have been using Admob, pretty bad returns and it crashes in Xamarin Forms when you try to show an interstitial or click on a banner (https://bugzilla.xamarin.com/show_bug.cgi?id=39567). I have also tried Leadbolt. Returns were about the same and now they have ditched their native banner ad. The HTML replacement looks awful but at least it doesn't crash.

On iOS I have been using iAd which has had the best results by far of any ad network. However they are shutting down in June so I need a good replacement for iOS.

Who are you using and are you happy with them? Thanks!

How to take a picture without open Camera UI?

$
0
0
Hi everybody!
I have followed CustomRenderer a View official sample to show my custom Camera. Then I want to take a picture every second to get Bitmap to perform OCR.
So, How to take a picture programmatically.
If you have a best way to always OCR from Camera Preview stream, please tell me!
Thank you

Xamarin.Forms without option PCL

$
0
0

Hi
Today I installed from internet Visual Studio Community 2017 Version 15.6.4 and framework .net 4.7.02556.
I need create a project with Cross-Plataform -> MobileApp(Xamarin.Forms), in the next window (New Cross Plataform App) I do not see the option PCL in code sharing strategy only have Shared Project and .Net Standard. Someone knows what happened with PCL?

How do I do this simple layout scenario

$
0
0

I am struggling with using the Xamarin layouts. They're not intuitive. I have a situation like this: I have a box and a label. I want the label's width to be capped at the lesser of 75% of the parent view's width or the actual width of the label. I want the box to be the size of the label plus a border (and to be drawn beneath the label). In my head, this is how it would work based on what I'm used to doing with GUI layouts:

var measuredLabelWidth = label.MeasureWidth();
label.Width = Math.min(0.75*parent.Width, measuredLabelWidth);
label.Height = label.MeasureHeight();
box.Width = label.Width + border*2;
box.Height = label.Height + border*2;
label.X = box.X + border;
label.Y = box.Y + border;

My problem is that it seems you can only set a minimum width or the desired width. But no maximum. I tried setting the label's WidthRequest to 75% of the parent view but then it just always sets it to that: even if I have a label with 1 letter, it will be resized to take up that full width. Which then means the box background is way too wide. And I tried to see what the width of the label would be given my width constraint by calling label.Measure with 75% of the parent's width, but it just returned -1 for the sizes. Here's an example of what I want that also showcases my amazing MS Paint abilities:

control for sending feedback .

$
0
0

I want a feedback control which works like this exactly on "tez app".

If the user keep on typing feedback , when he reaches the end of the line the "editor control "should move down. Can any one suggest a solution for this, either it is possible using editor control or some other control. if so please guide me.

Is there some limitation for the number of XAML in one project on iPhone 32 bit?

$
0
0

I have a project which has more than 200 XAML files.
Now this project can't work on iPhone 32bit like 5C and 5. It stalls on wake up.
But if I make another C# PCL project and move some XAML files to that project about 2-30 files? , it works properly.
I didn't read Xamarin.Forms source code yet, is there some limitation on startup? Like registering XAML files on startup encounters small 32 bits stack or something?


How to record video in Xamarin forms for 15 seconds?

$
0
0

How to record video in Xamarin Forms for 15 seconds? The Video recording should stop after 15 seconds. And also I'm not getting any related codes for recording and playing video in Xamarin Forms. Is it possible in Xamarin Forms. Please help me with this. Your help will be greatly appreciated.

Create App with three columns

$
0
0

Hello,

I want to create an app that has a similar layout to Wunderlist. That means I want to have a Hamburger Menu on the left where I can choose a category, then a list of items in the middle and on the right I want the details of the selected item to be displayed.

Wunderlist has this kind of layout (lists, tasks, and the details of a task) and depending on the width they are either shown side by side (dektop) or only one at a time (mobile apps).

I have used a MasterDetail Page for the Hamburger Menu. Should I set the details page to another Master Detail Page or is there any other way?

In my previous UWP app I used the HamburgerMenu and MasterDetailsView from the UWP toolkit. Are there similar controls available for Xamarin Forms?

Support status of Windows Phone 8.1?

$
0
0
Hello,

I am pretty new to Xamarin so please excuse me if any questions seem dumb.

I have a UWP (C#/XAML) app and I want to port it to Xamarin mainly to publish it Android and iOS as well.

I have added a Xamarin.Forms project containing UWP, Android, iOS and a shared Xamarin project to my existing VS 2017 UWP solution. I am now in the process of recreating my existing code in the shared Xamarin.Forms project.

I have only recently learned that I can also target other platforms with Xamarin.Forms, namely Tizen and macOS and also that there is or was support for WP8 with or without Silverlight.

I am confused as to the current support status of Windows Phone 8.1 of Xamarin.Forms. Has support for WP 8.1 ended or only for Silverlight? If so, what is the last version to support any kind of Windows Phone 8 development?

Can you have a Visual Studio solution with current Xamarin apps (shared, UWP, iOS, Android) and legacy (WP 8.1) projects to open in VS 2015 (for WP 8.1 compiling and debugging) and VS 2017 (for development and everything else)?

Thank you very much!

What is the harm to change MainPage outside of App constructor?

App.android has stopped suddenly

$
0
0
I make new project when xamarin forms 2.5 . It runs ik on emulator and real device . Suddunly it give me app.android has stopped . The project only has MainPage.xaml
Viewing all 58056 articles
Browse latest View live


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