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

Getting last 4 characters from a string retrieved from a Database

$
0
0

I'm using Firebase Realtime Database and I'm getting a string from the database and displaying it in a view using XAML. In order to cut a string and get last 4 digits, I'd generally do

x:Name="string1"

x.xaml.xs

string1.Text.Substring(string1.Text.Length - 4)

but I'm getting string1 doesn't exist in the current context. Maybe it's because I have it inside a ListView and I'm binding string1?

`
<ListView.ItemTemplate>


<ViewCell.View>

                                    <Label x:Name="string1" VerticalTextAlignment="Center" Text="{Binding itemID}"/>
                                    <Label VerticalTextAlignment="Center" Text="{Binding item}" />

                            </ViewCell.View>
                        </ViewCell>
                    </DataTemplate>
                </ListView.ItemTemplate>
            </ListView>`

Need help debugging random crashes in GridCalc.cs

$
0
0

Hi, it's been a year or so that im getting random crashes in GridCalc, totally fail to repro, making it impossible for me to avoid. It's just random, on both iOS and Android, whatever forms version, being on latest atm.
Even worse, I cant seem to match Xamarin open source code i can find in inet with stacktrace lines numbers.
If anyone could could give me a direction to dig in, would be grateful for any clue:

12-12 16:08:53.456 I/MonoDroid( 7446): UNHANDLED EXCEPTION:
Thread started: <Thread Pool> #13
12-12 16:08:53.776 I/MonoDroid( 7446): System.NullReferenceException: Object reference not set to an instance of an object.
12-12 16:08:53.777 I/MonoDroid( 7446):   at Xamarin.Forms.Grid.MeasureStarredRows () [0x0017c] in D:\a\1\s\Xamarin.Forms.Core\GridCalc.cs:530 
12-12 16:08:53.777 I/MonoDroid( 7446):   at Xamarin.Forms.Grid.MeasureAndContractStarredRows (System.Double width, System.Double height, System.Double totalStarsHeight) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\GridCalc.cs:403 
12-12 16:08:53.778 I/MonoDroid( 7446):   at Xamarin.Forms.Grid.MeasureGrid (System.Double width, System.Double height, System.Boolean requestSize) [0x00117] in D:\a\1\s\Xamarin.Forms.Core\GridCalc.cs:510 
12-12 16:08:53.778 I/MonoDroid( 7446):   at Xamarin.Forms.Grid.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x0002a] in D:\a\1\s\Xamarin.Forms.Core\GridCalc.cs:58 
12-12 16:08:53.778 I/MonoDroid( 7446):   at Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:760 
12-12 16:08:53.778 I/MonoDroid( 7446):   at Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:642 
12-12 16:08:53.779 I/MonoDroid( 7446):   at Xamarin.Forms.Layout.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:131 
12-12 16:08:53.779 I/MonoDroid( 7446):   at Xamarin.Forms.VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) [0x00054] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:700 
12-12 16:08:53.779 I/MonoDroid( 7446):   at Xamarin.Forms.StackLayout.CalculateNaiveLayout (Xamarin.Forms.StackLayout+LayoutInformation layout, Xamarin.Forms.StackOrientation orientation, System.Double x, System.Double y, System.Double widthConstraint, System.Double heightConstraint) [0x00236] in D:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:198 
12-12 16:08:53.779 I/MonoDroid( 7446):   at Xamarin.Forms.StackLayout.CalculateLayout (Xamarin.Forms.StackLayout+LayoutInformation layout, System.Double x, System.Double y, System.Double widthConstraint, System.Double heightConstraint, System.Boolean processExpanders) [0x00058] in D:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:123 
12-12 16:08:53.779 I/MonoDroid( 7446):   at Xamarin.Forms.StackLayout.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00019] in D:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:80 
12-12 16:08:53.779 I/MonoDroid( 7446):   at Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:760 
12-12 16:08:53.779 I/MonoDroid( 7446):   at Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:642 
12-12 16:08:53.779 I/MonoDroid( 7446):   at Xamarin.Forms.Layout.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:131 
12-12 16:08:53.780 I/MonoDroid( 7446):   at Xamarin.Forms.VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) [0x00054] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:700 
12-12 16:08:53.780 I/MonoDroid( 7446):   at Xamarin.Forms.StackLayout.CalculateNaiveLayout (Xamarin.Forms.StackLayout+LayoutInformation layout, Xamarin.Forms.StackOrientation orientation, System.Double x, System.Double y, System.Double widthConstraint, System.Double heightConstraint) [0x00236] in D:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:198 
12-12 16:08:53.783 I/MonoDroid( 7446):   at Xamarin.Forms.StackLayout.CalculateLayout (Xamarin.Forms.StackLayout+LayoutInformation layout, System.Double x, System.Double y, System.Double widthConstraint, System.Double heightConstraint, System.Boolean processExpanders) [0x00058] in D:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:123 
12-12 16:08:53.783 I/MonoDroid( 7446):   at Xamarin.Forms.StackLayout.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00019] in D:\a\1\s\Xamarin.Forms.Core\StackLayout.cs:80 
12-12 16:08:53.784 I/MonoDroid( 7446):   at Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:760 
12-12 16:08:53.784 I/MonoDroid( 7446):   at Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:642 
12-12 16:08:53.784 I/MonoDroid( 7446):   at Xamarin.Forms.Layout.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:131 
12-12 16:08:53.784 I/MonoDroid( 7446):   at Xamarin.Forms.VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) [0x00054] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:700 
12-12 16:08:53.784 I/MonoDroid( 7446):   at Xamarin.Forms.ScrollView.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x0005d] in D:\a\1\s\Xamarin.Forms.Core\ScrollView.cs:233 
12-12 16:08:53.784 I/MonoDroid( 7446):   at Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:760 
12-12 16:08:53.784 I/MonoDroid( 7446):   at Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:642 
12-12 16:08:53.785 I/MonoDroid( 7446):   at Xamarin.Forms.Layout.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:131 
12-12 16:08:53.785 I/MonoDroid( 7446):   at Xamarin.Forms.VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) [0x00054] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:700 
12-12 16:08:53.785 I/MonoDroid( 7446):   at Xamarin.Forms.TemplatedView.OnSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x0003c] in D:\a\1\s\Xamarin.Forms.Core\TemplatedView.cs:39 
12-12 16:08:53.785 I/MonoDroid( 7446):   at Xamarin.Forms.VisualElement.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:760 
12-12 16:08:53.785 I/MonoDroid( 7446):   at Xamarin.Forms.VisualElement.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00053] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:642 
12-12 16:08:53.785 I/MonoDroid( 7446):   at Xamarin.Forms.Layout.GetSizeRequest (System.Double widthConstraint, System.Double heightConstraint) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:131 
12-12 16:08:53.786 I/MonoDroid( 7446):   at Xamarin.Forms.VisualElement.Measure (System.Double widthConstraint, System.Double heightConstraint, Xamarin.Forms.MeasureFlags flags) [0x00054] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:700 
12-12 16:08:53.786 I/MonoDroid( 7446):   at Xamarin.Forms.Layout.LayoutChildIntoBoundingRegion (Xamarin.Forms.VisualElement child, Xamarin.Forms.Rectangle region) [0x00110] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:165 
12-12 16:08:53.786 I/MonoDroid( 7446):   at Xamarin.Forms.AbsoluteLayout.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x00046] in D:\a\1\s\Xamarin.Forms.Core\AbsoluteLayout.cs:69 
12-12 16:08:53.787 I/MonoDroid( 7446):   at Xamarin.Forms.Layout.UpdateChildrenLayout () [0x0014b] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:263 
12-12 16:08:53.787 I/MonoDroid( 7446):   at Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:223 
12-12 16:08:53.787 I/MonoDroid( 7446):   at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:798 
12-12 16:08:53.787 I/MonoDroid( 7446):   at Xamarin.Forms.Layout+<>c.<OnChildMeasureInvalidated>b__45_0 () [0x00080] in D:\a\1\s\Xamarin.Forms.Core\Layout.cs:380 
12-12 16:08:53.787 I/MonoDroid( 7446):   at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in <ad2f15102b3a4d36b40e9b0cbc11c376>:0 
12-12 16:08:53.788 I/MonoDroid( 7446):   at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00009] in <ad2f15102b3a4d36b40e9b0cbc11c376>:0 

Google's Read SMS Permission

$
0
0

Have any one checked on how to use the auto retriever api from google in Xamarin.Forms PCL app? because now we cannot use the read sms permission to auto fetch the otp. So is there any help upon this?

Does have visual studio 2017 preview for xaml file?

$
0
0

Is there preview for xaml file by using visual studio 2017 like as WPF?

how to turn on/off OneSignal push notification

$
0
0

Hi xamarin forum

I have implemented OneSignal for push notification but I want to have a turn on off notification with a push of toggle button, How can I acheive it

app crash by editor control : focus search returned a view that wasn't able to take focus!

$
0
0

xamarin forms standard

look like a bug to me and I wonder how to bypass that..

[1]
on some devices the app crash when editor control got focus right after showing the keyboard.
[2]
(on my device) crashes after the clicking the done/next button when on landscape mode.
the error log in bellow.

so for [2] I tried to bypass that by:
having the editor int a frame parent control as so:

< Frame x:Name="frameEditor" IsTabStop="True" >
<Editor Margin="10"
x:Name="txtMemoriam"
HorizontalOptions="FillAndExpand"
AutoSize="TextChanges"
Placeholder="Memoriam"
Parent="frameEditor"

                        Completed="TxtMemoriam_Completed"
                        Focused="TxtMemoriam_Focused"

                        ></Editor>
                    </Frame>

so now: on landscape mode the "done" button change to "next" control...
and apparently, its give focus to DatePicker control (open the datepicker)... (it's unexpected Behavior but it prevents it from crashing...)

for the first issue, I have tried to set focus.. but i dont yet know if its working - cause its not crashing on my device (got the report from google play)..

private void TxtMemoriam_Completed(object sender, EventArgs e)
{
//txtMemoriam.Unfocus();
//frameEditor.Focus();
Xamarin.Forms.Device.BeginInvokeOnMainThread(() =>
{
Task.Delay(1).ContinueWith(x => { this.txtMemoriam.Focus(); });
Task.Delay(10).ContinueWith(x => { this.txtMemoriam.Focus(); });
Task.Delay(100).ContinueWith(x => { this.txtMemoriam.Focus(); });
Task.Delay(1000).ContinueWith(x => { this.txtMemoriam.Focus(); });
});
}

    private void TxtMemoriam_Focused(object sender, Xamarin.Forms.FocusEventArgs e)
    {
        this.txtMemoriam.Focus();

        Xamarin.Forms.Device.BeginInvokeOnMainThread(() =>
        {
            Task.Delay(1).ContinueWith(x => { this.txtMemoriam.Focus(); });           
            Task.Delay(10).ContinueWith(x => { this.txtMemoriam.Focus(); });
            Task.Delay(100).ContinueWith(x => { this.txtMemoriam.Focus(); });
            Task.Delay(1000).ContinueWith(x => { this.txtMemoriam.Focus(); });
        });


    }

Issue: java.lang.IllegalStateException: focus search returned a view that wasn't able to take focus!

FATAL EXCEPTION: main
Process: com.shaot.nosafot, PID: 14496
java.lang.IllegalStateException: focus search returned a view that wasn't able to take focus!
at android.widget.TextView.onKeyUp(TextView.java:6674)
at android.view.KeyEvent.dispatch(KeyEvent.java:2766)
at android.view.View.dispatchKeyEvent(View.java:9948)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at android.widget.ScrollView.dispatchKeyEvent(ScrollView.java:391)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1667)
at com.android.internal.policy.DecorView.superDispatchKeyEvent(DecorView.java:439)
at com.android.internal.policy.PhoneWindow.superDispatchKeyEvent(PhoneWindow.java:1861)
at android.support.v4.view.KeyEventDispatcher.activitySuperDispatchKeyEventPre28(KeyEventDispatcher.java:130)
at android.support.v4.view.KeyEventDispatcher.dispatchKeyEvent(KeyEventDispatcher.java:87)
at android.support.v4.app.SupportActivity.dispatchKeyEvent(ComponentActivity.java:126)
at android.support.v7.app.AppCompatActivity.dispatchKeyEvent(AppCompatActivity.java:535)
at android.support.v7.view.WindowCallbackWrapper.dispatchKeyEvent(WindowCallbackWrapper.java:59)
at android.support.v7.app.AppCompatDelegateImpl$AppCompatWindowCallback.dispatchKeyEvent(AppCompatDelegateImpl.java:2533)
at android.support.v7.view.WindowCallbackWrapper.dispatchKeyEvent(WindowCallbackWrapper.java:59)
at com.android.internal.policy.DecorView.dispatchKeyEvent(DecorView.java:353)
at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:4736)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4707)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4244)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4297)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4263)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4390)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4271)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4447)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4244)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4297)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4263)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4271)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4244)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6671)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6645)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6606)
at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:3915)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:6524)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:831)

When does a file used to display an image in a ListView get released?

$
0
0

In our app, we draw a sketch using SkiaSharp. OnSave, the sketch is saved to a file and the commands used by SkiaSharp to draw the image are saved to SQLite. That way, at a later time, in a LoadView, we can have a list of sketches to chose from in a ListView.

The sketches are displayed via a path to the images like this:
<Image Grid.Row="0" Grid.Column="0" Grid.RowSpan="3" Source="{Binding PhotoPath}" />

When an image is tapped that info is passed back to the SketchView where the details for creating the image are read from the table and displayed. If I make a small change (i.e. take very little time) and then save the Image over the previous version, sometimes I get the following exception:
Exception in SketchView.OnSaveButtonClicked: System.IO.IOException: The process cannot access the file <the file that I am trying to overwrite> because it is being used by another process.

It seems that if I spend more time adding to the sketch, or wait longer before tapping Save, that it is less likely to throw this exception.

I tried to only show the file name in the LoadView (i.e. no image). It is not a user friendly UI then, but it did not result in the Exception after around a dozen tries.

All that leads me to think that the LoadView hangs onto the images long after the View is closed. What can I do to free up that memory? What else should I consider?
Thanks!

Height of a WebView

$
0
0

I have a StackLayout with a WebView followed by some other controls. The WebView should be as high as its contents.

Unfortunately the WebView doesn't occupy any space at all unless I set its HeightRequest.

For Android I found this SO question which uses the ViewTreeObserver. I tried that in a custom renderer and I do get a height at some point in time, but when I tried to set the Layout of the WebView, then the controls below it will not move down. It I call ForceLayout() on the StackLayout, then the method is called recursively (even though I removed the PreDraw handler already).

private void ViewTreeObserver_PreDraw(object sender, ViewTreeObserver.PreDrawEventArgs e)
{
    var height = Control.ContentHeight;
    if(height > 0 && height != Element.Height && Element.HeightRequest <= 0)
    {
        Control.ViewTreeObserver.PreDraw -= ViewTreeObserver_PreDraw;
        Element.Layout(new Rectangle(Element.X, Element.Y, Element.Width, height));
        ((StackLayout)Element.Parent).ForceLayout();
    }
}

How can I set the Height of the WebView to be as high as its content on Android and iOS?


filter list using name

$
0
0

I have to filter list using name.
In my listview I have name and ID.
I have to filter the list using name enter by user.
I'm not going to use the searchbar.

Xamarin.Forms *needs* a hot reload system

$
0
0

Flutter is winning the hearts and minds of developers. I can see there is already jobs opening asking for flutter knowledge. Everywhere I read about flutter, people praise one functionality: "hot reload". I tested it and it is really nice. The thing is, flutter does not need it as much as XF. On flutter, things look the same on both devices so you do not spend so much time doing micro adjustments to the UI as on XF. The thing, I think, is that people learning need to see the changes they make to understand and learn. A person that does not know xaml will have a hard time even doing basic things look half decent. An experienced developer will have a hard time making things look exactly how he wants. It is possible but takes a lot of time.

I know about LiveXAML (http://www.livexaml.com/), I use it and it mostly works but it is not free. I know about XAMLator (https://github.com/ylatuya/XAMLator) and HotReload (https://github.com/AndreiMisiukevich/HotReload) but one only works on mac and the other I could not make work on android emulators. So, if this amazing developers are doing it, it is possible.

I think the most important thing for this feature is to be able to edit xaml on VS and see the change on emulators (android and iOS). It would be amazing if it could reload code changes too but only xaml will be a good start. It would be nice too if it could work without Visual Studio too, so I can edit .xaml files on VSCode and see the changes on my running app. This would make things so much better for experienced developers and for newcomers.

So my question is: when will Xamarin.Forms have an official hot reload system?

Is there a tinder-like interface available for Xamarin Forms that runs on IOS/Android/Windows Phone?

Xamarin forms Push notification

$
0
0

I want to add push notification in my xamarin forms project. Which method is the best option to implement push notification.

Run On Android Device Fails

$
0
0

The first thing this app does is create a SQLite entry and the app immediately fails when running on a real device with the "unfortunately stopped" message. From the ADB error list, it looks like it is failing on SQLite / so access. It didn't prompt for Storage permissions, but I added that and it still fails. This runs fine in the emulator. Any ideas or suggestions?

How to STOP Device.StartTimer mid flow

$
0
0

Hi all,

I have a number of buttons on my UI. Each button is intended to have 2 functions - a short press function and a long press function. When the user simply selects the button method_one is called. I want to implement the ability for the user to be able to press and hold the button for 5 seconds and call method_two.

I have been trying to use button.released to call method_one and use button.pressed to call Device.StartTimer for 5 seconds and method_two - which works but I cant figure out how to stop the timer called by onPress once the button is released and vice versa. I always receive both the button.pressed return and button.released return.

Please help :(

This is a snippet of what I have so far. The button.pressed is called from the XAML file

[code]`

public void OnAdminButtonPressed(object sender, EventArgs e)
{

            Device.StartTimer(TimeSpan.FromMilliseconds(5000.0), () =>
            {
                DisplayAlert("pressed", "5 seconds", "ok");
                return false;

            });         

    }


    public void OnAdminButtonReleased(object sender, EventArgs e)
    {

            Device.StartTimer(TimeSpan.FromMilliseconds(500.0), () =>
            {
                DisplayAlert("Released", "Immmediately Hopefully", "ok");
                return false;

            });          

    }

`
[/code]

HotReload LiveReload LiveXaml [Mac] [Windows] [nuget package] [opensource]


Hover Effect is not working properly on button in Xamarin UWP

$
0
0

I tried to add a hover effect for a button.
Following code shows a custom class created in UWP

[assembly: ResolutionGroupName("MyCompany")]
[assembly: ExportEffect(typeof(FocusEffect), "FocusEffect")]
namespace EffectsSample.UWP
{
    class FocusEffect : PlatformEffect
    {
        protected override void OnAttached()
        {
            try
            {
                (Control as Windows.UI.Xaml.Controls.Control).PointerEntered += pointer_Entered;    
            }
            catch (Exception ex)
            {
                Debug.WriteLine("Cannot set property on attached control. Error: ", ex.Message);
            }
        }
        private void pointer_Entered(object sender, RoutedEventArgs e)
        {           
            (this.Control as Windows.UI.Xaml.Controls.Control).Background = new SolidColorBrush(Colors.Red);   
        }         
        protected override void OnDetached()
        {
        }
       }
    }

Effect is added to button in xaml like below:

   <Button Text="Button">
        <Button.Effects>
            <local:FocusEffect />
        </Button.Effects>
    </Button>

The issue is that background is not changing on Pointer Enter Event. Instead it changes on Pointer Exit.
Any help will be appreciated!

爱荷华州立大学文凭〈ISU毕业证成绩单〉Q微信9105133留信认证/买美国爱荷华州立大学(精仿)毕业证成绩单,(真实)学历认证,使馆认证(回国人员证明)Iowa State University

$
0
0

爱荷华州立大学文凭〈ISU毕业证成绩单〉Q微信9105133留信认证/买美国爱荷华州立大学(精仿)毕业证成绩单,(真实)学历认证,使馆认证(回国人员证明)Iowa State University

纽约州立大学石溪分校文凭〈SBU毕业证成绩单〉Q微信9105133留信认证/买美国纽约州立大学石溪分校(精仿)毕业证成绩单,(真实)学历认证,使馆认证(回国人员证明)Stony Brook Unive

$
0
0

纽约州立大学石溪分校文凭〈SBU毕业证成绩单〉Q微信9105133留信认证/买美国纽约州立大学石溪分校(精仿)毕业证成绩单,(真实)学历认证,使馆认证(回国人员证明)Stony Brook University

加州州立大学北岭分校文凭〈CSUN毕业证成绩单〉Q微信9105133留信认证/买美国加州州立大学北岭分校(精仿)毕业证成绩单,(真实)学历认证,使馆认证(回国人员证明)California State

$
0
0

加州州立大学北岭分校文凭〈CSUN毕业证成绩单〉Q微信9105133留信认证/买美国加州州立大学北岭分校(精仿)毕业证成绩单,(真实)学历认证,使馆认证(回国人员证明)California State University, Northridge

加州州立大学东湾分校文凭〈CSUEB毕业证成绩单〉Q微信9105133留信认证/买美国加州州立大学东湾分校(精仿)毕业证成绩单,(真实)学历认证,使馆认证(回国人员证明)California Stat

$
0
0

加州州立大学东湾分校文凭〈CSUEB毕业证成绩单〉Q微信9105133留信认证/买美国加州州立大学东湾分校(精仿)毕业证成绩单,(真实)学历认证,使馆认证(回国人员证明)California State University, East Bay

Viewing all 91519 articles
Browse latest View live


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