I seem not to be able to find any of the Google Android samples. For example, I'm reading this: https://developer.android.com/guide/topics/graphics/prop-animation.html#keyframes, and there is a link to a MultiPropertyAnimation sample which should show how to use keyframes. When I click there, it get redirected to a samples main page, and the sample I'm looking for is not there, or at least I can't find it. The same for quit a few other samples. I also tried importing the samples in Android Studio, which provides a search/filtering interface, and can't find anything there.
Has Google moved the samples, and forgotten to update the rest of the docs? Did the 'old' samples get deprecated and moved elsewhere? Can they still be accessed?
The latest (and most convenient way) to do it is:
open android studio
if a project is currently opened, close it (file -> close project)
on the following screen choose "Import an Android code sample".
Also see http://developer.android.com/samples/index.html
Related
When I use the command 'Quick Documentation' in Android Studio in a class that comes from one of the support libraries (e.g. ActionBarActivity), the IDE does not show the documentation for the class. If I use it on one of the classes from, say, the Android API 19 (e.g. Activity), the IDE displays the complete documentation as is shown in the reference page on https://developer.android.com/reference/packages.html.
Is there any way to add the documentation for the support libraries to Android Studio so that they can be accessed through 'Quick Documentation' as well?
When Android Studio has opened the decompiled jar class, click on "Download..." blue link at top right, this will download jar with javadoc and save it in :
/.ideaLibSources
rebuild project if necessary, now doc is available.
Tested on android studio 2.0 preview 4.
If you are not using Gradle, this will be easier for you.
Go to File -> Project Structure. From there, on the left-hand side, select Libraries. Select the library you want to add source/java-docs to, then click the plus at the bottom and add the source and/or java-doc jars. There's a chance AS will automatically know what's what.
If you're using Gradle, more than likely in Project Structure, you won't see the Libraries tab, and I'm sorry but I don't know how to help from that point. If you use Gradle, AS detects that and takes away "unnecessary" options. Sorry to send you searching again, but I know there's something called a .properties file for jars that tell the source and java-docs, but I haven't implemented it. If I can find the page that told me that information, I'll update this.
EDIT: The answer is here. This should help you out.
I have downloaded all documentation with SDK manager help. But how can I open this documentation and the samples of code in Android Studio after downloading?
According to Android Studio Tips and Tricks, you can press Ctrl+Q to show docs for selected API under Windows or F1 under Mac.
For the samples , you can use eclipse to export to Android Studio.
First you need to make sure the documentation is added to Android Studio.
Go to File -> Project Structure. Under the Platform Settings heading, add or select an Android Platform. Go to the Documentation Paths tab and make sure the path to your SDK's documenation folder is added there - it should be [SDK]\docs\reference, where [SDK] is the full path to your SDK installation. If it is not there add it manually.
Once this is done, use Ctrl+F1 while your cursor is on the item you want to display help for.
The samples have not been ported to Android Studio yet, but I'm sure google will get around to it at some point. For now follow the instructions in the comments by androidika (you will need a copy of Eclipse installed).
In Android Studio you need to download javadoc dependency which is part of sdk.
If you enable documentation to appear while writing code in android studio by navigating to
File-> Settings-> Editor-> General-> Other
and
selecting(check box) Show Quick documentation on mouse move, you would get irritating after some time because it will come out automatically you when you would be writing code.
So, I think we should go to alternative ways by using Ctrl + Q(on Ubuntu at least I am not sure of other environments). This way when you would feel help you can simply use the simple command.
I was trying to find this setting in the latest build of android studio, and after wasting a lot of time I finally found out that now the ide automatically finds the documentation, which can be opened with shift+f1 on a method.
Now a days once you Import project in Android studio, it will automatically shows docs. But on mouse hover you want to expand it.
Docs hover page was simply resized very short like the above, it looks like docs is not avail. But when I Carefully moving the mouse down to the bottom of the hover page allowed me to resize it.
I'm having a real bad time trying to get Licensing to work. I'm following the docs at this location. I built the LVL library from the existing code in the Google Play Licensing Library and put the library into my workspace along with my android project.
I'm using code from this example that packages the licensing logic into a separate activity but I believe this is moot to the problem I'm having as I have tried it from my own main activity too.
THE PROBLEM IS: I cannot import com.android.vending.licensing...
The graphic below illustrates the problem. Internet research on this issue turns up many developers having this and related problems but none of the solutions work for me.
Does anyone have a clue?
Right click on LVLibrary -> Properties -> Android
Check if isLibrary is selected (checked)
THen go into your com.deanblake... and right click on that, then same as above but where you see reference check if the libarary is added (doesnt have an x next to it). If not just click Add and select LVLibrary.
ScreenShot http://dl.dropbox.com/u/33331786/swipedemo.png
I would like to know how to setup the animation where, for in example in the latest Twitter for Android App, you can swipe a tweet to the side, and a quick menu will appear(not the old popup one).
Thanks..
Since this is a really cool feature and I didn't find an implementation for that I created it myself. I started a project which will contain this feature (besides other dev tools).
Update:
The project has moved to GitHub (android-toolbox)
The project contains that feature and meanwhile has some good bugfixes since I used it in another app. The feature is called swipeable quick action.
There's a showcase application which demonstrates it and shows you what the code looks like. For quick starters there's an APK file in the download section so you can see what it it is without have to read everything you find in the project wiki.
If you want to see this feature in a real application you can check my banshee-remote project (screenshots). The application itself is interesting only when your using Banshee as your favorite music player.
Critic, requests, bug reports or any kind of feedback is very welcome! I'll respond to every message ;-)
I'm trying to add the facebook SDK to my project but it won't work at all.
I've followed the official steps; opened the fb sdk, made sure it's set to "is library", in m yown project go to properties->android->add library and it lets me select com_facebook_android and it shows up with a green tick next to it. HOWEVER, when i go back to that screen straight away it now has a red cross next to it, and if i try to launch the app in the emulator it has " com_facebook_android] Could not find com_facebook_android.apk!"
(This is just me testing without referencing the library in my app)
if i DO reference the library, then any calls to the facebook library give an error within eclipse and the tooltip suggests to add it to build path, so if i click that it launches fine, but still does the above apk error and the app force closes on any activity which references facebook.
As far as I can tell I'm following the official instructions fine but it just keeps coming back to that red cross in my app's properties
Does anyone know what this could be?
Not sure why you have the issue, i've setup a empty project with facebook library in it, if you have no luck then try downloading that, unzipping it and importing exsiting project into workspace.
link : Download here
you know what i have done one trick to use the official facebook SDK in my application, i have created com.facebook.android and add all the library classes into it. Then i can easily reach to access any class whenever i want it. This can be a way to use the classes inside your application instead of using Library.
Its running fine in my case.