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

How to create an imagebutton style with transparent backgroundcolor and click-animation

$
0
0

I'd like to use imagebuttons with click animation. So I would have to create a style for my imagebuttons in order to simplify the xaml code, i.e. make the background transparent and add visual states for click animation.

Can some guru please publish a code snippet that does exactly that, as the description at xamarin-forms/user-interface/visual-state-manager seems somewhat complicated .

Cheers..


Seperator lines in TableView

$
0
0

How do I remove the separator lines between each ViewCell in a TableView

I've created this little demo page illustrating the problem:
<br /> <?xml version="1.0" encoding="utf-8" ?><br /> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="App29.MainPage"></p> <pre><code><ContentPage.Content> <StackLayout Padding="30" VerticalOptions="Start"> <TableView Intent="Form"> <TableRoot > <TableSection Title="TITLE"> <ViewCell> <Label Text="TEST 1" IsVisible="False"/> </ViewCell> <ViewCell> <Label Text="TEST 2" IsVisible="False"/> </ViewCell> </TableSection> </TableRoot> </TableView> </StackLayout> </ContentPage.Content>


Visual Studio for Windows/Mac not showing all simulators bug

$
0
0

I spent a lot of time trying to fix things and I documented it all here. https://forums.xamarin.com/discussion/comment/362759#Comment_362759
Unfortunately, the problem came right back.

BUG SUMMARY:

Using Visual Studio for Windows 15.9.6(or the latest VS 2019 preview) and a connected MacBook running Visual Studio for Mac 7.7.4 and Xcode 10.1, the Visual Studio "Pair to Mac" functionality is improperly enumerating available devices.

From Xcode/Preferences/Components, if you download/install too many simulators, the corresponding list of devices that displays for the Visual Studio iOS projects, is unable to properly list or enumerate all these devices.

HOW TO REPRODUCE:

I am able to reproduce on multiple Macs, one from 2011, one from 2018, by simply adding all simulators including 10.3.1, 11.0,11.1,11.2,11.3.11.4,12.0. After adding these, go back to Visual Studio for Windows, and disconnect from the Mac, and reconnect. This will retry in enumerating all the devices.

I suspect this can be quickly reproduced as I was experiencing the issue across multiple macs/pcs.

WORKAROUND

Assuming you get the same results as me, you can then fix it by removing most simulators and keeping the one you want to test with.

Visual Studio for Windows/Mac not showing all simulators bug

$
0
0

Yes, i put bug in title as that is what I believe this is.

I spent a lot of time trying to fix things and I documented it all here. https://forums.xamarin.com/discussion/comment/362759#Comment_362759
Unfortunately, the problem came right back.

Summary:

Using Visual Studio 2017 15.9.6 with a Xamarin.Forms project. I found I am having no issues connecting to my Mac2011, but my Mac2018 is missing simulators of iPhone 7 and above.

I went thru many steps, ultimately I re-installed the Mac fresh and using a test project I connected and found all the simulators were there.
However as soon as I connect while my main project is open, these simulators no longer appear.

Let me take this moment to say, "Thanks to all the Xamarin creators/contributors/supports for this awesome Xamarin magic".

Considering all my steps... these VS tools appear to have a nasty bug.
I've been working for over a year to deliver this app... and now the tooling is blocking me.

Please share any suggestions, but at this point, I think I need paid support services, so I'm not sure which direction to go up the support ladder.

Thanks.

Gradient view issue on Mac OS Android emulator API level 28 (Pie)

$
0
0

Hi All,

I'm trying to create a gradient view in XF using custom renders.

Here is the code for Gradient view in shared project.

`using Xamarin.Forms;

namespace GradientViewDemo
{
public enum GradientOrientation
{
Vertical = 0,
Horizontal = 1
}

public class GradientView : ContentView
{
    public static readonly BindableProperty StartColorProperty = BindableProperty.Create(
        propertyName: nameof(StartColor),
        returnType: typeof(Color),
        declaringType: typeof(GradientView),
        defaultValue: Color.Default);

    public static readonly BindableProperty EndColorProperty = BindableProperty.Create(
        propertyName: nameof(EndColor),
        returnType: typeof(Color),
        declaringType: typeof(GradientView),
        defaultValue: Color.Default);

    public static readonly BindableProperty OrientationProperty = BindableProperty.Create(
        propertyName: nameof(Orientation),
        returnType: typeof(GradientOrientation),
        declaringType: typeof(GradientView),
        defaultValue: GradientOrientation.Vertical);

    public Color StartColor
    {
        get { return (Color)GetValue(StartColorProperty); }
        set { SetValue(StartColorProperty, value); }
    }

    public Color EndColor
    {
        get { return (Color)GetValue(EndColorProperty); }
        set { SetValue(EndColorProperty, value); }
    }

    public GradientOrientation Orientation
    {
        get { return (GradientOrientation)GetValue(OrientationProperty); }
        set { SetValue(OrientationProperty, value); }
    }
}

}
`

Android renderer:

`[assembly: ExportRenderer(typeof(GradientView), typeof(GradientViewRenderer))]
namespace GradientViewDemo.Droid
{
public class GradientViewRenderer : ViewRenderer
{
private Xamarin.Forms.Color OldStartColor { get; set; }
private Xamarin.Forms.Color OldEndColor { get; set; }
private Xamarin.Forms.Color StartColor { get; set; }
private Xamarin.Forms.Color EndColor { get; set; }
private GradientOrientation Orientation { get; set; }

    public GradientViewRenderer(Context context) : base(context) { }

    protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
    {
        base.OnElementPropertyChanged(sender, e);

        if (e.PropertyName == GradientView.StartColorProperty.PropertyName || e.PropertyName == GradientView.EndColorProperty.PropertyName)
        {
            UpdateColors();
        }

        if (e.PropertyName == GradientView.OrientationProperty.PropertyName)
        {
            UpdateOrientation();
        }
    }

    protected override void OnElementChanged(ElementChangedEventArgs<View> e)
    {
        base.OnElementChanged(e);
        if (e.OldElement != null || Element == null)
        {
            return;
        }

        UpdateColors();
        UpdateOrientation();
    }

    private void UpdateColors()
    {
        if (Element is GradientView element)
        {
            OldStartColor = StartColor;
            OldEndColor = EndColor;

            StartColor = element.StartColor;
            EndColor = element.EndColor;
        }
    }

    private void UpdateOrientation()
    {
        if (Element is GradientView element)
        {
            Orientation = element.Orientation;
        }
    }

    protected override void DispatchDraw(Canvas canvas)
    {
        var gradient = new LinearGradient(
            x0: 0,
            y0: 0,
            x1: Orientation == GradientOrientation.Horizontal ? Width : 0,
            y1: Orientation == GradientOrientation.Vertical ? Height : 0,
            color0: StartColor.ToAndroid(),
            color1: EndColor.ToAndroid(),
            tile: Shader.TileMode.Mirror);
        var paint = new Paint
        {
            Dither = true
        };

        paint.SetShader(gradient);
        canvas.DrawPaint(paint);
        base.DispatchDraw(canvas);
    }
}

}`

XAML page:

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

<StackLayout>
    <!-- Place new controls here -->
    <StackLayout Spacing="40" Margin="20">
        <Label Text="test.."/>
        <Label Text="test.."/>
        <Button Text="Button 1" 
                Clicked="Handle_Clicked1"/>
        <local:GradientView StartColor = "Red"
                            EndColor = "Yellow"
                            VerticalOptions="FillAndExpand">
            <StackLayout Spacing="40">
                <Label Text="test.."/>
                <BoxView BackgroundColor="Blue" WidthRequest="200" HeightRequest="100"/>
                <Label Text="test.."/>
                <Button Text="Button 2" 
                        Clicked="Handle_Clicked2"/>
            </StackLayout>
        </local:GradientView>

    </StackLayout>
</StackLayout>


`

This code works fine in Android 9 emulator on Windows.

But when we run same code on VS Mac page doesn't rendered as expected. Gradient view spreads all over the view. Acts as a input transparent view where we can click hidden elements(Button 1).

This work on older Mac emulators, issue is only with Android 9.0.

Any ideas?

Thanks
Kaushalya

Navigating from Detail Page to a new NavigationPage working in Code Behind but now working with MVVM

$
0
0

Hello everyone, I'm facing a problem with navigation in MasterDetail page,
Here is what I want to do
MasterDetail Page -> On the DetailPage I have a listview that when I tap the item I want to go to a new Hierarchical NavigationPage -> Go to the page of the Item clicked.

If I implement on the code behind the XAML Detail Page it works, It navigate to the PlacePage fine the way I want.

    private async void MyListView_ItemSelected(object sender, SelectedItemChangedEventArgs e)
    {
        if(e.SelectedItem == null)
            return;

        var placeData = e.SelectedItem as Place;
        await Navigation.PushAsync(new PlacePage(placeData));
        MyListView.SelectedItem = null;
    }

But I want to implement using MVVM, I have a Navigation Service that I call this way from the ViewModel:

    private async void PlaceTapped(Place place)
    {
        await this._navigationService.NavigateToPlace(place);
    }

And inside the navigation service I have:

    public async Task NavigateToPlace(Place placeData)
    {
        try
        {
            await Application.Current.MainPage.Navigation.PushAsync(new PlacePage(placeData));
        }
        catch(Exception ex)
        {
            Debug.WriteLine(ex);
        }
    }

It is the same PushAsync as in the Codebehind but It throw this error:
System.InvalidOperationException: PushAsync is not supported globally on Android, please use a NavigationPage.

Can anyone help me?

Change color of keyboard

$
0
0

Hello.
I want to change keyboard buttons
How I can to do this?/

I looking for solution in internet -- but its not clear and i cannot understand..((((

Please help me

Adding value from a popup page to ContentPage

$
0
0

Hi all,
My setup is like this:
1- I have a content page with a listview of items that each has a Score.
2- By tapping an item in the list it opens up a popup page with another listview of values.

I can easily pass SelectedItem.Id from the ContentPage to the Popup page. However, I do not know how to add the value from the Popup page listview to the Score in the ContentPage and update it.

Any help will be much appreciated.

This is my code in the PopupViewModel:

async void AddValue(int selectedValueID)
{
bool isUserAccept = await Application.Current.MainPage.DisplayAlert
("ValuePoints", "Would you like to add these points?", "OK", "Cancel");

        if (isUserAccept)
        {
            _student.Score += _points.Mvalue;

            //_studentRepository.UpdateScore(_student.Score);  //Tried that but didn't work

            _studentRepository.UpdateStudent(_student);

            await Application.Current.MainPage.DisplayAlert
            ("Value Points", "Value points were added.", "OK", "Cancel");

            await PopupNavigation.Instance.PopAsync();
        }
    }

    MValue _selectedValueItem;
    public MValue SelectedValueItem
    {
        get => _selectedValueItem;
        set
        {
            if (value != null)
            {
                _selectedValueItem = value;
                NotifyPropertyChanged("SelectedValueItem");
                AddValue(value.MvalueID);
            }
        }
    }

App background

$
0
0

Hello,

Is it possible that when a xamarin forms application is in the background, when it receives a push notification, it puts a page of content in the foreground? with android I got it, the application is in the background, I receive a notification and I open an activity and it is in the foreground.

Xamarin Forms Recycled ListView with Infinite Scrolling

$
0
0

So I am trying to set up an infinitely scrolling listview that's utilizing the recycled caching strategy. I actually see a huge improvement from the older listview, where, after a few hundred or so images it lags. Now, I can load in 100, 200 images and scrolling is on point. So good job. What I am a little lost in is the correct way to listen at any given point (cell) whether or not to load more data. My old listview, which was platform specific, utilized the GetCell method and I was able to give it some heuristics to determine when to load more cells. And from my understanding, recycled listviews are typically binded to a OnBindingContextChange method, which I have and is working. As such:

var item = BindingContext as XamarinMobile.ViewModels.GridCellViewModel;

But I am seeing some weird issues. I was able to give each cell a cell index and pass it to my view model for the cell. When the cell being viewed is #6 or higher (we load about 20 at a time) I want to load more data. As such:

if(item.cellIndex >= ((item.numberOfStories - RowFetchCount) + 6)) { item.FetchMoreData(); }

So far this works somewhat good, I do see some weird issues but nothing pertaining to why I am asking this question. The issue I am having now is how to effectively change the listview item source without any UI performance dip. Essentially, what's the correct way to do the following:

(this piece of code gets hit after the FetchMoreData method is called and this is when we have data ready to be added to collection)
foreach (MobileObjects.GridListStory story in stories.StoryList)

{
      index++;
       if (index > stories.StoryList.Count - RowFetchCount)
       {
            if (index % 4 == 0)
            {
                cells.Add(new ViewModels.GridCellViewModel { Image = string.Empty, Headline = "ADVERTISEMENT", ActivityIndicator = new Xamarin.Forms.ActivityIndicator(), IsAd = true, cellIndex = index, numberOfStories = stories.StoryList.Count, LoadPageDate = LoadPageDate });
            }
            else
            {
                cells.Add(new ViewModels.GridCellViewModel { Image = story.SquareImageURL, Headline = story.Headline, ActivityIndicator = new Xamarin.Forms.ActivityIndicator(), IsAd = false, cellIndex = _index, numberOfStories = stories.StoryList.Count, FetchMoreData = InitMoreData, LoadPageDate = LoadPageDate });
             }
        } 

        if (index % 4 != 0)
        {
               _index++;
        }
 }

This causes the listview to lag a bit. Not a lot but I feel like I am doing something wrong? Here is the declaration of cells

public System.Collections.ObjectModel.ObservableCollection<ViewModels.GridCellViewModel> cells { get; set; }

So 1) Am I already doing this correctly?
2) When I try to do cells = [dataObject] the listview item source doesn't change, it seems like I have to actually add them using the method above. Is there a cleaner way?

Xamarin Android Bindings that uses Android.WorkManager

$
0
0

We are making an app that needs to use Android's WorkManager library. The dependency .AAR file is compiled and tested working. I was able to build a DLL by binding the dependency AAR file using Visual Studio's Java Bindings Project.

However, when the Xamarin Android project uses the dependency library that uses the Android WorkManager, it throws an exception:

            Java.Lang.NoClassDefFoundError: Failed resolution of: Landroidx/work/WorkManager; ---> 
            Java.Lang.ClassNotFoundException: Didn't find class "androidx.work.WorkManager" on path: 
            DexPathList[[zip file "/data/app/com.appname.app-vXQN7f21kz_QrhvSakWVRA==/base.apk"],nativeLibraryDirectories=[/data/app/com.appname.app-vXQN7f21kz_QrhvSakWVRA==/lib/arm64, /data/app/com.appname.app-vXQN7f21kz_QrhvSakWVRA==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]

I also tried downloading the Android WorkManager AAR file, created its own Bindings Library project, compiled that, and added it to the main Xamarin Forms project, along with the dependency AAR. But I get this error:

error: CommandsCompletedListener is not public in SystemAlarmDispatcher; cannot be accessed from outside package
    androidx.work.impl.background.systemalarm.SystemAlarmDispatcher.CommandsCompletedListener

Is there something I should include or modify in the dependency Bindings project?

I already tried adding the WorkManager AAR to the dependency Bindings project and using that, but I still get the ClassNotFoundException. Has anyone tried using a Java dependency that uses the WorkManager for Xamarin Android?

Firebase Messaging Notifications stopped working

$
0
0

Hi,
I'm having a problem with an App I'm working on. Notifications used to work fine but ever since I updated the Xamarin Google Play and Firebase packages they stopped. I have followed the samples available numerous times and nothing fixes it. The problem seems to be that the MESSAGING_EVENT service is not working. I can get a Token fine and test messages are also sent fine. It is when they arrive that the App does not know what to do with them.

This is what I get on the Output right after sending the message:

02-04 22:56:31.382 D/FirebaseMessaging( 2461): Unknown intent action: com.google.firebase.MESSAGING_EVENT

I researched further and the generated Manifest actually has two different services for "com.google.firebase.MESSAGING_EVENT"!!!

This is supposed to be mine:

<\service android:name="md5d6784224fb59318896fbd2225d685b43.FirebaseNotificationService">
<\intent-filter>
<\action android:name="com.google.firebase.MESSAGING_EVENT" />
<\/intent-filter>
<\/service>

Further below there is also:

<\service android:name="com.google.firebase.messaging.FirebaseMessagingService" android:exported="true">
<\intent-filter android:priority="-500">
<\action android:name="com.google.firebase.MESSAGING_EVENT" />
<\/intent-filter>
<\/service>

Is this normal? I wonder if that is reason.

Has anyone here experienced something similar?

Any help is greatly appreciated.

PS - Sorry for the escape characters but I cannot post images here yet.

How to get Timezone Id in Xamarin.Forms Cross Platform

$
0
0

Hi I'm trying to get TimeZone Id in Xamarin....

When using in Android and calling TimeZoneInfo.Local.Id I get something like "America/Sao_Paulo"
When using on iOS I get just the word "Local"

I realized that android uses the Olson Time Zone that is from java... But iOS do not seems to work as I expected...

Is there any way to get the timezone in iOS?

And also ...
Is there a way to get the TimeZone in Android in windows Format? Like for Example in case America/Sao_Paulo: "E. South America Standard Time"

Java Errors

$
0
0

Not infrequently when I build an app I get this error:

System.IO.DirectoryNotFoundException: Could not find a part of the path.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.__Error.WinIOError()
at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost)
at Xamarin.AndroidDesigner.Resources.Ast.ResourceProvisionator.SafeMove(String source, String destination) in E:\A_work\122\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner.Resources.Ast\ResourceProvisionator.cs:line 171
at Xamarin.AndroidDesigner.Resources.Ast.ResourceProvisionator.SerializeRepositoryToFilePath(ResourceRepository repository, String path, IEnumerable`1 qualifiers) in E:\A_work\122\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner.Resources.Ast\ResourceProvisionator.cs:line 104
at Xamarin.AndroidDesigner.Resources.Ast.ResourceProvisionator.<>c__DisplayClass5_2.b__0() in E:\A_work\122\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner.Resources.Ast\ResourceProvisionator.cs:line 78
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Xamarin.AndroidDesigner.Resources.Ast.ResourceProvisionator.d__4.MoveNext() in E:\A_work\122\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner.Resources.Ast\ResourceProvisionator.cs:line 48
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Xamarin.AndroidDesigner.ResourceProvisionatorExtensions.d__0.MoveNext() in E:\A_work\122\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner\ResourceProvisionatorExtensions.cs:line 22
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Xamarin.AndroidDesigner.AndroidRenderSession.d__109.MoveNext() in E:\A_work\122\s\Xamarin.Designer.Android\Xamarin.AndroidDesigner\Xamarin.AndroidDesigner\AndroidRenderSession.cs:line 697
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)

Did I not install something? I do not have an E: drive.

Put MasterDetailPage Hamburger Icon in Right Side(Android)

$
0
0

hey guys:
I have a crossplatform application and i want to put hamburger icon in right side of navigationpage.
in AndroidManifest i put ( android:supportsRtl="true") and in masterdetailpage i set flowdirection to righttoleft but icon is in left


Retrieve JSON from api in XF

$
0
0

I am learning about Azure Mobile Services and trying to follow along to a slightly older tutorial. I built a simple API backed in asp.net core that returns the following JSON from the URL: https://somebackend.azurewebsites.net/api/todo

[{"id":1,"text":"Item1","isComplete":false}]

I have an on_click method that I am trying to use to retrieve this data.

using Microsoft.WindowsAzure.MobileServices;
.
.
.
private async void Button_OnClicked(object sender, EventArgs e)
{
message.Text = "Loading items...";

        MobileServiceClient client = new MobileServiceClient("https://somebackend.azurewebsites.net/api/todo");
        var items = await client.GetTable<TodoItem>().ReadAsync();
        var item = items.First();

        message.Text = item.Text;

    }

The GetTable line is where everything is breaking. Is that line trying to do a GET request on tables/todoitem ....or is it sending the request from my URL? Am I retrieving this incorrectly? It doesn't work on either Android or iOS simulators, and debugging in VS just says error...but not very helpful. I am not exactly sure how to debug the incoming request from my simulators.

In the attached project, I have the backend that I uploaded to Azure, as well as the Xamarin project.

Xamarin Auth re prompts user for permission after already granted

$
0
0

I have implemented the OAuth 2 authentication using Xamarin.Auth.

Authenticator = new OAuth2Authenticator(
clientId: OAuthConstants.CLIENT_ID,
clientSecret: null,
scope: OAuthConstants.SCOPE,
authorizeUrl: new Uri(OAuthConstants.AUTHORIZE_URL),
accessTokenUrl: new Uri(OAuthConstants.ACCESS_TOKEN_URL),
redirectUrl: new Uri(OAuthConstants.REDIRECT_URL),
getUsernameAsync: null,
isUsingNativeUI: true);

A user can signup using OAuth or use a local account and link that to a Google OAuth Account. Both these scenarios work fine.

When linking account or signing up the user is prompted to grant the scope permissions (profile email). I then get back the access token and use the Account Store to store the account.

Since this is now linked to google I store the google user if and a refresh token in the DB. The idea being is the app is uninstalled and the user then re-installs it I want them to be able to login again with oAuth.

This works - since I can find the user using the Google User Id but even thought the app ID has not changed when using the OAuth2Authenticator to request a access token I keeps asking the user to grant the permissions - even though they were already granted for the app.

Is there a different way to prompt them to login rather than just being asked for the permissions every time?

I am showing the presenter like follows:

var presenter = new Xamarin.Auth.Presenters.OAuthLoginPresenter();
CustomTabsConfiguration.CustomTabsClosingMessage = null;
presenter.Login(Authenticator);

Thanks,

Xamarin Auth re prompts user for permission after already granted

$
0
0

I have implemented the OAuth 2 authentication using Xamarin.Auth.

Authenticator = new OAuth2Authenticator(
clientId: OAuthConstants.CLIENT_ID,
clientSecret: null,
scope: OAuthConstants.SCOPE,
authorizeUrl: new Uri(OAuthConstants.AUTHORIZE_URL),
accessTokenUrl: new Uri(OAuthConstants.ACCESS_TOKEN_URL),
redirectUrl: new Uri(OAuthConstants.REDIRECT_URL),
getUsernameAsync: null,
isUsingNativeUI: true);

A user can signup using OAuth or use a local account and link that to a Google OAuth Account. Both these scenarios work fine.

When linking account or signing up the user is prompted to grant the scope permissions (profile email). I then get back the access token and use the Account Store to store the account.

Since this is now linked to google I store the google user if and a refresh token in the DB. The idea being is the app is uninstalled and the user then re-installs it I want them to be able to login again with oAuth.

This works - since I can find the user using the Google User Id but even thought the app ID has not changed when using the OAuth2Authenticator to request a access token I keeps asking the user to grant the permissions - even though they were already granted for the app.

Is there a different way to prompt them to login rather than just being asked for the permissions every time?

I am showing the presenter like follows:

var presenter = new Xamarin.Auth.Presenters.OAuthLoginPresenter();
CustomTabsConfiguration.CustomTabsClosingMessage = null;
presenter.Login(Authenticator);

Thanks,

How to Create a Dynamic forms App Like ODK Collect

$
0
0

Hello all, I am working on an app that is meant to be used to run surveys like ODK collect and kobotoolbox does. I have already built the web side of things which works very well, also the mobile app is at a phase where the form will be generated. The problem I am having right now is how to create dynamic form based on some defined parameters in JSON or any other source and collect data from the created form. Any help will be duly appreciated.

How to modify button colors

$
0
0

Here's one of the button's axml:

This button is light gray

Here's another button:

and this is yellow (goldenrod?)?

And here's how it looks:

How do I get the yellow buttons to be like the light gray ones? That is, bounded by white?

RON

Viewing all 204402 articles
Browse latest View live