我在SO上找到。和谷歌,但我找不到解決方案。每當我在.axml
文件中寫入代碼時,格式不好意味着將代碼放入格式中的代碼。我編寫這個格式代碼生成的代碼。Xamarin Studio(Mac)中.axml代碼格式的快捷鍵
Styles.Xml
<?xml version="1.0" encoding="UTF-8" ?>
<resources>
<style name="AppTheme" parent="Theme.AppCompat.Light.ActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
</resources>
,但我想格式代碼:
<?xml version="1.0" encoding="UTF-8" ?>
<resources>
<style name="AppTheme" parent="Theme.AppCompat.Light.ActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
</resources>
任何幫助理解..
'按Ctrl-i'是默認的代碼格式化快捷:Edit' /'Format' /'格式Document' – SushiHangover