Android Studio空白活动 [英] Android Studio Blank Activity

查看:79
本文介绍了Android Studio空白活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Android Studio 2.1,并且没有空白活动选项.我见过有人在问这个问题,一般的建议是自己做一个".问题是我对Android开发一无所知,因此我正在按照本教程http://developer.android.com/training/basics/firstapp/creating-project.html 应该会带我完成基本步骤(至少看起来会做到这一点).因此,我正在努力使事情与他们在那里所做的保持一致.那我应该选择空活动还是基本活动?我对它们都进行了尝试,但据我所知,它们之间几乎没有什么区别,但是空活动"听起来比基本"更像是干净的启动活动.我不知道.我该怎么办?

I'm using Android Studio 2.1 and there is no Blank Activity option. I've seen people asking about this, and the general advice was "make one yourself". The thing is that I know nothing about Android development so I'm following this tutorial http://developer.android.com/training/basics/firstapp/creating-project.html that should take me through the basic steps (at least it seems that it will do that). So I'm trying to keep things in line with what they do there. So should I go with Empty Activity or Basic Activity? I tried them both and from what I undestand there are little differences between them, but Empty Activity sounds more like a clean startup activity than Basic. I don't know. What should I do?

推荐答案

空活动与空白活动相同.它将为您提供 .xml 文件,该文件将作为您放置 Buttons EditTexts .java 的布局文件,您将在其中编写活动代码.
但是基本活动"将为您提供两个 .xml 文件,即 main_activity.xml 文件,其中包含 FloatingActionButton ToolBar 它将包含第二个 .xml ,其中将放置 Buttons 和一个 .java 文件.
如果您是刚开始使用Empty Activity进行android开发的人,那么更容易理解

Empty Activity is the same as Blank Activity. It will gives you .xml file that will be your layout where you put your Buttons or EditTexts and .java file where you will code your activity.
But Basic Activity will gives you two .xml files, the main_activity.xml that contain FloatingActionButton and a ToolBar and it will include the second .xml where you will put your Buttons and one .java file .
If you are new at android developing start with Empty Activity it's more simple to understand

这篇关于Android Studio空白活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆