AndroidStudio问题XML格式化

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/yangshuaionline/article/details/86690259

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

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

解决办法:
Android studio -> preferences(setting)->搜索XML->Android ->如图勾选->Apply
在这里插入图片描述
结果:

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

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

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

猜你喜欢

转载自blog.csdn.net/yangshuaionline/article/details/86690259