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

How to get a Picker to scroll to the selected item on opening?

$
0
0

I have a Picker which has a wide range of years as items. On UWP the Windows 10 app when the picker is selected opens to the SelectedItem centered in the list but on Android it gives the start of the list. The latter is unacceptable. Why are the two different? The expected result should always be the Selected Item regardless of the number of items centered so the user can scroll back and forth through the list.


Input text in xamarin.forms.view - how to do this?

$
0
0

I want to make input "thing" for some text.
I've tried to do something like this...

    <TextCell
            x:Name="Name"
            Text=""
            Detail=""/>

...but i've recived exception:
cannot convert from 'Xamarin.Forms.TextCell' to 'Xamarin.Forms.View'
I've seen some solution (as new user, i can't put url to this), but i don't get how to use it.

Is there any propper usage of this or textcell alternative?

Android UI controls look different when built on Mac

$
0
0
Hi,
I was building a cross platform Forms app for Android on Windows so far. But to keep Android and iOS on same machine I shifted to Mac. But when Android app is build on Mac the output Apps UI looks different, Entry, Listview, etc.

How do I maintain the same look as generated from Windows which is closer to Android App look?

Xamarin forms portable library with obfuscation tool .Net Reactor

Save and grab session id and other data

$
0
0

I am coding a Xamarin.Forms cross-platform Social Media app, when players first open the app it displays a login form. Once they login they get a session id.

How do I save the session id to the phone? I tried using Xamarin.Auth but that seems to want a username and password. I also need to be able to check if a session already exists when the app starts that way I skip the login page if they are already signed in, also a way to delete the session incase they log out.

Would Xamarin.Auth work for this or do I need something else? Would I also use it to save user preferences for certain things in the app?

How to install RestSharp in PCL Project?

$
0
0

I tried to use HttpClient to consume rest service, but i didn't get. I created a console project and i didn't get too. Then i used RestSharp library and i got to consume the rest service in the console project. When i went to migrate to Xamarin.Forms i didn't get to install. Anybody knows some alternative to solve this issue?

Google map dosn't work when app is instaled from store.

$
0
0

Hi.
I build a small app that using google map. I build release version, sign it with release keystore and publish to google play store. When I download app from the store google map (in app) is blank (only google logo is visible). I thought I did something wrong with SH1 certificate for google map api. I checked and API key is correct.
In next step I manually installed my app on my phone and google maps works. I try to installed it on emulators and maps works. So one more time I uninstalled from phone and installed again from google app store, but then map didn't work again.

Where is a problem? Why maps doesn't work when I install app from store?

Please help.

Immersive/Window.SetNavigationBarColor Issue

$
0
0

Im actually trying to set the color of the navbar by using:

Window.SetNavigationBarColor(Android.Graphics.Color.Blue);

Ive also tried to use immersive mode within an forms application by:

Android.Views.View decorView = Window.DecorView; var uiOptions = (int)decorView.SystemUiVisibility; var newUiOptions = (int)uiOptions; newUiOptions |= (int)SystemUiFlags.Immersive; decorView.SystemUiVisibility = (StatusBarVisibility)newUiOptions;

But nothing happens

Anyone may knows by failure?


How to get the contact Uri for vCard in Xamarinforms

$
0
0

I would to share contact from my Xamarin forms application just like
private void shareContact() {
//lookupKey = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.LOOKUP_KEY));
String lookupKey2 = lookupKey;
Uri uri = Uri.withAppendedPath(ContactsContract.Contacts.CONTENT_VCARD_URI, lookupKey2);
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType(ContactsContract.Contacts.CONTENT_VCARD_TYPE);
intent.putExtra(Intent.EXTRA_STREAM, uri );
intent.putExtra(Intent.EXTRA_SUBJECT, contactName); // put the name of the contact here
startActivity(intent);
}

So can you please suggest me if anybody implemented and how to get the Contact as vCard URI in Xamarin forms.

Thanks in advance

Infinite ListView reverse

$
0
0

I'm trying to develop a infinite listview reverse, that is, when user scrolls the listview up, when it reaches the first item, new items are loaded and inserted into that list.

I have this:

this.ItemAppearing += (object sender, ItemVisibilityEventArgs e) => {
    var items = this.ItemsSource as IList;

    // If it is the first item
    if (items != null && e.Item == items[0]) {
        if (this.LoadCommand != null && this.LoadCommand.CanExecute(null)) {
            this.LoadCommand.Execute(null);
        }
    }
};

There are two big problems:
1. When user access the page with that list, the list already starts at the top, so new items will be loaded as soon as the user access the page;
2. When new items are loaded and inserted to the list, that ListView will scroll to the first item automatically because it doesn't preserve the current position. So, new items are loaded more and more, infinitly, because the ListView will be always at the top.

Is there any solution?

How to test the iOS Version when its written Visual Studio for Windows?

$
0
0

I wrote a xamarin.forms app in VS on Windows and so far Ive tested it on Windows and android which works perfctly. Now I want to deploy it to a real iPhone.

I know I need a mac to build it but what things exactly do I need to do on the mac to get it two work?? There are some videos that are supposed to show it but there seems to be more to it. Do I have to use the Xam Mac agent or can I also take my entire project and open it in VS for mac to test from there or....?

XAML designer not getting opened

$
0
0

Dears,

i cant open the XAML file on the designer. it opens only the code window as below.

please help me.

thanks,
Ammar

How to upload files using NET CORE and Refit

$
0
0

When I use a POSTMAN to do make a request, my API receives a IList<IFormFile>.

How can I do the same request using Xamarin.Forms with REFIT?

(I'm trying to put images here, but I can not. I asked the same question in StackOverflow with images)

Firebase class cast Error

$
0
0

Hello everybody, I'm making a cross platform xamarin.form app using Firebase as backend, I've managed to register a new user and write data to the DB , now I'm trying to retrieve the current user info from this data structure:

Utenti{

id:{
    nome:"name",
    cognome:"surname",
    cellulare:"cellphone"
}

}

I'm using this method:

public async static Task<List> getUser(String ID)
{

        List<Utente> list = new List<Utente>();

        var query = await client.Child("Utenti").OnceAsync<Utente>();

        list = query.Select(item => new Utente
        {
            nome = item.Object.nome,
            cognome = item.Object.cognome,
            cellulare = item.Object.cellulare

        }).ToList();

        return list;
    }

this is the Utente object:

public class Utente
{
    public string nome { get; set; }
    public string cognome { get; set; }
    public string cellulare { get; set; }
}

I keep getting a class cast exception error:

System.invalidCastException

澳洲学历昆士兰科技大学毕业,证@成绩单@文,凭@教育部认证@留,信网认证@@(Q /微551,190476)


澳洲学历阿德莱德大学毕业,证@成绩单@文,凭@教育部认证@留,信网认证@@(Q /微551,190476)

澳洲学历福林德斯大学毕业,证@成绩单@文,凭@教育部认证@留,信网认证@@(Q /微551,190476)

密歇根大学安娜堡分校大学学历认证,毕业,证@文,凭(Q /微551,190476);代办美国毕业,证学位修改成绩单,办理真实文,凭认证,教育部认证.

$
0
0

密歇根大学安娜堡分校大学学历认证,毕业,证@文,凭(Q /微551,190476);代办美国毕业,证学位修改成绩单,办理真实文,凭认证,教育部认证.

圣约翰大学大学学历认证,毕业,证@文,凭(Q /微551,190476);代办美国毕业,证学位修改成绩单,办理真实文,凭认证,教育部认证.

$
0
0

圣约翰大学学历认证,毕业,证@文,凭(Q /微551,190476);代办美国毕业,证学位修改成绩单,办理真实文,凭认证,教育部认证.

范德堡大学学历认证,毕业,证@文,凭(Q /微551,190476);代办美国毕业,证学位修改成绩单,办理真实文,凭认证,教育部认证.

$
0
0

范德堡大学学历认证,毕业,证@文,凭(Q /微551,190476);代办美国毕业,证学位修改成绩单,办理真实文,凭认证,教育部认证.

Viewing all 58056 articles
Browse latest View live


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