Android Studio 4.0 新 Class
Android Studio 4.0 New Class
AndroidStudio 4.0已经发布,我尝试创建一个新的Class,
但是这里有一些不同,class不是直接创建的,我必须在这些输入框中填写信息,但我不知道这些要填写什么。如果有人知道如何填写,请回答这个问题。
您可以在android studio 4.0中查看文件模板的代码:
您还可以阅读文档:
https://developer.android.com/studio/write/create-java-class#variables
- IMPORT_BLOCK - A newline-delimited list of Java import statements necessary to support any superclass or interfaces, or an empty string (""). For example, If you only implement the Runnable interface and extend nothing, this variable will be "import java.lang.Runnable;\n". If you implement the Runnable interface and extend the Activity class, it will be "import android.app.Activity;\nimportjava.lang.Runnable;\n".
- VISIBILITY - Whether the class will have public access or not. It can have a value of PUBLIC or PACKAGE_PRIVATE.
- SUPERCLASS - A single class name, or empty. If present, there will be an extends ${SUPERCLASS} clause after the new class name.
- INTERFACES - A comma-separated list of interfaces, or empty. If present, there will be an implements ${INTERFACES} clause after the superclass, or after the class name if there’s no superclass. For interfaces and annotation types, the interfaces have the extends keyword.
- ABSTRACT - Whether the class should be abstract or not. It can have a value of TRUE or FALSE.
- FINAL - Whether the class should be final or not. It can have a value of TRUE or FALSE.
AndroidStudio 4.0已经发布,我尝试创建一个新的Class, 但是这里有一些不同,class不是直接创建的,我必须在这些输入框中填写信息,但我不知道这些要填写什么。如果有人知道如何填写,请回答这个问题。
您可以在android studio 4.0中查看文件模板的代码:
您还可以阅读文档: https://developer.android.com/studio/write/create-java-class#variables
- IMPORT_BLOCK - A newline-delimited list of Java import statements necessary to support any superclass or interfaces, or an empty string (""). For example, If you only implement the Runnable interface and extend nothing, this variable will be "import java.lang.Runnable;\n". If you implement the Runnable interface and extend the Activity class, it will be "import android.app.Activity;\nimportjava.lang.Runnable;\n".
- VISIBILITY - Whether the class will have public access or not. It can have a value of PUBLIC or PACKAGE_PRIVATE.
- SUPERCLASS - A single class name, or empty. If present, there will be an extends ${SUPERCLASS} clause after the new class name.
- INTERFACES - A comma-separated list of interfaces, or empty. If present, there will be an implements ${INTERFACES} clause after the superclass, or after the class name if there’s no superclass. For interfaces and annotation types, the interfaces have the extends keyword.
- ABSTRACT - Whether the class should be abstract or not. It can have a value of TRUE or FALSE.
- FINAL - Whether the class should be final or not. It can have a value of TRUE or FALSE.