Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open android documentation and samples of code in android studio

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?

like image 719
veinhorn Avatar asked Jul 28 '13 20:07

veinhorn


People also ask

Where do I put code in Android Studio?

Android Studio offers an advanced layout editor that allows you to drag-and-drop widgets into your layout and preview your layout while editing the XML. To get started, click the module where you want to add the layout, then click File > New > XML > Layout XML File. Learn more about the Layout Editor.


2 Answers

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).

like image 185
free3dom Avatar answered Oct 02 '22 21:10

free3dom


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.

like image 39
einverne Avatar answered Oct 02 '22 21:10

einverne