简体   繁体   English

如何在Android Studio上获取类似于Eclipse的代码样式

[英]How to get Code Style like Eclipse on Android Studio

I am a student and I am developing android apps since 6 months and I was doing it on Eclipse which was include in ADT bundle. 我是一名学生,自6个月以来一直在开发android应用程序,我在ADT捆绑包中的Eclipse上进行了开发。 but last week I downloaded Android Studio because some of my friends recommended it to me but for me it is like a powerful machine that I can't use. 但是上周我下载了Android Studio,因为我的一些朋友向我推荐了Android Studio,但对我来说,它就像是我无法使用的功能强大的机器。

I am facing problems like- 我面临的问题是-

->When I use to click tab in Eclipse it use to take me out of the parenthesis or braces but in Android Studio when I press Tab key it inserts 6 spaces inside the brackets. ->当我在Eclipse中单击Tab时,它使我离开括号或花括号,但在Android Studio中,当我按Tab键时,它会在括号内插入6个空格。

->I am facing several code completion problems because in Eclipse it was working like charm it use to also add the arguments which method was accepting but in android studio it only gives out the method. ->我遇到了几个代码完成问题,因为在Eclipse中,它的工作方式很像魅力,它还用来添加方法接受的参数,但是在android studio中,它仅给出方法。

Click here for Image I don't have enough reputation on stack overflow to upload image 单击此处查看图像我在堆栈溢出方面没有足够的声誉以上传图像

Like in the image here in eclipse it was like 就像日食中的图像一样

Log.d(tag, msg);

but in Android Studio it is like 但是在Android Studio中

Log.d();



->And the problem not only ends here suppose I want to add any thing like "ArrayList" it is too problematic in Android Studio. ->问题不仅在这里结束,我想添加任何类似“ ArrayList”的东西在Android Studio中也是有问题的。 like described in image when I do it in eclipse it works like charm but in Android Studio it don't comes out. 就像我在日食中描述的图像中描述的那样,它的作用就像魅力一样,但是在Android Studio中却不会出现。 Click here for Image I don't have enough reputation on stack overflow to upload image 单击此处查看图像我在堆栈溢出方面没有足够的声誉以上传图像

I only want the coding style like eclipse because it would be too hard for me to work on Android Studio without eclipse coding style. 我只想要像eclipse这样的编码样式,因为如果没有eclipse编码样式,在Android Studio上工作对我来说太难了。 I tried tweaking with some Android Studio preferences but it didn't help be out. 我尝试调整一些Android Studio偏好设置,但没有帮助。 I want it exact like it is in eclipse. 我希望它完全像日食一样。

Thank YOU. 谢谢。

您可以转到此设置并自行配置。

Preferences > Keymap > Code > Completion > Basic/SmartType:

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

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