我想要这样的效果

@BindView(R.id.hello_tv) TextView helloTv;@BindView(R.id.click_btn) Button clickBtn;


但是当我格式化之后就变成这样的效果

@BindView(R.id.hello_tv) TextView helloTv;@BindView(R.id.click_btn) Button clickBtn;

其实很简单只需要在

File-->Code Style-->Java-->Wrapping and Braces -->Field annotations 设置为Do not wrap即可


如下图


android studio 格式化代码时注解不换行_第1张图片



更多相关文章

  1. android TextView 实现自定义文字点击效果
  2. Android中的Button自定义点击效果
  3. android使用xml实现虚线效果
  4. Android:实现类似RadioButton自动换行及单选效果
  5. Android 中带有进度条效果的按钮(Button)
  6. android和ios button点击变暗效果
  7. Android给控件添加默认点击效果

随机推荐

  1. Android(安卓)中把Activity当作Dialog来
  2. How Android(安卓)Handles Touches
  3. Android:ThreadLearning1
  4. Android(安卓)CrashManager
  5. Android(安卓)Multi-Core Enable/Disable
  6. Android(安卓)Security Overview
  7. ContentProvider示例-Calendar Provider
  8. Android-GeoQuiz
  9. 摇一摇监听器
  10. android Handler消息处理源码剖析