问题:xml中创建空间不格式化

 <View android:layout_width="wrap_content" android:layout_height="wrap_content"></View>

解决办法:
Android studio -> preferences(setting)->搜索XML->Android ->如图勾选->Apply
AndroidStudio问题XML格式化
结果:

 <View
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"></View>

看着格式化了,但是结果还是拆墙人意,缩进太多了,调小一点:
解决办法:
Android studio -> preferences(setting)->搜索XML->Tabs and Indents ->如图填写->Apply
AndroidStudio问题XML格式化
结果:

<View
	android:layout_width="wrap_content"
	android:layout_height="wrap_content"></View>

相关文章:

  • 2022-01-07
  • 2022-01-07
  • 2021-08-25
  • 2021-12-03
  • 2021-12-31
  • 2021-11-04
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-24
  • 2022-12-23
  • 2021-09-21
  • 2021-09-12
  • 2021-09-28
  • 2021-11-30
  • 2021-11-21
相关资源
相似解决方案