Android Source Codes, Custom Controls, Open Source Libraries - android

As I was googling, I found lot of codes and libraries. But all of them
are on different sites and could not find any managed site.
like for iPhone : http://cocoacontrols.com/
Is there any such site where I can find codes for Custom Controls..
I know some of top favourite like github.com, anddev.org and Im following too.
Please reply any such site that you found useful.
Thanks

hie vishal, I don't think there is any specific site wherein you can find custom coding source codes. But yes the top favorite list that you have specified indeed have lot of in it.
Secondly, apart from those there are many other sites like
http://blog.pocketjourney.com/2008/03/15/tutorial-1-transparent-panel-linear-layout-on-mapview-google-map/
http://mindtherobot.com/blog/272/android-custom-ui-making-a-vintage-thermometer/
and many more according to your requirements. You can learn and take their references for your requirement.
There is a lot more on the developer site for styles and themes which can definately make use off.
Hope this is what you were looking for.

Related

How to Implement a Word Cloud on a layout in Android?

I found Tag-Cloud but I think it is not yet ready. Does anyone have any word cloud generator libraries available that allows you to customize it's design?
I have found this and it seems usable:
https://github.com/sschwieb/Cloudio
http://wiki.eclipse.org/Zest/Cloudio
https://code.google.com/p/memeplex/source/browse/trunk/Android/src/kr/ac/yonsei/memeplex/view/TagCloudLayout.java?r=31
Though it might need to be changed or edited a little. I hope somebody can help me. I will be offering bounties in the next few hours
If you can offer any algorithms I will gladly study it as well.
Thanks in advance!
Depending on what your actual requirements are, you could use a really nice and customisable javascript word cloud written in D3 like https://github.com/jasondavies/d3-cloud and then embed it in a WebView in your Android app. There is an example on how to do that at https://github.com/mitchwongho/D3Android
Here is a simple example I made demonstrating this https://github.com/rbarbantan/android-word-cloud

AOSP: where can I find the layout of the new clock (fonts and size)?

As the new clock layout in Android 4.2 is awesome, I would like to use it as a basis for my apps.
Thanks to the beauty of Open Source, the source code is available, but I have been browsing it for hours and never found it.
I know posting no code on StackOverflow is not cool, but I strongly believe that sharing this info might be usefull for other developers.
Google has provided something really usefull:
http://developer.android.com/reference/android/widget/TextClock.html
zapi links are giving the same results, thanks for the help.
Not sure if that's it but have a look at
https://github.com/android/platform_frameworks_base/blob/master/core/res/res/layout/keyguard_screen_tab_unlock.xml
Should be some keyguard_* layout and the source for the digital clock widget would be
https://github.com/android/platform_frameworks_base/blob/master/core/java/com/android/internal/widget/DigitalClock.java
Edit: github seems to be outdated, the following ones should be more accurate
https://android.googlesource.com/platform/frameworks/base/+/android-4.2_r1/core/res/res/layout/keyguard_screen_tab_unlock.xml
https://android.googlesource.com/platform/frameworks/base/+/android-4.2_r1/core/java/com/android/internal/widget/DigitalClock.java

Where to find Android Development Homework Problems

Ok so I am starting off with android development and I have found a bunch of useful tutorials so I am set there. What I am looking for is a resource that provides homework style problems to do and has the answers downloadable so I can check my solution against the "official" solution.
So for example instead of the notepad tutorial it would be: "Build an application that you can create, edit, delete notes, ...etc.". Ideally the "official" solution would have some explanation as to why they built it the way they did. (so a tutorial at the tail end)
Anyone know of any resources that provide their tutorials in this format?
Thanks.
Okay, here's one: build me an app that allows the user to make, modify, and store notes. The 'official' answer is the Notepad app in the 9th level of the api. (Note that this is different from the notepad tutorial).
The point is that asking questions is easy, the harder part is actually making a program that does the job. And #Roflecoptr is right, at this level it can be implemented very differently. But if you want that mindset, you can write your own 'homework' easily. Just think up a few things you want that are simple, build it, does it do what you want well? Then you pass.
Despite for very trivial problems I dont think this is possible, because there are way to much possible implementation possibilites so that you can't compare your solution to the "official" solution.
But why do you need something like that? If you want to learn to program on Android, you can just follow some tutorials you've already found and then modify them, adapt them to your needs. When you get more used to the development of Android apps you can just get some ideas on tutorials/android development sites and then implement your own solution. There is plenty of help available here on SO and on other development sites, which will help you if you really get stuck.
You could always go to the Android Samples page, and without looking at their implementations, do your own and compare. The samples page is here:
http://developer.android.com/resources/samples/index.html

Any AppWidgetHost-tutorials out there?

I'm writing an application that should both have the ability to place widgets on the home screen, and to show these widgets in the application itself. I figure that the best way to do this is through the use of an AppWidgetHost for the application part.
I've been looking around, but I cannot find any good examples on how to write AppWidgetHosts. Have any of you done this, and are willing to share? Or do you know of any tutorials that I've missed?
Not exactly a tutorial but here is an older forum post.
The code is part of the mylock project, which you also might find useful if you dig.

android app search button

I've been trying to make my app implement the built in quick search, similar to how it is done in ApiDemos' "app/search/invoke search". I have tried everything from trying to follow different examples, to copying the code exactly as it is in ApiDemos.
All I've found for the former have been concerned with older versions of the SDK, and simply not worked. As for the stuff that I can actually run and see working in ApiDemos, I've tried copying the following
com.example.android.apis.app.SearchInvoke.java
com.example.android.apis.app.SearchQueryResults.java
com.example.android.apis.app.SearchSuggestionSampleProvider.java
res/layout/search_invoke.xml
res/layout/search_query_results.xml
res/values/arrays.xml
res/values/strings.xml
res/xml/searchable.xml
... and everything under "Search Samples" in AndroidManifest.xml
This copying gets me a view that looks exactly like the one I'm facing when running ApiDemos, but when I click the search button, in the quick search box, Android always just opens up a browser window, with Google search results for the given query. I simply cannot find the critical component in ApiDemos that tells android that I want to use my own custom code for handling the search request.
I would really appreciate some help in this matter. Both documentation and other online resources seem very lacking when it comes to this.
Thanks.
For reference, four months (and god knows how many attempts) later, I've found the part of the documentation I've missed out on, that had the whole search box behave fire up browser search results, instead of passing them to my own activity. It all comes down to a little notice found here:
Note that all user-visible strings must be provided in the form of "#string" references. Hard-coded strings, which cannot be localized, will not work properly in search metadata.
Try reading this first. If that does not help, you can try looking at the search example from one of my books -- that example integrates with the Quick Search Box, and perhaps it will give you more clues.
In addition to the examples provided by commonsware.com, you can look at the Searchable Dictionary in the samples directory of the 1.6 SDK.
http://developer.android.com/guide/samples/SearchableDictionary/index.html
I was wrong before... the SDK documentation has a thurough explanation in the docs for SearchManager that I suggest you take a look at. In addition, as CommonsWare mentioned, the blog entry is also a good resource.

Categories

Resources