Android layout doesn't load in Visual Studio 2013 - android

I'm using Xamarin for developing android application. I want to switch to Visual Studio(2013) because is more familiar to me, but I have a problem when I try to edit layouts. The designer doesn't load at all, I view just an empty rectangle on the layout, even if in code the xml is present with all elements.
What I'm doing wrong? I should connect visual studio with Android Designer?
Thank you in advance!
Images of layouts - design and xml (I cannot add them here :| )
1. Designer - http://imgur.com/B0u5XaC,pGMJuky#0
2. XML - http://imgur.com/B0u5XaC,pGMJuky#1

Ok, I fixed it. I'll post the solution, maybe it can help others - the problem was related to sdk v.23.0.5. I downgrade it to 23.0.3 and now it works perfectly!

Related

Android-Xamarin RelativeLayout Attributes not working

For Android in RelativeView , some attributes arent working. It keeps saying they aren't declared. How do i fix this?
This is in VS community 2015 with Xamarin
That's fine. It will always say there are some errors but it will compile. I usually use Android Studio to edit those XML files and paste to VS. The VS designer is not as easy to use as Android Studio's.
But here Relative Layout do not have Orientation, that's for Linear Layout.

ListView tools:listitem not working in android studio 2.2 stable channel

Steps to Reproduce:
Open Layout editor
Add a ListItem
Specify tools:listitem property with a valid row_layout
What should happen:
It should use the layout from tools:listitem to render list items.
Actual result:
Nothing changes, it still shows the default list with generic views
Bug Report
I could see this bug was already filed on Jul 5, 2016 Bug Report Link
Are there any work around available to render list?
One thing to notice: it's tools:listitem not tools:listItem which is somewhat confusing. Took me some time to figure that out, since Android Studio currently doesn't provide autocompletion for that.
You must define an id i.e. android:id="#+id/list_view" to your list
Another reason why tools:listItem doesn't work is when you're using the AndroidX's RecyclerView when using an older Android Studio. Update to 3.2 or higher and it will work.
This is fixed in Android Studio 2.3 beta 1
File -> Invalidate Caches and Restart
fixed the issue for me

How can i see the preview in eclipse adt while coding in xml?

I cannot see an window showing preview for xml in the eclipse adt.
please help.
Click Graphical Layout Tab . near the YOUR_FILE_NAME.xml Tab
Select Graphical Layout Tab in xml editor.
How can i see the preview in eclipse adt while coding in xml?
It is not Possible. The functionality is not included in Eclipse. It is there in Android Studio i.e. you can see layout changes with corresponding code change side by side the functionality comes with the name tab preview.
I recommend you switch to Android Studio for that.
This may be useful to you : Where is Android Studio layout preview?

Unable to drag UI elements to Android layout Eclipse

I am having trouble getting Eclipse 4.2 to work with the latest Android SDK. When I try to drag any of the UI elements from the palette onto the Graphical Layout of the XML, or onto the outline view, nothing happens. Same is true when I try to drag existing elements in a relative layout. I am able to use the XML for the layout but not the designer.
I am also not able to close tabs using the x icon, I have to right click then go to close.
I have tried using Eclipse 3.7, same problem.
Thanks in advance for the help.
The emulator might be running. Try closing the emulator and drag ....it should work !
Hello I am assume that into your XML file, You can not see the graphical layout.
I have also face the same problem when I import the project from the workspace, that time simply close the project and again open the project.It works for me.
And for more Information see this LINK
Finally solved by re-downloading eclipse
Check your XML for warnings displayed as little yellow exclamation marks like this one:
Although my code was running fine this prevents any drag and drop.
Try cleaning the project and run it again. this worked for me.

Eclipse Android XML content assist not working

My content assist was working for Eclipse XML (android) until I did an update of the android sdk, now the "design" of my xml files isn't a graphical view and when I use CTRL+space, I always get these four non-usable suggestions:
"default namespace - Default namespace attribute",
"noschemaLoc - no namespace schema location",
"schemaLoc- XML schema location attribute",
"xsinsp - XML schema namespace"
I also installed dreamweaver which may have interfeared with the XML extension.
A suggested solution is to right click on the .xml file and select choose another program called "Android Layout Editor". But I can't find it anywhere, I think it might not be on my computer.
I have also tried changing workspace without any success.
Any suggestions how to fix this ?
Right click on xml file and select openwith option and you can find Android Layout Editor.
If your content assist is working for java but not for xml, go to window-> preferences->xml->content assist and:
set the delay to 20 ms instaed of 500
set the suggestion strategy to LAX
add the entire alphabet to prompt when these characters are inserted: <=:azertyuiopqsdfghjklmwxcvbn
These are the things that worked for me, and programming with content assist is so much easier
;)
Update to ADT 16 which came out yesterday; the bug should be fixed there. ("The bug" being the bug that in ADT 14 and ADT 15, many newly added XML files would end up being assigned to the default XML editor instead of the customized Android XML editors.)
Re-install the SDK android-platform that you are working with. The resource files may be corrupted [e.g. android-sdk-windows\platforms\android-10\data\res\values\attrs.xml].
It's android sdk problem just change android currently version to another one
like if you are currently using android 2.3.2 than change it to android 2.3.3 i have tested it's currently working fine!!!
You can change it through PROJECT->PROPERTY->ANDROID now on that change version
Or you can set the default editor in Eclipse Preferences, used Android Common XML Editor.
You find it in Eclipse Preferences, General, Editors, File Associations. Click on .xml, choose "Add" "Android Common XML Editor". Select it and press the Default button.
very helpful i am jut following Step
click on xml file-right click on file -then choose the Android Layout Editor.

Categories

Resources