Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all 204402 articles
Browse latest View live

Is it possible to share Categories/Extensions between iOS and Android ?

$
0
0

Objective C has what are called "categories" essentially it is a way that you can add additional functionality to existing components for example UIColor if you want you can add your own custom RGB colors to the native UIColor. Xamarin allows this same functionality through Extensions, is there a way to make an extension cross platform ?


Is there a way to update a progress bar view while a content page is loading?

$
0
0

This may sound like a weird question. However, I'm working a ContentPage that loads many views inside a scrollview control and it takes over 10 seconds for the page to actually display. While the page is loading the application UI does not update and so it looks like nothing is happening. I tried to add an animation or a progress bar, but neither updates while the views continue to be loaded inside the scrollview. I've tried all sort of combinations of async/await and Device.BeginInvokeOnMainThread blocks to make the process faster, but bottom line is I need a way to force an update on the progress bar or animation manually. I don't see an 'Invalidate' or similar method to force the progress bar update. What's the best way to do this?

Also, when does the UI is finally updated? When it goes into idle? The UI refresh/update seems to be totally under Xamarin Forms Layout logic. Is there a way to invalidate a content page at will?

Thanks,
Ignacio

Xamarin.Forms 2.0 issues

$
0
0

I just recompiled my project with Xamarin.Forms 2.0 and found Application.Current.SavePropertiesAsync is not working as expected in "Release" mode.

I used the following code to save the login email

Application.Current.Properties ["LoginEmail"] = loginInfo.Email;
await Application.Current.SavePropertiesAsync ();

and then load it when the app starts.
if (Application.Current.Properties.ContainsKey ("LoginEmail")) {
c_email.Text = (string)Application.Current.Properties ["LoginEmail"];
}

But now, I cannot load the saved email any more. The strange thing is, it still works in debug mode. Can anyone help me out?. It will be a big headache for me to rollout an update.

Thanks.

Application.Current.Properties dont work in Xamarin 2.0

$
0
0

Hi!
Today I have updated my project and Application.Current.Properties dont work correctly. I could save value and read it while my app running, but is i stop and run agarin, Application.Current.Properties is empty. Thank you for help.

Unable to find a version of XF compatible with...

$
0
0

I have 5 packages (Xamarin.Android.Support....) that can be updated, but I have this error (for all packages...)

Attempting to resolve dependency 'Xamarin.Android.Support.v7.AppCompat (= 23.1.1.0)'.
Attempting to resolve dependency 'Xamarin.Android.Support.v4 (= 23.1.1.0)'.
Looking for updates for 'Xamarin.Android.Support.v7.MediaRouter'...
Updating 'Xamarin.Android.Support.v7.MediaRouter' from version '23.0.1.3' to '23.1.1.0' in project 'CRMLight.Droid'.
Updating 'Xamarin.Android.Support.v7.MediaRouter 23.0.1.3' to 'Xamarin.Android.Support.v7.MediaRouter 23.1.1.0' failed. Unable to find a version of 'Xamarin.Forms' that is compatible with 'Xamarin.Android.Support.v7.MediaRouter 23.1.1.0'.

How to bind HTML String to WebView?

$
0
0

I've got a bindable string that's populated with HTML.

    public string Description
    {
        get { return _description; }
        set
        {
            _description = value;
            OnPropertyChanged();
        }
    }

Now I'd like that string to be bound to a webview

  <WebView Source="{Binding Description}" VerticalOptions ="FillAndExpand"/>

but this isn't working. Unfortunately the Docs for WebViewSource hasn't been entered yet.

How can I bind a string of HTML to a WebView?

Listview or other tool with paging or pull to refresh?

$
0
0

I am trying display a list of rss news on my xaml. but each item in the list has long text with images. on the screen it will be visible only 1 news item anyway.
can I do kind of paging or some kind of pull-to-refresh if i dont want to bind all items at once? It doesnt have to listview but any other tool can be as well.

Icon image on Toolbar item in xamarin Forms

$
0
0

Hi,
I'm creating all forms UI with the code using the Shared project. I want to add the icon image to the toolbar item. Can anyone guide me how can I achieve the same ? I could not find a suitable example in the docs section of Working with images. They mostly deal with the Local and Embedded Images. The sample code should work for all the platforms.

Thanks


masked entry *Android*

$
0
0

just adding a control I made for Xamarin Forms. still in beta testing but seems to work ok on Android. just giving back for all the great code I have seen from github projects. :)

https://github.com/amccorma/xamarin-amccorma

For now, only Android. But, IOS be up soon.

Mask Entry Box that will format the text based on the rules supplied to it.

entry = new MyEntry ();
entry.Text = "";
entry.Keyboard = Keyboard.Numeric;
entry.FormatCharacters = "-";

Format Characters: (FormatCharacters)
"-" : dash
"-(/" : multiple characters

Rules definition:

new MaskRules { Start = 0, End = 3, Mask = "" }
new MaskRules { Start = 4, End = 6, Mask = "{0:3}-{3:}"}
new MaskRules { Start = 7, End = 10, Mask = "{0:3}-{3:3}-{6:}"}
new MaskRules { Start = 10, End = 20, Mask = "{0:}"}

Mask Format:
{0:3}: take the first 3 characters
{3:3}: start at character 3 and take 3 characters
{0:}: apply no mask. take all the characters and output them
{6:3}: start at character 6 and take 3 characters

Final mask:
999-999-9999 if less than 10 characters
if 10 characters to 20, use {0:}. just output the text

Text Length from 0 to 3 characters. apply the Mask "". Mask = "", no formatting
new MaskRules { Start = 0, End = 3, Mask = "" }

Text Length from 0 to 3 characters. apply the Mask "{0:3}-{3:}".
{0:3}: first 3 characters
followed by a "-"
next three characters {3:0}
new MaskRules { Start = 4, End = 6, Mask = "{0:3}-{3:}"}

Text Length from 0 to 3 characters. apply the Mask "{0:3}-{3:}".
{0:3}: first 3 characters
followed by a "-"
next three characters {3:0}
add a "-"
next characters use (6:0}
new MaskRules { Start = 7, End = 10, Mask = "{0:3}-{3:3}-{6:}"}

Text Length from 10 to 20 characters.
20 characters MAX Length
apply the Mask "{0:} is the same as no Mask.
new MaskRules { Start = 10, End = 20, Mask = "{0:}"}

Upgrading Xamarin.Android.Support.v7.AppCompat to 22.1.1.1 causes run time errors

$
0
0

I'm completely stumped, I've spent the whole day trying to fix this. Upgraded to version 22.1.1.1 this morning, now my app crashes when it first loads. I tried reverting back to the previous version I was using by changing packages.config but I get the same error. Here's a stack trace:

[monodroid] Using override path: /data/data/com.upside.homecarecrm/files/.__override__
[monodroid] Trying to load sgen from: /data/data/com.upside.homecarecrm/files/.__override__/libmonosgen-2.0.so
[monodroid] Trying to load sgen from: /storage/emulated/0/Android/data/com.upside.homecarecrm/files/.__override__/libmonosgen-2.0.so
[monodroid] Trying to load sgen from: /data/app/com.upside.homecarecrm-1/lib/x86/libmonosgen-2.0.so
[monodroid-gc] GREF GC Threshold: 46080
[art] JNI RegisterNativeMethods: attempt to register 0 native methods for md5798f8cbca9b72d122273369a7ced6c6f.ReactiveActionBarActivity_1
[MonoDroid] UNHANDLED EXCEPTION:
[MonoDroid] Java.Lang.Exception: Binary XML file line #17: Error inflating class android.support.v7.internal.widget.FitWindowsLinearLayout ---> Java.Lang.ClassNotFoundException: Didn't find class "android.support.v7.internal.widget.FitWindowsLinearLayout" on path: DexPathList[[zip file "/data/app/com.upside.homecarecrm-1/base.apk"],nativeLibraryDirectories=[/data/app/com.upside.homecarecrm-1/lib/x86, /vendor/lib, /system/lib]]
[MonoDroid]   --- End of managed exception stack trace ---
[MonoDroid] java.lang.ClassNotFoundException: Didn't find class "android.support.v7.internal.widget.FitWindowsLinearLayout" on path: DexPathList[[zip file "/data/app/com.upside.homecarecrm-1/base.apk"],nativeLibraryDirectories=[/data/app/com.upside.homecarecrm-1/lib/x86, /vendor/lib, /system/lib]]
[MonoDroid]     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
[MonoDroid]     at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
[MonoDroid]     at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
[MonoDroid]     at android.view.LayoutInflater.createView(LayoutInflater.java:571)
[MonoDroid]     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)
[MonoDroid]     at android.view.LayoutInflater.inflate(LayoutInflater.java:482)
[MonoDroid]     at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
[MonoDroid]     at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
[MonoDroid]     at android.support.v7.app.AppCompatDelegateImplV7.ensureSubDecor(AppCompatDelegateImplV7.java:321)
[MonoDroid]     at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:246)
[MonoDroid]     at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:106)
[MonoDroid]     at md58408e5fa51a388631c51cf1d5a14b403.AutoLoginActivity.n_onCreate(Native Method)
[MonoDroid]     at md58408e5fa51a388631c51cf1d5a14b403.AutoLoginActivity.onCreate(AutoLoginActivity.java:28)
[MonoDroid]     at android.app.Activity.performCreate(Activity.java:5990)
[MonoDroid]     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
[MonoDroid]     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
[MonoDroid]     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
[MonoDroid]     at android.app.ActivityThread.access$800(ActivityThread.java:151)
[MonoDroid]     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
[MonoDroid]     at android.os.Handler.dispatchMessage(Handler.java:102)
[MonoDroid]     at android.os.Looper.loop(Looper.java:135)
[MonoDroid]     at android.app.ActivityThread.main(ActivityThread.java:5254)
[MonoDroid]     at java.lang.reflect.Method.invoke(Native Method)
[MonoDroid]     at java.lang.reflect.Method.invoke(Method.java:372)
[MonoDroid]     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
[MonoDroid]     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
[MonoDroid]     Suppressed: java.lang.ClassNotFoundException: android.support.v7.internal.widget.FitWindowsLinearLayout
[MonoDroid]         at java.lang.Class.classForName(Native Method)
[MonoDroid]         at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
[MonoDroid]         at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
[MonoDroid]         at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
[MonoDroid]         ... 24 more
[MonoDroid]     Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
[MonoDroid]   --- End of inner exception stack trace ---
[MonoDroid]   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0xa28e3a28 + 0x0002b> in <filename unknown>:0 
[MonoDroid]   at Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (IntPtr jobject, IntPtr jclass, IntPtr jmethod, Android.Runtime.JValue* parms) <0xa2a370f8 + 0x000b3> in <filename unknown>:0 
[MonoDroid]   at Android.App.Activity.SetContentView (Int32 layoutResID) <0xa28e2408 + 0x0014f> in <filename unknown>:0 
[MonoDroid]   at HomeCareCRM.Android.Views.AutoLoginActivity.OnCreate (Android.OS.Bundle savedInstanceState) <0xa2a12eb0 + 0x00039> in <filename unknown>:0 
[MonoDroid]   at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (IntPtr jnienv, IntPtr native__this, IntPtr native_savedInstanceState) <0xa2a12dd8 + 0x00057> in <filename unknown>:0 
[MonoDroid]   at (wrapper dynamic-method) System.Object:9ebc74eb-7366-4fff-a2ac-05f7884137f8 (intptr,intptr,intptr)
[MonoDroid]   --- End of managed exception stack trace ---
[MonoDroid] android.view.InflateException: Binary XML file line #17: Error inflating class android.support.v7.internal.widget.FitWindowsLinearLayout
[MonoDroid]     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:757)
[MonoDroid]     at android.view.LayoutInflater.inflate(LayoutInflater.java:482)
[MonoDroid]     at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
[MonoDroid]     at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
[MonoDroid]     at android.support.v7.app.AppCompatDelegateImplV7.ensureSubDecor(AppCompatDelegateImplV7.java:321)
[MonoDroid]     at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:246)
[MonoDroid]     at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:106)
[MonoDroid]     at md58408e5fa51a388631c51cf1d5a14b403.AutoLoginActivity.n_onCreate(Native Method)
[MonoDroid]     at md58408e5fa51a388631c51cf1d5a14b403.AutoLoginActivity.onCreate(AutoLoginActivity.java:28)
[MonoDroid]     at android.app.Activity.performCreate(Activity.java:5990)
[MonoDroid]     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
[MonoDroid]     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
[MonoDroid]     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
[MonoDroid]     at android.app.ActivityThread.access$800(ActivityThread.java:151)
[MonoDroid]     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
[MonoDroid]     at android.os.Handler.dispatchMessage(Handler.java:102)
[MonoDroid]     at android.os.Looper.loop(Looper.java:135)
[MonoDroid]     at android.app.ActivityThread.main(ActivityThread.java:5254)
[MonoDroid]     at java.lang.reflect.Method.invoke(Native Method)
[MonoDroid]     at java.lang.reflect.Method.invoke(Method.java:372)
[MonoDroid]     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
[MonoDroid]     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
[MonoDroid] Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v7.internal.widget.FitWindowsLinearLayout" on path: DexPathList[[zip file "/data/app/com.upside.homecarecrm-1/base.apk"],nativeLibraryDirectories=[/data/app/com.upside.homecarecrm-1/lib/x86, /vendor/lib, /system/lib]]
[MonoDroid]     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
[MonoDroid]     at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
[MonoDroid]     at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
[MonoDroid]     at android.view.LayoutInflater.createView(LayoutInflater.java:571)
[MonoDroid]     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)
[MonoDroid]     ... 21 more
[MonoDroid]     Suppressed: java.lang.ClassNotFoundException: android.support.v7.internal.widget.FitWindowsLinearLayout
[MonoDroid]         at java.lang.Class.classForName(Native Method)
[MonoDroid]         at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
[MonoDroid]         at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
[MonoDroid]         at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
[MonoDroid]         ... 24 more
[MonoDroid]     Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
[AndroidRuntime] Shutting down VM
[AndroidRuntime] FATAL EXCEPTION: main
[AndroidRuntime] Process: com.upside.homecarecrm, PID: 2989
[AndroidRuntime] java.lang.RuntimeException: Unable to start activity ComponentInfo{com.upside.homecarecrm/md58408e5fa51a388631c51cf1d5a14b403.AutoLoginActivity}: android.view.InflateException: Binary XML file line #17: Error inflating class android.support.v7.internal.widget.FitWindowsLinearLayout
[AndroidRuntime]    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325)
[AndroidRuntime]    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
[AndroidRuntime]    at android.app.ActivityThread.access$800(ActivityThread.java:151)
[AndroidRuntime]    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
[AndroidRuntime]    at android.os.Handler.dispatchMessage(Handler.java:102)
[AndroidRuntime]    at android.os.Looper.loop(Looper.java:135)
[AndroidRuntime]    at android.app.ActivityThread.main(ActivityThread.java:5254)
[AndroidRuntime]    at java.lang.reflect.Method.invoke(Native Method)
[AndroidRuntime]    at java.lang.reflect.Method.invoke(Method.java:372)
[AndroidRuntime]    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
[AndroidRuntime]    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
[AndroidRuntime] Caused by: android.view.InflateException: Binary XML file line #17: Error inflating class android.support.v7.internal.widget.FitWindowsLinearLayout
[AndroidRuntime]    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:757)
[AndroidRuntime]    at android.view.LayoutInflater.inflate(LayoutInflater.java:482)
[AndroidRuntime]    at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
[AndroidRuntime]    at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
[AndroidRuntime]    at android.support.v7.app.AppCompatDelegateImplV7.ensureSubDecor(AppCompatDelegateImplV7.java:321)
[AndroidRuntime]    at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:246)
[AndroidRuntime]    at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:106)
[AndroidRuntime]    at md58408e5fa51a388631c51cf1d5a14b403.AutoLoginActivity.n_onCreate(Native Method)
[AndroidRuntime]    at md58408e5fa51a388631c51cf1d5a14b403.AutoLoginActivity.onCreate(AutoLoginActivity.java:28)
[AndroidRuntime]    at android.app.Activity.performCreate(Activity.java:5990)
[AndroidRuntime]    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
[AndroidRuntime]    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
[AndroidRuntime]    ... 10 more
[AndroidRuntime] Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v7.internal.widget.FitWindowsLinearLayout" on path: DexPathList[[zip file "/data/app/com.upside.homecarecrm-1/base.apk"],nativeLibraryDirectories=[/data/app/com.upside.homecarecrm-1/lib/x86, /vendor/lib, /system/lib]]
[AndroidRuntime]    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
[AndroidRuntime]    at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
[AndroidRuntime]    at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
[AndroidRuntime]    at android.view.LayoutInflater.createView(LayoutInflater.java:571)
[AndroidRuntime]    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)
[AndroidRuntime]    ... 21 more
[AndroidRuntime]    Suppressed: java.lang.ClassNotFoundException: android.support.v7.internal.widget.FitWindowsLinearLayout
[AndroidRuntime]        at java.lang.Class.classForName(Native Method)
[AndroidRuntime]        at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
[AndroidRuntime]        at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
[AndroidRuntime]        at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
[AndroidRuntime]        ... 24 more
[AndroidRuntime]    Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
[Process] Sending signal. PID: 2989 SIG: 9

Is anyone else having similar issues?

Seamless launch screen and WebView content

$
0
0

Hi all, I am new to this forum and recently I get a problem to solve in my Xamarin iOS project. Hope some of you could provide me help.

I am adding a launch image to my WebView app. The launch image is closely reassembled the background image of the WebView content. But after I add the launch image, I find there is 1-2 second of white screen between the launch image and the actual content during app startup.

I am thinking whether it is possible to defer the hide of launch screen until the web content is loaded or anything like that to make the launch screen and webview transition seamless. Any though, thx in advance.

Button HorizontalOptions not working inside stacklayout

$
0
0

Hi ,
Can any please explain how to align button to top in the Grid. Currently My xaml looks like
I cannot align horizontalOptions="start" for the buttons inside stacklayout, where as stacklayout is placed inside the grid. Please see the image for more understanding.

<?xml version="1.0" encoding="utf-8" ?>

<TabbedPage.ItemTemplate>




<ListView.ItemTemplate>

 <Grid Padding="5" >
                <Grid.RowDefinitions>
                  <RowDefinition Height="30"></RowDefinition>
                  <RowDefinition Height="20"></RowDefinition>
                  <RowDefinition Height="50"></RowDefinition>

</Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="100"></ColumnDefinition>
                  <ColumnDefinition Width="*"></ColumnDefinition>
                  <ColumnDefinition Width="40"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                  <Image Grid.Row="0" Grid.Column="0" Grid.RowSpan="3"  Source="{Binding ThumbUrl}" HeightRequest="100" Aspect="AspectFill"/>
                  <Image Grid.Row="0" Grid.Column="2" Grid.RowSpan="3" HeightRequest="12"  Source="arrowright_16.png" HorizontalOptions="Center" />
                  <Label Grid.Row="0" BackgroundColor="Aqua" Grid.Column="1" Text="{Binding Name}" FontSize = "20"  LineBreakMode="TailTruncation"></Label>
                  <Label Grid.Row="1" BackgroundColor="Blue"  Grid.Column="1" FontSize = "15" Text="Price: $10.00" LineBreakMode="TailTruncation"></Label>

                 <StackLayout Grid.Row="2" HorizontalOptions="Start"  Grid.Column="1" Orientation="Horizontal" BackgroundColor="Blue">
                     <Label FontSize = "18" BackgroundColor="Aqua" Text="Add To Order" HorizontalOptions="Start"  LineBreakMode="TailTruncation"></Label>
                     <Button Text="+" BackgroundColor="Aqua"  WidthRequest="60" CommandParameter="{Binding Name}" Clicked="AddClicked" HorizontalOptions="Start" VerticalOptions="Start">    </Button>  
                     <Button Text="-"  BackgroundColor="Aqua" WidthRequest="60" CommandParameter="{Binding Name}" Clicked="RemoveClicked" HorizontalOptions="Start" VerticalOptions="Start">    </Button>  
                 </StackLayout>

              </Grid>
            </ViewCell>
          </DataTemplate>
        </ListView.ItemTemplate>
      </ListView>

    </StackLayout>
  </ContentPage>
</DataTemplate>

</TabbedPage.ItemTemplate>

UICollectionView won't stop scrolling

$
0
0

Hi Everyone

THis is my code below.

I have 42 images it keeps constantly scrolling over the limit. and creating blank frames.

I want it to stop scrolling after the last image, so when you scroll up it works perfectly.

This method gets called whenever you try to scroll even if your at the end

Does anyone have any suggestion or help?

Any world be appreciated thanks

public override UICollectionViewCell GetCell (UICollectionView collectionView, NSIndexPath indexPath)
{
indexCounter = Convert.ToInt32 (indexPath.Item);

        //Only Go through it if It is less than the amount of images
        if (x < flashingDetails.fileCountForImages.Count - 1 || indexCounter < flashingDetails.fileCountForImages.Count - 1  || x == 0) 
        {
            s = (AnimalCell)collectionView.DequeueReusableCell (animalCellId, indexPath);


            //Set indexPath.item to this value so it updates when bring the image across
            x = Convert.ToInt32 (indexPath.Item);

            var animal  = flashings [Convert.ToInt32(indexPath.Item)];
            //
            s.Image = animal.Image;
        }
        return s;

    }

Show specific view on back button pressed

$
0
0

Hi there, I have a little problem here.
I searched the forum for an answer but could not find proper solution to my issue.

I have a login view on app start. If the user is not activated, he/she has to login with a given random password, and then automatically redirected to change password view for only once. After the user changes password, then main view begins.

In the main view if I press Back Button, I want to show login view instead of change password view.

Is it possible to do that? And if it is possible I'd be glad if somenone can help me.

Noob Question

$
0
0

If this is an RTFM, please point me accordingly :)

I'd like to write a simple app -- something that takes some user input, does some math, and provides values. Kind of like a high level calculator. Also, I'd like it to store logs in multiple places. So, I will need the following features:

  • Easy Ones

    • Run on IOS and Android
    • Have similar GUIs
    • Accept data, generate response data.
  • Store log data

    • On device
    • On dropbox
    • In a google docs spreadsheet
  • Generate Notifications

I've almost started doing an android version several times -- even created a simple POC. But, I'd like to write the real one now. And, I'd like to use Xamarin so that I can share code between the two platforms. But, that leaves many questions:

  1. Should I write an android/ios only version first, using Xamarin, then add the other? Should I start out doing both? Which platform would be easiest to start with?
  2. I have a mac laptop, but, I prefer to do my development on linux. How do people handle build environments? Should I build a hackintosh VM?
  3. How do I do OS specific code? For example, google docs support may be android only. Dropbox may have different interfaces on both OS's. And, notifications are likely very different.

Thanks in advance for any advice or pointers!

-Dave


Maps in android

$
0
0

Does anyone have an example of implementation of Google Maps on android?
Every example I find on the Internet does not.

Editor IntelliSense messed up ?

$
0
0

Thanks for the Inspector - very exciting.

But, when I try to use the text editor, and the IntelliSense after pressing . on a control / class, it looks very messed up - like a font issue ?

Hmm, I cannot paste an image here (without uploading it to the web), so I cannot show my screenshot.

F# Default Cocoa Project Not Building on El Capitan

$
0
0

I have the latest Xamarin Studio beta installed from here: http://releases.xamarin.com/ (cycle 6 RC 3)
I'm running the latest El Capitan (10.11.1) and XCode (7.1.1).

When I create a new F# Cocoa Mac app and attempt to build, I get the following errors:

FSC: Error FS0219: The referenced or default base CLI library 'mscorlib' is binary-incompatible with the referenced F# core library '/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/gac/FSharp.Core/4.4.0.0__b03f5f7f11d50a3a/FSharp.Core.dll'. Consider recompiling the library or making an explicit reference to a version of this library that matches the CLI version you are using. (FS0219)

FSC: Error FS0218: Unable to read assembly '/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/gac/FSharp.Core/4.4.0.0__b03f5f7f11d50a3a/FSharp.Core.dll' (FS0218)

Has anyone else run into this? Is there a known workaround? Any help would be appreciated.

URLS Not loading in iOS

$
0
0

Well jam using Xamarin forms for a year and have a great experience. Well i am facing some issues in iOS few URL's are not loading which are given below they are working perfect in android.

1) http://www.nhlbi.nih.gov/health/health-topics/topics/cath/
2) https://api.ihealthlabs.com:8443/OpenApiV2/OAuthv2/userauthorization/?client_id=92b1a34780454717aafe3e0ecd728bd8&amp;response_type=code&amp;redirect_uri=http://mywellness.lumiehr.com/ihealth/verify&amp;APIName=OpenApiBP OpenApiWeight OpenApiBG OpenApiSpO2 OpenApiSleep OpenApiUserInfo OpenApiActivity

Please guide me what is the problem they are working fine in android.

Landscape and portrait

$
0
0

Hi friends.
I would like to know when a page pass from Landscape to Portrait.
It seems that XF does not have an event for this.
Googling, I have found something like this

    protected override void OnSizeAllocated (double width, double height)
    {
        base.OnSizeAllocated (width, height);

        if (width != _width || height != _height)
        {
            _width = width;
            _height = height;
            if (width > height) // Landscape
                App.Globali.IsLandscape = true;
            else
                App.Globali.IsLandscape = false;
        }
    }

If I have a MasterDetail and put this code in "Detail" Page, this works fine.
But if I insert this code in "Master" page, width and height values does not change.

How can I solve this problem?
Thanks friends.

Viewing all 204402 articles
Browse latest View live


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