I'm sure this has been asked before, but I'm having trouble finding the answer (overwhelmed with search hits).
Where can I find the source code to the default settings of the various built-in layouts and widgets?
Why? So I can see what they (the android developers) are doing so that I can emulate when I like, and change what I don't. There are hundreds, if not thousands of files in my API, so going through them one-by-one is...tedious at best.
Thanks in advance!
The source is in at the Android Git Repository at kernel.org in repository platform/frameworks/base.git. Clone this repository, as it is far less frustrating not waiting for it to load via the Internet. The View related code is a couple different packages, android.view, android.widget, and android.webkit. The the related XML resources are scattered a bit wider but to start take a look at values and drawable directories.
Related
I found this Image on the web and want to use a such list in android. Do you have an idea where I can find a such List in Android Studio?
There are certain lists that others have provided as free source code to be used within your applications. What you have discovered is not a built-in feature of Android (the IDE has not relevance on this).
You can however find resources to use a wheel such as those. One of which used in the past has been from the android-wheel code. Most will demonstrate examples and provide useful tips on going forward with implementation. But you can find others if you look hard enough.
I have downloaded Android 4.0.1_r1 source code to my local system. I'm working to understand building own custom Android ROM and modify it according to my requirements.
I went through a number of web based tutorials on how to build custom ROMs for Android and I am clear with the overall process. What I'm essentially looking for is a well defined structured way of removing packages that are downloaded along with the source code but not needed for my own version of the build.
Additionally, it would be helpful if someone can provide me links pointing to building android source (guides,books or tutorials) as most of the available resources are based on creating Android APPs using Android SDK and the application framework. Its difficult to find any decent indepth tutorial explaining the entire architecture , source tree and different build guidelines for platform level developers.
This is a good book, but it's not officially out yet (you can get the first few chapters only).
There is no real documentation, but if you hang out with CyanogenMod forums/IRC long enough you can get some insights. You can also ask questions on the official Google Groups, android-porting and android-platform should be helpful. Reading XDA can be helpful too, if you can filter out all the noise.
Generally, the whole thing is quite complicated, and there are parts that are device specific. The only thing that you can remove more or less safely without modifying things (much) are the bundled user-level apps (Calculator, etc). Even some of those may provide some system-level services, so you should watch out.
In short, buy the book, read the groups and ask more specific questions, like 'how do I modify X in order to do Y. I tried Z and it didn't quite work.
In addition to the answer, this is the closest I got to find a suitable information for modifying packages in the source code before building. It also has a decent information for memory optimization.
http://processors.wiki.ti.com/index.php/TI-Android-ICS-MemoryOptimization
For removing packages please refer to the section
Run Time-Volatile Memory Customization
subsection - Customizing Android Product Package
The article pertains to Froyo , but the concepts are pretty much the same Android 4 ICS.
I have added this for anyone seeking reference material on the same.
I recently downloaded the source code for Android. There are many folders starting from the root level and I was wondering if there is any resource on the web containing just an overview of the contents of different folders and where common libraries/framework classes reside.
Thanks.
The Android project is made by a bunch of smaller projects, all of them downloaded when you clone the Android repo (with repo init ...). I don't know if there's such a resource explaining what each project is and I wouldn't expect there is one.
Android framework classes are in their majority under frameworks/base/ directory, while apps like Settings, Browser and others can be found under packages/apps/. A really good way to navigate the sources is to use find + grep if you're under Linux. Another approach that goes SO independent is using Eclipse to navigate the sources. For this last approach, you can find the details here: http://blog.michael-forster.de/2008/12/view-android-source-code-in-eclipse.html
Note that classes in the framework that are not visible for application developers are not that well documented, so if you're planning on customizing Android be prepared to read a lot of code.
Sounds like you're after the javadocs?
We have several apps that will be very similar in layout and code. The only difference is we will be switching out graphical elements, and making changes to a single constants file and strings file. Of course, theres several problems with this -- the first being namespace. Having an app with the same namespace will overwrite any other apps.
What are some suggestions to doing this?
Currently our namesapce is:
com.company.appname
I figured I could do:
com.company.appname.appversion
I've seen post about ant scripts that helps with this, but I'm wondering if theres more fluid solutions now.
I would suggest looking into Android Library Projects to help with this.
I use this approach for a Lite vs. Free edtions of one of my apps. I have a Library project that contains all of the source and most of the resources for the apps and then 2 projects that use the 1st as a library project, one for Lite and one for Full edition.
The two dependent projects each have their own resources and manifest, allowing the namespace to be different and for me to swap in different strings, drawables, etc. depending on the edition.
I tried the Ant approach but it seemed to be much more of a hassle than the Library project approach. Hope that helps.
I'm not looking for a mock up tool, I'm looking for a reasonable GUI design tool for the final product in the style of Apple's Interface Builder. Droid Draw is buggy, out of date and inaccurate in my experience. Using the Eclipse plug in to do a complex layout makes going to the dentist seem fun. I'd even settle for hand-coding CSS pixel coordinates over the current model. Is the solution found here: http://andrdev.blogspot.com/2010/01/gui-designer.html the best, or have one of you ninjas found something else? If there is an actively developed project that isn't ready for show yet, I'd like to know that as well.
I don't see why you'd want something like this (especially the tool you posted a link to). That would mean learning a whole new language just to use that tool. Why not learn the XML definitions directly? Yes, it's a relatively steep learning curve but once you're up to speed you'll see it's great. Also, doing XML by hand will allow you to optimize your layouts a lot (there are a few articles out there on how to do that).
As to the Eclipse plugin, I find it quite awesome, although I never use it directly. I don't add/remove/edit elements with it. I write my XML code and then test it with the plugin so I don't have to recompile the app > upload it on the emulator > run the app > go through all the activities to get to the one I'm editing right now, just to see that I need to add a little more padding.
Also, in general, it's best to use the tools you are given. Third party tools are very likely to become outdated, discontinued, deprecated, ...
In conclusion: do it the right way. Write your XML by hand. Use the Eclipse plugin as a convenience tool.