简体   繁体   English

如何从android sdk中找到其他示例代码?

[英]how can i find additional sample code from android sdk?

for example I wanna use PopMenu, then I wanna find some sample code:as we all know that the android sdk contains all the sample code for all the android components but 例如我想使用PopMenu,然后我想找到一些示例代码:众所周知,android sdk包含所有android组件的所有示例代码,但是

how do i know under which path I should do the search ? 我怎么知道应该在哪个路径下进行搜索? because they are under different folders. 因为它们在不同的文件夹下。

it's really disturbing me that every time taking that much time to find it. 每次花这么多时间去找到它,真的让我感到困扰。

Please start your android studio and follow below steps : 请启动您的android studio并按照以下步骤操作:

  1. Start Android Studio and Open SDK Manager. 启动Android Studio和Open SDK Manager。

在此处输入图片说明

  1. Now click on ' Launch Stand alone SDK Manager ' and check if samples are downloaded or not. 现在,单击“ Launch Standalone SDK Manager ”,然后检查是否下载了示例。 If not then please download it. 如果没有,请下载。

在此处输入图片说明

  1. After downloading samples please click on ' File ' menu and import your samples. 下载样本后,请单击“ 文件 ”菜单并导入样本。

在此处输入图片说明

Edited : 编辑:

Kindly note that as of Android Studio 1.4 Preview 2, 'Import Sample' moved to ' File -> New -> Import sample'. 请注意,从Android Studio 1.4预览版2开始,“导入示例”移至“文件->新建->导入示例”。

在此处输入图片说明

Thank you.!! 谢谢。!!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM