Use ChromeView in Android App - android

I'm trying to use ChromeView on my Android app in order to run some preload html. I follow this tutorial https://github.com/pwnall/chromeview
I can import it correctly to my project, but i can't see the ChromeView component on the Pallete, as it is mentioned there, so my app crashes because "Class Not Found" exception is raised.
Thanks in advise

I just implemented this and It worked. Hopefully it helps someone.
Here's how I did it:
Instead of looking for ChromeView on the Pallete, I would recommend that you just type it in the XML. Much quicker.
Here's how:
BUT, if you prefer to do it in the design mode, look for Custom View on the Pallete.
And when you click on it, it will show all the custom views available from the linked libraries, etc. Pick ChromeView from the list.
If ChromeView is not on that list and if you manually type it in XML and give you error, the chromeview package isn't linked correctly.

Related

FragmentPagerAdapter cannot be resolved to a type

I'm trying to follow Google's tutorial for implementing a ViewPager with Fragments using the Compatibility Package as described here: http://android-developers.blogspot.com/2011/08/horizontal-view-swiping-with-viewpager.html
I added the Compatibility Package and I can create classes that extend Fragment and add a ViewPager to my XML layout, but when I try to create an adapter class that extends FragmentPagerAdapter Eclipse doesn't seem to know what that is. What am I missing?
Use the following instructions on this page: http://developer.android.com/training/basics/fragments/support-lib.html,
just a matter of adding the library android-support-v4.jar. sorry for my English, I'm learning recently
So I fixed this problem by downloading the Compatibility Library on another computer attached to a different network (the same way as before, through the right-click menu in Eclipse) and then copying the resulting android-support-v4.jar back over to the original computer.
The new file was about 137k versus the 104k version that my local version of Eclipse was getting. I'm not sure where the discrepancy comes from, but my best guess is that my locked-down corporate internet access was blocking select files from the library and leaving me with an incomplete version.

Android GUI using Eclipse

I've been using XML to create my UI and I know this question may sound silly but it is not.
How do you create a UI using the Android plugin for Eclipse?
(Is there a step by step tutorial somewhere or can someone give me step by step instructions)
Does the class name have to be the same as my view name?
Android plugin comes with handy visual editor where you can drag and drop views and widgets easily. And you don't have to name the xml files similar to your activity class because you will use setContentView() inside the activity to specify its view
This may not quite be what you are looking for but I would check out DroidDraw. Makes doing Android GUIs more friendly. There is a tutorial at http://www.droiddraw.org/tutorial1.html
Here's some (new!) overview documentation for the Eclipse plugin; see the "Canvas and Outline View" section in particular:
http://developer.android.com/guide/developing/tools/adt.html
I would advise you to create a rough sketch of whatever you're going to design first. Once you had a rough sketch/draft in your head,it becomes much easier to design the real thing.
Here are some UI guidelines :
http://developer.android.com/guide/practices/ui_guidelines/index.html
And if you're looking for tutorials :
http://www.youtube.com/watch?v=maYFI5O6P-8&feature=relmfu

Where to find the source codes of the Android UI components?

I believe that all the source code in the Android framework could be found in https://android.googlesource.com, but I cannot find the source code of the UI components there, e.g., android.view.View, widgets, etc.
Can somebody tell me where the code is?
Check https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/. There are a few subdirectories for view, widget and so on.
See the Github mirror. In case this goes down or is not up to date you have to download the Android source.
The easiest way I found to browse android code is http://google.com/codesearch . Try put "android TextView" for example and you will find it very quickly. It has the added benefit of very fast and efficient search.
Note - there is even "Android" link at the left side to limit your searches just to Android. Just noticed it ;).
Disclaimer: My friend from Google, Miguel, developed big part of it ;).

What SWT classes are used in the Android ADT AndroidManifest.xml screen?

I'd like to write an Eclipse plugin that looks like the "AndroidManifest.xml" editor page in Google's Eclipse ADT plugin - specifically, this screen. I'm new to SWT development, though, so I don't have a very good understanding of what SWT components one would use to build a screen like this.
So, specifically, I'm asking:
Is there a particular layout I should use to build a screen like this?
What class gives the collapsible headers, like "Application Attributes", with the color-gradient backgrounds?
Are there any source-code examples available for a screen like this?
Better yet, is the source code of the ADT plugin available anywhere? I haven't found it online.
Thanks for your help!
I've accepted Marc's answer, but I wanted to give a more detailed answer here, for the benefit of anyone who comes along later:
The form in question is an example of a "Managed Form". I should have read this: http://www.eclipse.org/articles/Article-Forms/article.html
For the layout, org.eclipse.swt.layout.GridData and org.eclipse.ui.forms.widgets.ColumnLayout seem to be common choices.
The collapsible headers are a feature of the org.eclipse.ui.forms.widgets.Section class.
Javadoc for the Eclipse Plugin Development Kit, including the classes named here, can be found at http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/overview-summary.html
Answer to this part of your question:
Better yet, is the source code of the
ADT plugin available anywhere? I
haven't found it online.
The ADT source is public. See http://tools.android.com/ for more info. Specifically, this page describes how to get and build the source. You should be able to find what you are looking for somewhere in the source tree.

How do I see the core Android classes?

I am trying to look inside a couple of Android core classes to see about overriding some methods. I have looked into getting the Android source code, but the process described on the Android dev site is all about installing and setting up some kind of development environment. This is not necessary to me. I just want to open a class or two in a text editor and look at its contents. Does anyone know if this is possible without going through the multitude of steps described on the Android dev forums?
The easiest way is to use Google Code Search. You just have to try a search like Activity.java android and you can see the source code of that class. It even has an outline inspector:
You can download the entire source with git our just look it up as a reference on the git site. Here is a link to the sdk code:
https://android.googlesource.com/platform/frameworks/base
Another option is to use http://grepcode.com/ and perform a search such as "android ViewGroup". I've really enjoyed the style of using grepcode.

Categories

Resources