Custom Android Widget and Eclipse Intellisense - android

I am in the process of putting together a little Android app. I have created a couple of widgets by extending the ImageView and ScrollView widgets. The problem that I am having is not with the code itself (i.e. everything runs wonderfully) but rather with the Eclipse "intellisense" in an XML layout. If I am using the native android widgets, I get the normal eclipse suggestions and all is well. However, as soon as I add a reference to my widget (i.e. ) I lose intellisense on my widget AND (more painfully) on all widgets below my widget. In other words, I don't get intellisense on a if it exists below my widget. Again....everything runs, there is no error anywhere, it just becomes insanely slow to program this way.
This is very frustrating as I don't remember all the attributes of the various controls.
Has anyone encountered this or have any suggestions on where to begin trying to solve this? I don't even know what the correct term in Eclipse to start looking at this. After 3 days looking off and on, I am at my wits end.
Thanks in advance for any suggestions!

Try the new ADT 9.0.0 plugin. It has many improvements of the "visual editor". See the changelog here

Related

How to show error/warning marks in Android Studio scroll bar (like Eclipse)?

I apologize in advance if it is a duplicate topic, but I did not find a direct answer in any other.
Android Studio does not display marks (on the scroll bar) by referencing error/warning/occurences in the code. Is there any way to make it show?
I have not used Android Studio for a long time and I get lost because in Eclipse this is a basic functionality. So in files with many lines of code it becomes complicated to see the locations of the code where there are errors or occurrences.
In Android Studio it looks like this:
In Eclipse like this:
Is it possible to make Android Studio behave similarly to Eclipse? If not, is there any friendlier way to see the error/warnings/occurrences marks?
Thanks for any help.
Please check the highlighting level. Inspections should be selected...
No highlighting
highlighting now activated

tools for creating and checking android layouts

I spend an unpleasant time looking for erros in my android layout, fields not showing up being the predominant one. As I see other people here also struggling a lot with android layouts I thought to throw this question in even so not completely according to the SO question guidelines.
What tools are out there to help with the creation of android layouts.
there is only one i know. its called http://www.droiddraw.org/
over the time i figured though that the best is still to create your own by code.
If you're using a newer SDK within Eclipse (eg android 4.0 or 4.1) it should help you with the layout (with much more functional drag and drop and alignment/spacing). However, you may still want to manually verify it to make sure it's exactly what you want, since you'll be changing other parameters too.

Does UCDetector work for android projects?

I've got an android project that I started from an old standard Java project, so because of the vast difference in target platform, I have a lot of dead code to cleanup.
I've seen UCDetector recommended for finding unused public methods in java projects in Eclipse. I installed it as directed, and it just doesn't show up on the menu, and I have no idea how to get it to work.
Has anyone got this combo to work, or have another recommendation? Or know how to get it to show up?
(I've tried Find Bugs which found some good stuff, but it doesn't find unused public code.)
Big warning!
It might partially work, but beware, cause it doesn't seem to know about XML-defined callback functions.
If you have installed a callback function on a widget, say a button in an XML Style Sheet, and it is not called in code, UCdetector will think it has 0 references, and suggest it deleted. This obviously is wrong, and will render your code uncompilable.
There might be other similar issues, related to Android specifics.
Viggo
Yes, UCDetector works for android projects. I just installed it and it works.
It's available in context menu of project in Package Explorer.

Eclipse: intellisense laggy, how to change functionality

I've recently moved from VS to eclipse and am using the intellisense functionality. I came across a tutorial a week ago telling me to add 'source' directories to the android sdk to improve the speed of intellisense.
Anyways i still find it a bit sluggish and i was curious if there was a way to change how it functions from a 'remove suggestions' from the list to a 'highlight the most accurate so far'. This I BELIEVE would solve some of the lag issues.
I just answered a similar question over here:
How do I defeat Eclipse's autocomplete feature?
"There's a bug in Eclipse 3.6.1 that affects code completion (Code Assist). There is supposed to be a patch that will be in 3.6.2 when it's out, but this post from the Android Dev Google group shows a work around that patches 3.6.1. I've tried it and it makes a world of improvement.
https://groups.google.com/d/msg/android-developers/El-6ufT3F7E/uhxmLoUqnQ8J
"
It's called content assist in Eclipse and you can change almost everything in it.
You find it under Eclipse => Preferences => Java => Editor => Content Assist
Doesn't seem like at this point in time it is possible to duplicate this functionality. I'll keep an eye on this answer set should anybody choose to prove me wrong.

How to view .xml output on the go? (Android App-building help)

I'm a newbie Android App Developer, also new with xml. I was just wondering if there is an easier way to view xml output other than using eclipse to compile the android application (java + xml) and then see output in the android emulator. Just asking because it takes forever to check my UI through eclipse IDE to turn on android emulator then open my application, and I feel that there must be an easier way. I have searched for solutions but either I'm wording it incorrectly or I just do not know the correct terminology or there is no other way(hopefully not this option). Please help me figure out to how to run XML code to check and see the proper UI output (its layout, widgets in correct places etc.) without having to compile my application code every time.
I have already looked into DroidDraw - it provides one output within the the application and another output in android emulator. I find it quite inconsistent.
Any help would be highly appreciated.
Thank you
It's not very great, but Eclipse with the android plugin has a visual mode where you can see a preview of your xml immediately. It won't give you 100% accuracy but it does definitely help with simple mistakes. Just open your layout xml in eclipse, and notice the two tabs at the bottom: one is for the xml text, the other for the visual representation of it. You have dropdown menus at the top to try your layout on different screen sizes and orientations.

Categories

Resources