After updating android studio this code is not working properly - android-viewholder

enter image description here
this line has a problem and i can't find the updated way to implement this view holder

Related

How to scale winform to see the whole view

I'm following online tutorial to learn developing C# program using Visual Studio, and I am struggling with the display difference between my Visual Studio and the Tutor as following pictures, Although I am sure that I've set all the font format to the same :
Tutors' View:
enter image description here
My View:
enter image description here
My question 1 :
How can I display the whole form in a view? It's hard to arrange some layout when you have to scroll up-and-down to see the rest part of the form.
My question 2 :
Why is my view different to the tutors'? Is there something different in the Visual Studio between ours? Where can I set the parameters?
I'm using Microsoft Visual Studio Community 2019 Version 16.9.1 and Windows 10
Thanks!
I've tried:
Ctrl + Scroll mouse wheel to room out, but failed, nothing happened.
enter image description here Try this function, even worse, the word became even bigger.

Looking for ways to edit Xamarin code on the run

This question could be split in 2:
is there any way to update xaml form markup in runtime and see the changes after re-entering the form? Similar to the way we can update asp.net pages in runtime
is there any way to update xaml.cs class in runtime? If I try, it shows me deceptive message
which is not true, as the change is small and compilable
Another strange thing displayed after that is the error in the Error List window
However project is already build on .net standard 2.1.0.0, and can see it in the project properties
XAML
Using XAML Hot Reload, it is possible to update your XAML during runtime and see the updates in real-time on the device/simulator.
C#
It is not currently possible to update and see your C# code changes during runtime.
The Xamarin engineering team is working on adding this feature and ou can follow their progress here: https://developercommunity.visualstudio.com/idea/650684/c-hot-reload-xamarin.html

How can I fix this issue in Android Studio

After making a new project, I found that there is something wrong with Android Studio(I can't see the changes in design ), like adding widgets and the suggestion window doesn't appear, and the preview window shows an error(one or more layouts are missing the Layout_width or Layout_height, although, the two widgets which exist already have those attributes. The error is attached here:

I get an error in Master Detail page

So I create a standard xamarin form project with a default template, then I add a Master Detail page template to the project and when I compile this project on the phone I open the side menu and when I click on Page 1 I get the error "System.InvalidCastException: Specified cast is not valid. " I do not change the default template in any way, but I get an error, I believe that it is related to the transition to Page 1 and I do not understand by what principle this transition occurs. Thanks.
enter image description here
The problem is related to the name of your view is "Page" or already there is a type in xamarin forms with the same name "Page" try making names more clear.
to resolve your problem try forcing the xamarin forms type
(Xamarin.Forms.Page)Activator.CreateInstance(item.TargetType)

How to link XAML file to Xamarin.form Previewer

How do I connect XAML file to Xamarin.form Previewer
as you can see this XAML file not linked to previewer
As mentioned here, you will need to assign some static data to your view for the Previewer when using Bindings. You can do so by assigning a static data context. James Montemagno has already described how to do so here.
If that doesn't solve the issue at hand, then Xamarin is already aware that some issues may exist since the Previewer is still only in preview:
Project should be built (compiled) before attempting to preview XAML files.
The Designer Agent must be set-up the first time you preview a XAML file - a progress indicator will appear in the Previewer, along with progress messages, until this is ready.
Try closing and re-opening the XAML file.
If the solutions as mentioned above doesn't solve the issues you experience, I would recommend that you get in touch with Xamarin. As mentioned, the Previewer is still in preview, so issues may still exist.

Resources