-
Notifications
You must be signed in to change notification settings - Fork 56
Default login screenlet issue #74
Comments
Are you using the screenlet with Xamarin or native Android? |
Using it with Xamarin |
I'm not sure that you can instantiate the screenlet directly... can you use https://github.com/liferay/liferay-screens/blob/develop/xamarin/Samples/Showcase-Android/Activities/LoginActivity.cs as a reference on how to use it in Xamarin? |
I am already using it, but it didn't work. |
Can you use the screenlet that way? by referencing it from a resource file instead of instantiating it? |
Can you please elaborate this? And also is it possible to use life ray screenlets commonly for both iOS and Android. As all the tutorials we checked used liferay separately for iOS and Android in Xamarin forms. "All packages and projects are compatible with MonoAndroid,Version=v8.1." And this is the error I am getting while adding liferay screens commonly for iOS and Android. "Checking compatibility for Microsoft.NETCore.Platforms 1.1.0 with .NETStandard,Version=v2.0. |
Xamarin errors... @dgarciasarai can you look at this? Can you please elaborate this? To work you have to instantiate with a layout, the xml file, like this and reference it in your java code with findViewById, like this: protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
SetContentView(Resource.Layout.LoginView);
loginScreenlet = (LoginScreenlet) FindViewById(Resource.Id.login_screenlet);
loginScreenlet.Listener = this;
//Comment this method if you want to test LoginCheckPasswordView
setDefaultValues();
} |
@Moulikaattili Liferay Screens NuGet is not prepared to use commonly for iOS and Android in Xamarin.Forms. As you said, you have to use it separately (you have to install it separately in each platform). I'm going to take a look to the error that you found when you installed the package in Android platform. Which versions are you using? |
Below is the error I am getting while trying to add liferay screens for android separately. "All packages and projects are compatible with MonoAndroid,Version=v8.1." And this is the error I am getting while adding liferay screens commonly for iOS and Android. "Checking compatibility for Microsoft.NETCore.Platforms 1.1.0 with .NETStandard,Version=v2.0. The versions I am using for Xamarin.Forms - 3.6 Thanks in advance. |
Stuck with this issue. Please help us in solving this. |
Hey @Moulikaattili we reproduced the issue and we realised that it was caused due to a version conflict. Sorry for the inconvenience. We will let you know when we have a solution. |
@dgarciasarai Thank you for your support |
@Moulikaattili I think I found a solution. First, check if at the beginning of your Package Console you see something like this:
If that happen, you should install first the higher version which is involved in the conflict. In this case it's Let me know if it works as expected with this solution :) Regards |
@dgarciasarai a small question. Is it possible to integrate liferay screens (login) in Xamarin.Forms under .Net core? I tried it once but didn't happen so I chose shared option. |
@Moulikaattili Sorry, but if I understand you, Liferay Screens NuGet was created to use it in each platform. |
@dgarciasarai I got your point. My question is while creating the project, under shared code section if I select use shared library only then I am able to add liferay screens. But my main project is under use .Net Standard. So I want to make sure whether liferay works only with use shared library enabled. |
@dgarciasarai can you please help me in fixing this problem. |
Did you try it? |
Below is the code I Used in my project. A gray color screen was getting displayed but default login screenlet was not shown. when this piece of code was written "loginScreenlet.BasicAuthMethod = BasicAuthMethod.Email;" java null point exception was thrown. Please suggest me a solution for this.
var linearLayout = new LinearLayout(Context);
linearLayout.LayoutParameters = new LayoutParams(600, 400);
linearLayout.Orientation = Orientation.Vertical;
The text was updated successfully, but these errors were encountered: