Xamarin xaml CoordinatorLayout - android

I am working for the first time since a while in VS with Xamarin and I am trying to add material design to my app. I added the references to my project (Xamarin.Android.Support and dependencies).
<android.support.design.widget.CoordinatorLayout
..........
</android.support.design.widget.CoordinatorLayout>
and
<android.support.v4.widget.DrawerLayout
.......
</android.support.v4.widget.DrawerLayout>
On both I am getting the message:
element is not declared
Do I miss a dependency? I used the xamarin guide & google dev as to get what might be missing.
Maybe someone faced the same issue?

Maybe this can't help you, but what i do when working with layouts in Xamarin and face a problem is copy and paste that layout in an project in Android Studio just to saw if it renders without problems.
Xamarin layout engine won't work with all kinds of available elements.

Related

Xamarin axml, xml Intellisense not working

I started using Visual Studio 2017 Enterprise Edition with Version 15.7.4. and Xamarin Version 4.10.0 and need to work on Xamarin native android application.
But Auto fill suggestions not coming in xml and axml files. Intellisense working for widget names(Like TextView, EditText etc.) In layout axml files. But, for widget properties (Like android:layout_width, android:gravity etc.) it isn't working. Where as in styles.xml, menu.xml suggestions not coming at all. I check with following ways.
1) XML - Schemas > android-layout-xml.xsd and schemas.android.com.apk.res.android.xsd files are exists
2) File opened as XML (Text) Editor
3) I didn't find Resharper in Tools
Also, Is there any way to change Xamarin keyboard shortcuts to Android Studio or Eclipse?
Being a Xamarin developer for almost two years I have come to terms with the fact that the Xamarin Android intellisense has never worked as it is expected.
It has a lot of bugs and issues (Links below) which have made it a real pain in the neck, But there are workarounds which you have already mentioned above and if those do not work for you trust me nothing will.
https://forums.xamarin.com/discussion/118384/android-designer-does-not-work-well
https://forums.xamarin.com/discussion/125879/designer-not-loading-layout-at-all
https://forums.xamarin.com/discussion/76851/visual-studio-2015-android-designer-not-working
https://forums.xamarin.com/discussion/82082/android-designer-not-working-in-visual-studio-enterprise-2015
https://forums.xamarin.com/discussion/6258/android-designer-doesnt-work-in-vs-2012
https://developercommunity.visualstudio.com/content/problem/99268/xamarin-android-designer-not-working.html
My suggestions:
Android studio provides you with a very strong designer and hence I would simply suggest you use Android studio to write down your XML and then just copy paste it to your Xamarin AXML/XML files and it should work like a charm, Same can be done for any other time of files such as strings or styles XML.
For changing the visual studio shortcuts you can simply check the following guide

Can't edit anything or drag widgets in Android Studio

I started off with a black activity and whenever I try using Android studio, I get stuck in this screen. I cant drag any widgets, enter any text, or make any changes to the user interface. Is there anything I am missing? I downloaded all the Android Studio bundle and I have all the required SDK tools. I have attached a screenshot of what I am currently stuck with.
A screenshot of what I am seeing:
Recently I encountered the same problem myself. After some research I found that you must now use the "content_activityname.xml" file in order to edit the ui of an activity.
In your case this file is located in the layout folder, right under your activity_main.xml in the picture provided.
According to this thread: What is the role of content_main.xml in android studio 1.4? the main.xml now contains the global look of the ui, and also contains the content.xml file which again contains the components of the ui.
You should think of uninstall and reinstall Android Studio and after that creating a new Project. You also are able to look at some tutorials created by the creators of AS. They can be found at Android Developers.

Design changes in library project of android studio does not affected

I have integrated a text-chat-sample application in my project.
I want to change the design of the text-chat layout. For this I have to change the design in text-chat library. I have changed it but the application is unaffected.
Are there any steps I need to follow in android studio?
I have checked it and tried to change the design in the library but it didn't take any changes which I have made.
So for solving this issue, I have copied all the required resources like Java class, XML files into my project.
Then I have made UI changes over there and it works perfectly.
Hope this will help you too ;)

Android toolbar height difference

recently I started working with android toolbars.
I am testing on android version 4.4.4 and 5.1.1. I am facing that the toolbars height are different. I have been trying hard to find an answer with no luck. I can provide source code, if you need.
Thanks in advance and Happy Holidays!
I already recreated the project from scratch, so I can not provide source code. Maybe I forgot to add android:fitsSystemWindows="true" in my layout.xml.

android material design issue

i am trying to solve a issue for last 1 week. i am not sure what is wrong with the code.
i am trying to use this library https://github.com/rudsonlive/NavigationDrawer-MaterialDesign
I can able to compile and run the code
the issue is ,there is big difference in the display quality
clearly we can notice the font is completely not matching.
please help me to resolve this.
You should use Android Design Support Library to achieve this.
It's quite easier and will surely fix your problem.
Check this official sample to learn how to use this:
https://github.com/chrisbanes/cheesesquare
Omg i cannot believe it. the actual problem with me is eclipse.
I use android design support library and all other needed libraries.
i only can manage to run the project but when i imported the project using android studio everything is working fine without any additional work.
dam it.
any one tired with eclipse ?

Categories

Resources