Is it possible to call or create a function that automatically finds the next 'Entry' field in a view and then sets focus to it?
Automatically find next custom field in view (derived from Entry class) and set focus to it.
Getting error Activity has been destroyed
My application is based on masterdetailedpage and I am working with push notification. When user click on the notification I want to navigate to a specific page. All the process is working fine but at the end of the proccess I got this error Java.Lang.IllegalStateException: Activity has been destroyed
.
My code for push notification is based on this link : https://theconfuzedsourcecode.wordpress.com/2015/06/19/so-i-just-implemented-push-notifications-in-awesome-xamarin-forms/
RelativeLayout not responding to user-input in iOS
Hi everyone
For some reason an entry in iOS isn't responding to any user-input once it is programmatically added to a RelativeLayout while it does work in Android.
The XAML:
<?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="TempProject.Pages.FullRelativeLayoutPage">
<Image x:Name="imgTest" />
<StackLayout Orientation="Vertical" Padding="15, 70, 15, 2">
<Entry TextColor="Black" BackgroundColor="Blue" />
</StackLayout>
</ContentPage>
C#:
namespace TempProject.Pages
{
public partial class FullRelativeLayoutPage : ContentPage
{
public FullRelativeLayoutPage()
{
InitializeComponent();
}
protected override void OnAppearing()
{
base.OnAppearing();
var relativeLayout = new RelativeLayout();
relativeLayout.InputTransparent = true;
relativeLayout.Children.Add(Content,
Constraint.RelativeToParent((parent) => 1 * parent.X),
Constraint.RelativeToParent((parent) => 1 * parent.Y),
Constraint.RelativeToParent((parent) => 1 * parent.Width),
Constraint.RelativeToParent((parent) => 1 * parent.Height)
);
Content = relativeLayout;
}
}
}
How come in Android this entry is editable, but in iOS it is not? FYI a button is not responding either.
Implementing custom keyboard Xamarin.Forms for Android
Hi,
I'am trying to implement a custom keyboard and found this that contains a link to a project which implements a custom keyboard using Mono for Android (not Xamarin.Forms).
Trying to use the same technique in Xamarin.Forms is not possible since Keyboard
constructor is internal. Secondly I'm not sure how one would implement adding the custom keyboard view automatically to all views that have an EditText
that requires the custom keyboard implementation in an easy maner.
Anyone successfully implemented a custom keyboard and care to share their experience?
My keyboard should be configurable (or if not feasable I will implement multiple keyboard designs) to show only digits (1-9), comma sign (, in sweden . in english) and potentially a dash and the standard done and delete buttons.
Regards
Is Xamarin Forms still ridiculously slow for you on Android?
So I've had this app for a year in the app store since Xamarin Forms 1.x and I've updated it and optimized it over 100 times.
I get stellar performance on iOS (even old phones) but the Android performance is abysmal. To give you an idea, I can run the app on an old iPhone 4S (which I bought in 2011) very smoothly, but it lags like crazy on a brand new Google nexus 6. I'm using Xamarin Forms and there are a few custom renderers but the slowness impacts every single page.
Every time any kind of UI operation needs to happen on Xamarin Android, frames get skipped and the whole thing lags. Everything layout-related seems particularly bad
I've added some custom layouts to speed things up but the difference was minimal.
Do others observe this discrepancy between iOS and Android?
Prism EventAggregator in Xamarin.Forms
I have done some search and did not find any documentation on how to use it in Xamarin.Forms. About WPF, I found some but they was old, and I couldn't figure out how to bind it with Xamarin. Please, write here how to use it, or provide some links, please.
Data Binding List within a List
Hello,
i want to bind a itens of a list within a list.
My three Models:
public class Course
{
public int Id { get; set; }
public string Title { get; set; }
public List<Module> Modules { get; set; }
}
public class Module
{
public int Id { get; set; }
public string Title { get; set; }
public List<Discipline> Disciplines { get; set; }
}
public class Discipline
{
public int Id { get; set; }
public string Title { get; set; }
}
I have a page with a list of courses and pass data to another page with that course to view some details, on that detail page i set the BindingContext to BindingContext = _course.Module in _course i get the clicked course data.
My inquire is that now i want to display a list of Disciplines grouped by Module
I've try something like:
<ListView ItemsSource="{Binding .}">
<ListView.ItemTemplate>
<DataTemplate>
<TextCell Text="{Binding Disciplines}" />
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
or:
<ListView ItemsSource="{Binding Disciplines}">
<ListView.ItemTemplate>
<DataTemplate>
<TextCell Text="{Binding Title}" />
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
but my listview always show empty could you guys lend me a hand?
Google Map API not showing the map data
I have a registred key and everything seems alright in my code but Google Map is Just not showing the map data
here is my android manifest
I also got this notification on my output console while building
Does anyone have any suggestion on this?
How can catch error 401 in RestSharp.Portable?
Hi,
I'm using RestSharp.Portable in my project, I'm trying cath erro 401 but when trigger the sentence client.Execute(request) generate error.
var client = new RestClient(BaseUrl);
client.IgnoreResponseStatusCode = false;
var response = await client.Execute<T>(request);
if (!response.IsSuccess)
{
//Custom Exception using response.StatusCode
}
return response.Data;
problem start project
Hi, when i execute a new project created this wrong appears on visual studio 2015. In atach
Xamarin Forms Master Detail page- Menu not appearing in UWP phone
I am trying to create a Master detail page using Xamarin forms. I am able to get it working fine on android and the windows 10 simulator but the menu is not visible in the windows phone emulator. I am using the UWP project and a windows 10 phone emulator. What could I be doing wrong ?
unable to launch the Profiler for Xamarin Studio.
Hi, I have installed Xamarin Studion on my Mac, I want to find out some leaks for my Xamarin.Forms app.
I have browse to run the profiler ( Run > Start Profiling in Xamarin Studio ) and looking for the option Enable profiling in iOS properties (Build > iOS Debug > Enable Profiling). But, I didn't find any any of those in my Xamarin Studio. (I have installed Xamarin Studio Community version).
Could you please suggest me with this, any help appreciated.
profile picture for facebook in xamarin.forms
im very interested in connecting an image and label via binding from the graph.facebook.api for the users profile pic/name...... now doing this via xamarin.forms is the real tricky part
// this is just the import part of eventshippage.xaml
<Label Text="{Binding}" xName="profilename" />
<Image Source="{binding}" x:Name="profilepic"/>
so on a master menu details page i have these two controls/elements
both have a name so i can reference them. the tricky part isnt the bindingcontext but
finding out how to make the right calls.
i followed an example of how to setup the login i think from AWS cognito cause im using their login features and did my research and found out i could
LoginManager.getInstance().logInWithReadPermissions(signInActivity,
Arrays.asList("public_profile", "email"));
what does any of this means i dont know cause ive been searching for documentation EVERYWHERE!!!! but ill give you a taste of my customfacebookbutton renderer
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Foundation;
using UIKit;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
using EventShip;
using EventShip.iOS;
using Facebook.LoginKit;
[assembly: ExportRenderer(typeof(FacebookLoginButton), typeof(FacebookLoginButtonRenderer))]
namespace EventShip.iOS
{
class FacebookLoginButtonRenderer:ButtonRenderer
{
protected override void OnElementChanged(ElementChangedEventArgs<Button> e)
{
base.OnElementChanged(e);
if (Control != null)
{
UIButton button = Control;
button.TouchUpInside += delegate
{
HandleFacebookLoginClicked();
};
}
}
List<string> readPermissions = new List<string> { "public_profile" };
private void HandleFacebookLoginClicked()
{
LoginManager login = new LoginManager();
login.LogInWithReadPermissions(readPermissions.ToArray(), delegate(LoginManagerLoginResult result, NSError error)
{
if (error != null)
{
App.OnFacebookAuthFailed();
}
else if (result.IsCancelled)
{
App.OnFacebookAuthFailed();
}
else
{
var accessToken = result.Token;
App.OnFacebookAuthSuccess(accessToken.TokenString);
}
});
}
}
}
so far i think ive understood that its in the custom renderer we want to do all the loggining and graph api calls though delegates. so in my app.cs ive got three delegates
using System;
using Xamarin.Forms;
namespace EventShip
{
public partial class App : Application
{
public App()
{
InitializeComponent();
//******* This Activates the Master Detail Page, by building a new navigation page and then sendng the menuepagemaster to it
MainPage = new NavigationPage(new MenuPageMaster());
}
public static Action<string> OnFacebookAuthSuccess;
// this one was made by me to try and only send the string url to the image binding but i couldnt figure out how
public static Action<string> UrlProfileImage;
public static Action OnFacebookAuthFailed;
public void UpdateMainPage(ContentPage page)
{
MainPage = new NavigationPage(page);
//MainPage = NavPage;
}
protected override void OnStart()
{
// Handle when your app starts
}
}
}
and this is where i want the info loading into but i dont know how im lost without any examples of code or clear documentation on neither xamarin.facebook or aws
using System;
using System.Collections.Generic;
using Xamarin.Forms;
namespace EventShip
{
public partial class FacebookMasterPage : MasterDetailPage
{
public FacebookMasterPage()
{
//profilepic.BindingContext;
InitializeComponent();
LoginManager.getInstance().logInWithReadPermissions(signInActivity,
Arrays.asList("public_profile", "email"));
this.Detail = new EventShipPage();
}
public void LoginButton_Clicked(object sender, EventArgs e)
{
this.Detail = new LoginPage();
this.IsPresented = false;
}
}
}
Xamarin.Forms 2.3.4.184-pre1
We've pushed Xamarin.Forms 2.3.4.184-pre1 to nuget. To install the pre-release, check the pre-release option in your nuget manager and install this version.
If you’ve got a bug to report, drop us a quick report here so we can troubleshoot in detail.
Important notes
Xamarin.Forms 2.3.4 depends on a Xamarin installation of Cycle 8. Users upgrading from Xamarin.Forms 2.3.3 (or earlier) will experience numerous compile errors if they attempt to build without first upgrading their Xamarin installation.
When upgrading Xamarin.Forms, take care not to simply "update all" as that will update the Xamarin.Android.Support packages to an incompatible version. More info here.
2.3.4.184-pre1
For all the details, please read the release post here. There is SO much goodness in this release, it's actually too long for the forum.
Picker - Done Text
Hello everyone.
How can I change the "Done" text in Picker component?
I'm from Brazil, and need translate this option.
See the attachment for more details.
Thanks
applying a class with bindable properties to multiple contentviews
Is there a way to reuse bindable properties among multiple content views? For instance, instead of placing the bindable properties in the code behind the content view xaml page, can I somehow inherit those bindable properties from another class and assign them to the contentView? My goal is to have multiple control layouts that contain the same bindable property type. I don't know of anyway to do this, but it made sense that something like this exists.
Visual Studio Erro
Severity Code Description Project File Line Suppression State
Warning IDE0006 Error encountered while loading the project. Some project features, such as full solution analysis for the failed project and projects that depend on it, have been disabled. AluraAPP.iOS.
I using Xamarin.form
I already reinstalled the visual studio and xamarin vs, but this error to be continued.
someone has gone through this error ??
i need help.
How to implement a Pop Up window in Xamarin Forms?
Is there a way to implement a Pop Up window in Xamarin Forms where you can put images, label, etc. and dynamic? Especially in a Map? Is there any generic implementation. Let me know. Sample code would be better. Thanks.
Custom TabbedRenderer to set tab text color on Android
I found an iOS render:
but I can't seem to find a similar Android rendered to set to set the tab text color. I found a bunch of posts that reference things like background color:
but nothing for tab text color.
// http://forums.xamarin.com/discussion/comment/80381/#Comment_80381
public class CustomTabRenderer : TabbedRenderer
{
private Activity activity;
private bool isFirstDesign = true;
protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
{
base.OnElementPropertyChanged(sender, e);
activity = this.Context as Activity;
}
protected override void OnWindowVisibilityChanged(ViewStates visibility)
{
base.OnWindowVisibilityChanged(visibility);
if (isFirstDesign)
{
ActionBar actionBar = activity.ActionBar;
ColorDrawable colorDrawable = new ColorDrawable(Color.White);
actionBar.SetStackedBackgroundDrawable(colorDrawable);
// TODO: set tab text color
isFirstDesign = false;
}
}
}
Display AdMob ads with Xamarin.Forms
I have tried to use the Xam.FormsPlugin.AdMobView in my Xamarin.Forms (Portable) project and getting this error, is there any way to resolve below error or any other solution to use the AdMob ads in Xamarin.Forms (Portable)?
Thanks in Advance.!