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

Xamarin Forms Android z-Indexing issue

$
0
0

I created a gist (https://gist.github.com/johnnysbug/05c625f10f025ceb32cac29150e81bec#file-xamarin-forms-android-nougat-issue) to demonstrate the issue.

On Android API 19, I can place two children in a Grid so they overlap, and they render correctly with the first child sitting on top of the second, but in API 24, the first child sits behind the second, and even if I swap their order, it still renders incorrectly. I feel like it has something to do with one child being a Frame, since in the sample code, I have another Grid with two children in it and they render correctly on each API version.

API 24:

API 19:

This layout also works fine in iOS.

Any ideas? Am I missing something?


Xamarin Live and SQLite

$
0
0

I have an Error while working with Xamarin live using SQLite .. the project works fine in Windows and Andriod . but the below error occured with Xamarin live player:

"No body on Method SQLite.SQLiteAsyncConnection"

SQLiteDB Class:
[assembly: Dependency(typeof(SQLiteDb))] namespace HelloWorld.iOS { public class SQLiteDb : ISQLiteDb { public SQLiteAsyncConnection GetConnection() { var documentsPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); var path = Path.Combine(documentsPath, "MySQLite.db3"); return new SQLiteAsyncConnection(path); } } }

the caller is:
public UsingCRUD() { InitializeComponent(); _connection = DependencyService.Get<ISQLiteDb>().GetConnection(); }

Date splitter like in Viber

$
0
0

Hello, I'm trying to write messanger.
I'm using ListView control to display ObservableCollection. Messages are already sorted by date
How to implement "date splitter" in ListView like in Viber (Today, Yesterday, 25-07-2017, 24-07-2017).
Should i use Grouping for ObservableCollection or use DataTemplate to display "date splitter"?

Xamarin iOS crashes in Release Mode

$
0
0

I am having major issues with Xamarin. I am using Xamarin.Forms and it works fine for Android, but for iOS build it works perfectly in Debug, but when I do a release build the app crashes at the startup. Here are some logs I was able to capture:

Info (11667) / BrixnMobileUIiOS: Found new TLS offset at 224
Error (11667) / BrixnMobileUIiOS(UIKit): The app delegate must implement the window property if it wants to use a main storyboard file.
Info (11667) / BrixnMobileUIiOS: Xamarin.iOS: Unable to locate assembly 'Akavache.Mac' (culture: '')
Info (11667) / BrixnMobileUIiOS: Xamarin.iOS: Unable to locate assembly 'Akavache.Mac' (culture: '')
Info (11667) / BrixnMobileUIiOS: Xamarin.iOS: Unable to locate assembly 'Akavache.Deprecated' (culture: '')
Info (11667) / BrixnMobileUIiOS: Xamarin.iOS: Unable to locate assembly 'Akavache.Deprecated' (culture: '')
Info (11667) / BrixnMobileUIiOS: Xamarin.iOS: Unable to locate assembly 'Akavache.Mobile' (culture: '')
Info (11667) / BrixnMobileUIiOS: Xamarin.iOS: Unable to locate assembly 'Akavache.Mobile' (culture: '')
Info (11667) / BrixnMobileUIiOS: VideoPlayer [INFO]: Initializing Xamarin Forms Video Player on iPhone v10.3.2
Info (11667) / BrixnMobileUIiOS(AppleJPEG): [0x1057e8600] Created session
Info (11667) / BrixnMobileUIiOS: Xamarin.iOS: Unable to locate assembly 'ReactiveUI.XamForms' (culture: '')
Info (11667) / BrixnMobileUIiOS: Xamarin.iOS: Unable to locate assembly 'ReactiveUI.XamForms' (culture: '')
Info (11667) / BrixnMobileUIiOS: Xamarin.iOS: Unable to locate assembly 'ReactiveUI.Winforms' (culture: '')
Info (11667) / BrixnMobileUIiOS: Xamarin.iOS: Unable to locate assembly 'ReactiveUI.Winforms' (culture: '')
Info (11667) / BrixnMobileUIiOS: [Error] CurrentDomainOnUnhandledException
Info (11667) / BrixnMobileUIiOS: Unhandled managed exception:
Info (11667) / BrixnMobileUIiOS: critical: Stacktrace:
Info (11667) / BrixnMobileUIiOS: critical:
Info (11667) / BrixnMobileUIiOS: critical: 0 BrixnMobileUIiOS 0x0000000103c0facc WebPGetDecoderVersion + 323252
Info (11667) / BrixnMobileUIiOS: critical: 1 libsystem_platform.dylib 0x000000018cbb131c _sigtramp + 52
Info (11667) / BrixnMobileUIiOS: critical: 2 libsystem_pthread.dylib 0x000000018cbb7264 pthread_kill + 112
Info (11667) / BrixnMobileUIiOS: critical: 3 libsystem_c.dylib 0x000000018ca619c4 abort + 140
Info (11667) / BrixnMobileUIiOS: critical: 4 BrixnMobileUIiOS 0x0000000103d46d28 xamarin_get_block_descriptor + 4588
Info (11667) / BrixnMobileUIiOS: critical: 5 BrixnMobileUIiOS 0x0000000103c557f4 WebPGetDecoderVersion + 609244
Info (11667) / BrixnMobileUIiOS: critical: 6 BrixnMobileUIiOS 0x0000000103c0f5cc WebPGetDecoderVersion + 321972
Info (11667) / BrixnMobileUIiOS: critical: 7 BrixnMobileUIiOS 0x0000000103c0e5f0 WebPGetDecoderVersion + 317912
Info (11667) / BrixnMobileUIiOS: critical: 8 BrixnMobileUIiOS 0x0000000103c06580 WebPGetDecoderVersion + 285032
Info (11667) / BrixnMobileUIiOS: critical: 9 BrixnMobileUIiOS 0x0000000100775798 sqlite3_db_readonly + 6676600
Info (11667) / BrixnMobileUIiOS: critical: 10 BrixnMobileUIiOS 0x00000001005103fc sqlite3_db_readonly + 4164828
Info (11667) / BrixnMobileUIiOS: critical: 11 BrixnMobileUIiOS 0x0000000100513ae4 sqlite3_db_readonly + 4178884
Info (11667) / BrixnMobileUIiOS: critical: 12 BrixnMobileUIiOS 0x0000000101fef498 sqlite3_db_readonly + 32341368
Info (11667) / BrixnMobileUIiOS: critical: 13 BrixnMobileUIiOS 0x00000001019da454 sqlite3_db_readonly + 25963828
Info (11667) / BrixnMobileUIiOS: critical: 14 BrixnMobileUIiOS 0x000000010071bcd4 sqlite3_db_readonly + 6309300
Info (11667) / BrixnMobileUIiOS: critical: 15 BrixnMobileUIiOS 0x0000000103c1e6a8 WebPGetDecoderVersion + 383632
Info (11667) / BrixnMobileUIiOS: critical: 16 BrixnMobileUIiOS 0x0000000103c9843c WebPGetDecoderVersion + 882724
Info (11667) / BrixnMobileUIiOS: critical: 17 BrixnMobileUIiOS 0x0000000103c98398 WebPGetDecoderVersion + 882560
Info (11667) / BrixnMobileUIiOS: critical: 18 BrixnMobileUIiOS 0x0000000103b33be4 sqlite3_db_readonly + 60933316
Info (11667) / BrixnMobileUIiOS: critical: 19 BrixnMobileUIiOS 0x0000000103b3aa3c sqlite3_db_readonly + 60961564
Info (11667) / BrixnMobileUIiOS: critical: 20 Foundation 0x000000018e5e64cc + 340
Info (11667) / BrixnMobileUIiOS: critical: 21 CoreFoundation 0x000000018daa142c + 24
Info (11667) / BrixnMobileUIiOS: critical: 22 CoreFoundation 0x000000018daa0d04 + 388
Info (11667) / BrixnMobileUIiOS: critical: 23 CoreFoundation 0x000000018da9e9a8 + 744
Info (11667) / BrixnMobileUIiOS: critical: 24 CoreFoundation 0x000000018d9ceda4 CFRunLoopRunSpecific + 424
Info (11667) / BrixnMobileUIiOS: critical: 25 GraphicsServices 0x000000018f438074 GSEventRunModal + 100
Info (11667) / BrixnMobileUIiOS: critical: 26 UIKit 0x0000000193c89058 UIApplicationMain + 208
Info (11667) / BrixnMobileUIiOS: critical: 27 BrixnMobileUIiOS 0x0000000102270f64 sqlite3_db_readonly + 34969668
Info (11667) / BrixnMobileUIiOS: critical: 28 BrixnMobileUIiOS 0x0000000101bbbfcc sqlite3_db_readonly + 27936940
Info (11667) / BrixnMobileUIiOS: critical: 29 BrixnMobileUIiOS 0x0000000101bbbe8c sqlite3_db_readonly + 27936620
Info (11667) / BrixnMobileUIiOS: critical: 30 BrixnMobileUIiOS 0x00000001001ff554 sqlite3_db_readonly + 949812
Info (11667) / BrixnMobileUIiOS: critical: 31 BrixnMobileUIiOS 0x000000010071bcd4 sqlite3_db_readonly + 6309300
Info (11667) / BrixnMobileUIiOS: critical: 32 BrixnMobileUIiOS 0x0000000103c1e6a8 WebPGetDecoderVersion + 383632
Info (11667) / BrixnMobileUIiOS: critical: 33 BrixnMobileUIiOS 0x0000000103c9843c WebPGetDecoderVersion + 882724
Info (11667) / BrixnMobileUIiOS: critical: 34 BrixnMobileUIiOS 0x0000000103c9b660 WebPGetDecoderVersion + 895560
Info (11667) / BrixnMobileUIiOS: critical: 35 BrixnMobileUIiOS 0x0000000103c02f04 WebPGetDecoderVersion + 271084
Info (11667) / BrixnMobileUIiOS: critical: 36 BrixnMobileUIiOS 0x0000000103d4b8f0 xamarin_localized_string_format_9 + 3196
Info (11667) / BrixnMobileUIiOS: critical: 37 BrixnMobileUIiOS 0x0000000103bbc530 sqlite3_db_readonly + 61492752
Info (11667) / BrixnMobileUIiOS: critical: 38 libdyld.dylib 0x000000018c9dd59c + 4

Regarding "The app delegate must implement the window property if it wants to use a main storyboard file.", I did put UIWindow Window override and it removed that warning but crash still occurs.

I can see it also complains about some assemblies, but I either don't use those or they are present. My linker option is set to "Don't Link". In debug everything runs fine without any problems. I am really lost here....

OxyPlot graph not displaying

$
0
0

Hi,

I have simple page with an OxyPlot graph in it :smile:
` <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"

         xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
         x:Class="Xamareview.Views.StatisticsPage"
         xmlns:prism="clr-namespace:Prism.Mvvm;assembly=Prism.Forms"
         prism:ViewModelLocator.AutowireViewModel="True"
         NavigationPage.HasNavigationBar="false"
         xmlns:oxy="clr-namespace:OxyPlot.Xamarin.Forms;assembly=OxyPlot.Xamarin.Forms">
<Grid>
    <oxy:PlotView Model="{Binding GraphModel}" BackgroundColor="Blue"/>
</Grid>


`

I put the background color to blue to make sure it is present and the whole page becomes blue.

And here's how I set it. It's based on the samples :

`
this.graphModel = new PlotModel();
this.GraphModel.Title = "Test plot model";
this.GraphModel.Subtitle = "subtitle test";

        this.GraphModel.Axes.Add(new LinearAxis
        {
            Position = AxisPosition.Left,
            Minimum = -5.00,
            Maximum = 5.00,
            MajorStep = 1,
            MinorStep = 0.25,
            TickStyle = TickStyle.Inside
        });

        this.GraphModel.Axes.Add(new LinearAxis{
            Position = AxisPosition.Bottom,
            Minimum = 0,
            Maximum = 10.00,
            MajorStep = 1,
            MinorStep = 0.25,
            TickStyle = TickStyle.Inside
        });

        this.GraphModel.Series.Add(CreateNormalDistributionSeries(-5, 5, 0, 0.2));
        this.GraphModel.Series.Add(CreateNormalDistributionSeries(-5, 5, 0, 1));
        this.GraphModel.Series.Add(CreateNormalDistributionSeries(-5, 5, 0, 5));
        this.GraphModel.Series.Add(CreateNormalDistributionSeries(-5, 5, -2, 0.5));
    }`

Did anyone experience the same issue ? Any idea why my graph is not showing ?

Thank you.

Xamarin.iOS App crashes during async call of SQLite Connection

$
0
0

I am working on a Xamarin.iOS project. I would like to insert some data into my SQLite database. When i try to do this I get the following exception only on my devices (iPhone 5s & iPad2).

The thread 'Unknown' (0x12) has exited with code 0 (0x0).
[0:] Object reference not set to an instance of an object
[0:] at System.Threading.Tasks.Task.AddTaskContinuationComplex (System.Object tc, System.Boolean addBeforeOthers) [0x00009] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/threading/Tasks/Task.cs:4747
at System.Threading.Tasks.Task.AddTaskContinuation (System.Object tc, System.Boolean addBeforeOthers) [0x00023] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/threading/Tasks/Task.cs:4817
at System.Threading.Tasks.Task.SetContinuationForAwait (System.Action continuationAction, System.Boolean continueOnCapturedContext, System.Boolean flowExecutionContext, System.Threading.StackCrawlMark& stackMark) [0x00063] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/threading/Tasks/Task.cs:3019
at System.Runtime.CompilerServices.TaskAwaiter.OnCompletedInternal (System.Threading.Tasks.Task task, System.Action continuation, System.Boolean continueOnCapturedContext, System.Boolean flowExecutionContext) [0x00010] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:223
at System.Runtime.CompilerServices.TaskAwaiter1[TResult].UnsafeOnCompleted (System.Action continuation) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:347 at (wrapper managed-to-native) System.Object:__icall_wrapper_mono_gsharedvt_constrained_call (intptr,intptr,intptr,intptr,intptr) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1[TResult].AwaitUnsafeOnCompleted[TAwaiter,TStateMachine] (TAwaiter& awaiter, TStateMachine& stateMachine) [0x0004c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:559
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:151
at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__6_1 (System.Object state) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1034
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (System.Object state) [0x0000d] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/threading/threadpool.cs:1306
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:957
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:904
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00021] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/threading/threadpool.cs:1283
at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00074] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/threading/threadpool.cs:856
at ObjCRuntime.Runtime.ThreadPoolDispatcher (System.Func`1[TResult] callback) [0x00006] in /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/ObjCRuntime/Runtime.cs:231
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00009] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/threading/threadpool.cs:1208
[0:]
The app has been terminated.

The main problem is that it is working perfectly fine on Android, UWP and even on the iOS emulator.
In the code below you see the SQLLite connection which i try to use:

var _database = new SQLiteAsyncConnection(path,SQLiteOpenFlags.ReadWrite | SQLiteOpenFlags.Create | SQLiteOpenFlags.FullMutex);
var result = await _database.UpdateAsync(model);

After connecting the program continues gets some models from my WebAPI. Then I want to insert the models into my database but the exception listed above is occuring.

Could it be that I have to set any permissions on my devices or is it possible that there is a thread in the background which is not working correctly?

Any answers or tips would be great.

Kind regards,

Daniel

Could not connect to the debugger after Mac Update

$
0
0

Hello,
After I have update my iOS version on my mac, i can't deploy a debug app on the android emulator now. Do you know a solution ?
ERROR : "Could not connect to the debugger"
Thanks.

Nested ListView in Xamarin.Forms (ListView inside another ListView)

$
0
0

I have created a nested ListView in Xamarin.
But unfortunately, the binding works only with the Parent ListView and NOT with the Child List - sub ListView.

I tried to verify if there is any error with my Binding, and my binding works well with the sub List, if i make it as parent.
Any help on this binding, or approach for nested ListView bindings in Xamarin with samples would be much helpful.


How to access the collection used in ListView.ItemTemplate within ListView.GroupHeaderTemplate?

$
0
0

Hi, I need to access the OnOff property in a Switch within the ListView.GroupHeaderTemplate this property is in the collection used by ListView.ItemTemplate, I have tried in many ways without success, has anyone ever had this problem?

           <ListView
            ItemsSource="{Binding ItemsGrouped}"
            GroupShortNameBinding="{Binding Key}"
            IsGroupingEnabled="true"
            GroupDisplayBinding="{Binding Key}"
            x:Name="ListViewAllDevices">


            <ListView.ItemTemplate>
                <DataTemplate>
                        <ViewCell.View>
                            <StackLayout>
                                        <Label Text="{Binding Title}"/>
                                        <Label Text="{Binding Description}"/>
                            </StackLayout>
                        </ViewCell.View>
                    </ViewCell>
                </DataTemplate>
            </ListView.ItemTemplate>


            <ListView.GroupHeaderTemplate>
                <DataTemplate>
                    <ViewCell>
                        <ViewCell.View>
                            <StackLayout>
                <Label Text="{Binding Key}" />
                                    <Switch IsToggled="{Binding OnOff, Source={x:Reference Name=ListViewAllDevices}}"/>
                            </StackLayout>
                        </ViewCell.View>
                    </ViewCell>
                </DataTemplate>
            </ListView.GroupHeaderTemplate>

Preview: Xamarin.Forms for macOS

$
0
0

I hope you are taking an opportunity with the latest pre-release 2.3.5.233-pre1 to experience your Xamarin.Forms apps running on macOS. It's a trip.

We want to kick off a thread to have some ongoing discussion about what's missing, what's not working, and where you'd like to see this go.

Please keep the discussion here on topic: macOS.

Forms project and obfuscation

$
0
0

I have some experience obfuscating Xamarin Android projects but I'm hitting a wall with Xamarin Forms. The linker does not accept the obfuscated DLL.

Has anyone gotten an obfuscator to work with Xamarin Forms? If so, which?

Thank you all.

Detecting tap on different controls inside a listview cell

$
0
0

Two questions:

In Xamarin.Forms, I have a listview. Each item is a ViewCell containing button, labels, images etc.

First, I want to detect tap on each item inside a ViewCell. Meaning tap on label, tap on image. All separately. How do I do this?

Secondly, how do I uniquely identify my labels/images inside each item so that I know exactly which label/image was tapped since a list view will have multiple items each having its own label/image.

Thanks.

Android App Crashing

$
0
0

I updated to the prelease version of Xamarin.Forms 2.3.5.256-pre6 to take advantage of the .netstandard goodness and tested my app on android and it's blowing up. I cleared out my bin and obj folders for good measure and that did not help. I also tried running on android 7 & 6, and I'm seeing the same behavior.

07-27 07:28:14.262 E/mono ( 5787): Unhandled Exception:
07-27 07:28:14.262 E/mono ( 5787): Java.Lang.NoSuchMethodError: no static method "Lcom/xamarin/forms/platform/android/FormsViewGroup;.sendViewBatchUpdate(Landroid/view/View;FFIZFFFFFFF)V"
07-27 07:28:14.262 E/mono ( 5787): --- End of managed Java.Lang.NoSuchMethodError stack trace ---
07-27 07:28:14.262 E/mono ( 5787): java.lang.NoSuchMethodError: no static method "Lcom/xamarin/forms/platform/android/FormsViewGroup;.sendViewBatchUpdate(Landroid/view/View;FFIZFFFFFFF)V"
07-27 07:28:14.262 E/mono ( 5787): at md5b60ffeb829f638581ab2bb9b1a7f4f3f.VisualElementTracker_AttachTracker.n_onViewAttachedToWindow(Native Method)
07-27 07:28:14.262 E/mono ( 5787): at md5b60ffeb829f638581ab2bb9b1a7f4f3f.VisualElementTracker_AttachTracker.onViewAttachedToWindow(VisualElementTracker_AttachTracker.java:31)
07-27 07:28:14.262 E/mono ( 5787): at android.view.View.dispatchAttachedToWindow(View.java:13727)
07-27 07:28:14.262 E/mono ( 5787): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2841)
07-27 07:28:14.262 E/mono ( 5787): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2841)
07-27 07:28:14.262 E/mono ( 5787): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2841)
07-27 07:28:14.262 E/mono ( 5787): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2841)
07-27 07:28:14.262 E/mono ( 5787): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2841)
07-27 07:28:14.262 E/mono ( 5787): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2841)
07-27 07:28:14.262 E/mono ( 5787): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2841)
07-27 07:28:14.262 E/mono ( 5787): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2841)
07-27 07:28:14.262 E/mono ( 5787): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2841)
07-27 07:28:14.262 E/mono ( 5787): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1551)
07-27 07:28:14.262 E/mono ( 5787): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1292)
07-27 07:28:14.262 E/mono ( 5787): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6598)
07-27 07:28:14.262 E/mono ( 5787): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:800)
07-27 07:28:14.262 E/mono ( 5787): at android.view.Choreographer.doCallbacks(Choreographer.java:603)
07-27 07:28:14.262 E/mono ( 5787): at android.view.Choreographer.doFrame(Choreographer.java:572)
07-27 07:28:14.262 E/mono ( 5787): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:786)
07-27 07:28:14.262 E/mono ( 5787): at android.os.Handler.handleCallback(Handler.java:815)
07-27 07:28:14.262 E/mono ( 5787): at android.os.Handler.dispatchMessage(Handler.java:104)
07-27 07:28:14.262 E/mono ( 5787): at android.os.Looper.loop(Looper.java:194)
07-27 07:28:14.262 E/mono ( 5787): at android.app.ActivityThread.main(ActivityThread.java:5631)
07-27 07:28:14.262 E/mono ( 5787): at java.lang.reflect.Method.invoke(Native Method)
07-27 07:28:14.262 E/mono ( 5787): at java.lang.reflect.Method.invoke(Method.java:372)
07-27 07:28:14.262 E/mono ( 5787): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959)
07-27 07:28:14.262 E/mono ( 5787): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754)

How to find the NuGet-package which requests certain permissions?

$
0
0

According to Apple (mail after uploading an app) I request certain permissions:

Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSContactsUsageDescription key with a string value explaining to the user how the app uses this data.
Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCalendarsUsageDescription key with a string value explaining to the user how the app uses this data.
Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSMicrophoneUsageDescription key with a string value explaining to the user how the app uses this data.
Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSAppleMusicUsageDescription key with a string value explaining to the user how the app uses this data.
Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSSiriUsageDescription key with a string value explaining to the user how the app uses this data.

In my code I don't use one of the listed things. I think that one of the NuGet packages will request these rights.
Is there a way to find the package(s)?

Thanks!

NavigationPage.SetHasNavigationBar not working on Android

$
0
0

Hello!
I want to hide the navigation bar on a Forms-Xaml-cross platform app. I'm using NavigationPage.SetHasNavigationBar and it works on iOS but Android keeps showing the bar

public Login ()
{
NavigationPage.SetHasNavigationBar (this, false);
InitializeComponent ();
}

I have tried to write SetHasNavigationBar after InitializeComponent but still does not work. What I am doing wrong?


Suppot of TLS 1.2 for Xamarin.forms targeting Android 4.2.2

$
0
0

Hello,

This is probably Android specific question, but anyway I will try to ask for help from experts.
I have requirement to target Android 4.2.2 and to support TLS 1.2.

Is TLS 1.2 supported by default on Android 4.2.2? If no can I do something to enable it? Can i do that by calling some native API through Xamarin or I need to do this nativelly in Android?

Thanks

Portrait/Landscape and StatusBar iOS

$
0
0

Hello all ,

I want to change orientation of my screen at some moment so on android i have this :

((MainActivity)activity).RequestedOrientation = ScreenOrientation.Landscape; //or ((MainActivity)activity).RequestedOrientation = ScreenOrientation.Portrait;

(1) How can i do that on iOS? Any idea?

(2) I want to disable status bar on top on iOS . It's possible? how can i do that?

Thanks in advance.

Center view with proportional width only

$
0
0

Hi,
I am making a login page. There is a small view (frame) in the middle that fills 50% of the width, and the height just takes whatever it needs. Is this possible?
In all the ways I know, you either have to set both height and width to a proportional value, and then you can center (using LayoutBounds and LayoutFlags), but I dont want the height to be proportional. I think maybe I could center the frame in a stackview, but I guess then I wont have the proportional width.
I can also use math in code to just move the window, but I preffer keeping it in XAML; there must be a simple way to fix such an easy thing, right?

This is my current code. It is not working properly, because the anchor point of the frame is at 0,0, and not in the middle, so its filling up 50%-100% of the width instead of 25%-75%:

<?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="MariusVipApp.Login">
    <RelativeLayout HorizontalOptions="FillAndExpand"
                VerticalOptions="FillAndExpand"
                BackgroundColor="#008aff">

    <Frame CornerRadius="15"
           OutlineColor="DarkGray"
           BackgroundColor="White"
           RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.5}"
           RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=0.5}"
           RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.5}">
        <StackLayout Orientation="Vertical">
            <Label x:Name="labelUsername"
                   FontAttributes="Bold">

            </Label>
            <Entry x:Name="entryUsername"
                   FontAttributes="Bold"
                   HorizontalTextAlignment="Start">

            </Entry>
            <Label x:Name="labelPassword"
                   FontAttributes="Bold">

            </Label>
            <Entry x:Name="entryPassword"
                   HorizontalTextAlignment="Start"
                   FontAttributes="Bold"
                   IsPassword="True">

            </Entry>
        </StackLayout>
    </Frame>
    </RelativeLayout>
</ContentPage>

Getting Screen Elements to Respond Immediately

$
0
0

I'm working in Xamarin.Forms. I have a button that does some work before returning from that page. This causing a visually jarring lag. I'd like to prevent users from getting impatient by creating an ActivityIndicator so that they are aware the app has not frozen and is responding. I can place the element just fine. The method called from the button has a line changing the bounded boolean value. However despite being in two way mode and implementing OnPropertyChanged, I cannot get the loading animation to appear before the page freezes while working.

How to use Carousel View like Carousel page ?

$
0
0

It seems like carousel page is removed, i cant find the template. I need to use carousel view like carousel page. I dont want to use item binding. I want to simply embed 3 pages like below. is it even possible?





Viewing all 91519 articles
Browse latest View live