[关闭]
@946898963 2020-07-09T15:25:12.000000Z 字数 15556 阅读 752

Android代码格式化资源安装

Kotlin


在代码风格上大家尽量保持一致,因此,可以在android studio上相应规则文件。
其中定义了常规的格式风格,比如移除无用的引用等

  1. <code_scheme name="BytedanceMerchantAndroid" version="173">
  2. <option name="USE_SAME_INDENTS" value="true" />
  3. <option name="IGNORE_SAME_INDENTS_FOR_LANGUAGES" value="true" />
  4. <option name="OTHER_INDENT_OPTIONS">
  5. <value>
  6. <option name="CONTINUATION_INDENT_SIZE" value="4" />
  7. <option name="SMART_TABS" value="true" />
  8. </value>
  9. </option>
  10. <option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
  11. <option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
  12. <option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
  13. <value />
  14. </option>
  15. <option name="IMPORT_LAYOUT_TABLE">
  16. <value>
  17. <package name="android" withSubpackages="true" static="false" />
  18. <emptyLine />
  19. <package name="com" withSubpackages="true" static="false" />
  20. <emptyLine />
  21. <package name="junit" withSubpackages="true" static="false" />
  22. <emptyLine />
  23. <package name="net" withSubpackages="true" static="false" />
  24. <emptyLine />
  25. <package name="org" withSubpackages="true" static="false" />
  26. <emptyLine />
  27. <package name="java" withSubpackages="true" static="false" />
  28. <emptyLine />
  29. <package name="javax" withSubpackages="true" static="false" />
  30. <emptyLine />
  31. <package name="" withSubpackages="true" static="false" />
  32. <emptyLine />
  33. <package name="" withSubpackages="true" static="true" />
  34. </value>
  35. </option>
  36. <option name="JD_ALIGN_PARAM_COMMENTS" value="false" />
  37. <option name="JD_ALIGN_EXCEPTION_COMMENTS" value="false" />
  38. <option name="JD_P_AT_EMPTY_LINES" value="false" />
  39. <option name="JD_DO_NOT_WRAP_ONE_LINE_COMMENTS" value="true" />
  40. <option name="JD_KEEP_EMPTY_PARAMETER" value="false" />
  41. <option name="JD_KEEP_EMPTY_RETURN" value="false" />
  42. <option name="JD_PRESERVE_LINE_FEEDS" value="true" />
  43. <option name="LINE_COMMENT_AT_FIRST_COLUMN" value="false" />
  44. <option name="BLOCK_COMMENT_AT_FIRST_COLUMN" value="false" />
  45. <option name="KEEP_LINE_BREAKS" value="false" />
  46. <option name="KEEP_FIRST_COLUMN_COMMENT" value="false" />
  47. <option name="KEEP_BLANK_LINES_IN_DECLARATIONS" value="1" />
  48. <option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
  49. <option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="0" />
  50. <option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
  51. <option name="ALIGN_MULTILINE_FOR" value="false" />
  52. <option name="SPACE_WITHIN_ARRAY_INITIALIZER_BRACES" value="true" />
  53. <option name="SPACE_BEFORE_ARRAY_INITIALIZER_LBRACE" value="true" />
  54. <option name="CALL_PARAMETERS_WRAP" value="1" />
  55. <option name="METHOD_PARAMETERS_WRAP" value="1" />
  56. <option name="RESOURCE_LIST_WRAP" value="1" />
  57. <option name="EXTENDS_LIST_WRAP" value="1" />
  58. <option name="THROWS_LIST_WRAP" value="1" />
  59. <option name="EXTENDS_KEYWORD_WRAP" value="1" />
  60. <option name="THROWS_KEYWORD_WRAP" value="1" />
  61. <option name="METHOD_CALL_CHAIN_WRAP" value="5" />
  62. <option name="BINARY_OPERATION_WRAP" value="5" />
  63. <option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true" />
  64. <option name="TERNARY_OPERATION_WRAP" value="1" />
  65. <option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
  66. <option name="FOR_STATEMENT_WRAP" value="1" />
  67. <option name="ARRAY_INITIALIZER_WRAP" value="1" />
  68. <option name="ASSIGNMENT_WRAP" value="1" />
  69. <option name="WRAP_COMMENTS" value="true" />
  70. <option name="ASSERT_STATEMENT_WRAP" value="1" />
  71. <option name="IF_BRACE_FORCE" value="1" />
  72. <option name="DOWHILE_BRACE_FORCE" value="1" />
  73. <option name="WHILE_BRACE_FORCE" value="1" />
  74. <option name="METHOD_ANNOTATION_WRAP" value="1" />
  75. <option name="CLASS_ANNOTATION_WRAP" value="1" />
  76. <option name="FIELD_ANNOTATION_WRAP" value="1" />
  77. <option name="PARAMETER_ANNOTATION_WRAP" value="1" />
  78. <option name="VARIABLE_ANNOTATION_WRAP" value="1" />
  79. <option name="ENUM_CONSTANTS_WRAP" value="1" />
  80. <AndroidXmlCodeStyleSettings>
  81. <option name="ARRANGEMENT_SETTINGS_MIGRATED_TO_191" value="true" />
  82. <option name="LAYOUT_SETTINGS">
  83. <value>
  84. <option name="INSERT_BLANK_LINE_BEFORE_TAG" value="false" />
  85. </value>
  86. </option>
  87. <option name="VALUE_RESOURCE_FILE_SETTINGS">
  88. <value>
  89. <option name="WRAP_ATTRIBUTES" value="2" />
  90. </value>
  91. </option>
  92. </AndroidXmlCodeStyleSettings>
  93. <JavaCodeStyleSettings>
  94. <option name="DO_NOT_WRAP_AFTER_SINGLE_ANNOTATION" value="true" />
  95. <option name="CLASS_NAMES_IN_JAVADOC" value="3" />
  96. <option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
  97. <option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
  98. <option name="IMPORT_LAYOUT_TABLE">
  99. <value>
  100. <package name="android" withSubpackages="true" static="false" />
  101. <emptyLine />
  102. <package name="com" withSubpackages="true" static="false" />
  103. <emptyLine />
  104. <package name="junit" withSubpackages="true" static="false" />
  105. <emptyLine />
  106. <package name="net" withSubpackages="true" static="false" />
  107. <emptyLine />
  108. <package name="org" withSubpackages="true" static="false" />
  109. <emptyLine />
  110. <package name="java" withSubpackages="true" static="false" />
  111. <emptyLine />
  112. <package name="javax" withSubpackages="true" static="false" />
  113. <emptyLine />
  114. <package name="" withSubpackages="true" static="false" />
  115. <emptyLine />
  116. <package name="" withSubpackages="true" static="true" />
  117. </value>
  118. </option>
  119. <option name="JD_ALIGN_PARAM_COMMENTS" value="false" />
  120. <option name="JD_ALIGN_EXCEPTION_COMMENTS" value="false" />
  121. <option name="JD_P_AT_EMPTY_LINES" value="false" />
  122. <option name="JD_DO_NOT_WRAP_ONE_LINE_COMMENTS" value="true" />
  123. <option name="JD_KEEP_EMPTY_PARAMETER" value="false" />
  124. <option name="JD_KEEP_EMPTY_RETURN" value="false" />
  125. <option name="JD_PRESERVE_LINE_FEEDS" value="true" />
  126. </JavaCodeStyleSettings>
  127. <JetCodeStyleSettings>
  128. <option name="PACKAGES_TO_USE_STAR_IMPORTS">
  129. <value>
  130. <package name="java.util" withSubpackages="false" static="false" />
  131. <package name="kotlinx.android.synthetic" withSubpackages="false" static="false" />
  132. </value>
  133. </option>
  134. <option name="NAME_COUNT_TO_USE_STAR_IMPORT" value="2147483647" />
  135. <option name="NAME_COUNT_TO_USE_STAR_IMPORT_FOR_MEMBERS" value="2147483647" />
  136. </JetCodeStyleSettings>
  137. <XML>
  138. <option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
  139. </XML>
  140. <ADDITIONAL_INDENT_OPTIONS fileType="php">
  141. <option name="CONTINUATION_INDENT_SIZE" value="4" />
  142. </ADDITIONAL_INDENT_OPTIONS>
  143. <ADDITIONAL_INDENT_OPTIONS fileType="scala">
  144. <option name="CONTINUATION_INDENT_SIZE" value="2" />
  145. </ADDITIONAL_INDENT_OPTIONS>
  146. <ADDITIONAL_INDENT_OPTIONS fileType="sql">
  147. <option name="CONTINUATION_INDENT_SIZE" value="4" />
  148. </ADDITIONAL_INDENT_OPTIONS>
  149. <codeStyleSettings language="CSS">
  150. <indentOptions>
  151. <option name="INDENT_SIZE" value="4" />
  152. <option name="CONTINUATION_INDENT_SIZE" value="4" />
  153. <option name="TAB_SIZE" value="4" />
  154. </indentOptions>
  155. </codeStyleSettings>
  156. <codeStyleSettings language="Groovy">
  157. <option name="KEEP_LINE_BREAKS" value="false" />
  158. <option name="KEEP_FIRST_COLUMN_COMMENT" value="false" />
  159. <option name="KEEP_BLANK_LINES_IN_DECLARATIONS" value="1" />
  160. <option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
  161. <option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="0" />
  162. <option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
  163. <option name="ALIGN_MULTILINE_FOR" value="false" />
  164. <option name="CALL_PARAMETERS_WRAP" value="1" />
  165. <option name="METHOD_PARAMETERS_WRAP" value="1" />
  166. <option name="EXTENDS_LIST_WRAP" value="1" />
  167. <option name="THROWS_LIST_WRAP" value="1" />
  168. <option name="EXTENDS_KEYWORD_WRAP" value="1" />
  169. <option name="THROWS_KEYWORD_WRAP" value="1" />
  170. <option name="METHOD_CALL_CHAIN_WRAP" value="5" />
  171. <option name="BINARY_OPERATION_WRAP" value="5" />
  172. <option name="TERNARY_OPERATION_WRAP" value="1" />
  173. <option name="FOR_STATEMENT_WRAP" value="1" />
  174. <option name="ASSIGNMENT_WRAP" value="1" />
  175. <option name="ASSERT_STATEMENT_WRAP" value="1" />
  176. <option name="IF_BRACE_FORCE" value="1" />
  177. <option name="WHILE_BRACE_FORCE" value="1" />
  178. <option name="METHOD_ANNOTATION_WRAP" value="1" />
  179. <option name="CLASS_ANNOTATION_WRAP" value="1" />
  180. <option name="FIELD_ANNOTATION_WRAP" value="1" />
  181. <option name="PARAMETER_ANNOTATION_WRAP" value="1" />
  182. <option name="VARIABLE_ANNOTATION_WRAP" value="1" />
  183. <indentOptions>
  184. <option name="CONTINUATION_INDENT_SIZE" value="4" />
  185. </indentOptions>
  186. </codeStyleSettings>
  187. <codeStyleSettings language="JAVA">
  188. <option name="LINE_COMMENT_AT_FIRST_COLUMN" value="false" />
  189. <option name="BLOCK_COMMENT_AT_FIRST_COLUMN" value="false" />
  190. <option name="KEEP_LINE_BREAKS" value="false" />
  191. <option name="KEEP_FIRST_COLUMN_COMMENT" value="false" />
  192. <option name="KEEP_BLANK_LINES_IN_DECLARATIONS" value="1" />
  193. <option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
  194. <option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="0" />
  195. <option name="ALIGN_MULTILINE_FOR" value="false" />
  196. <option name="SPACE_WITHIN_ARRAY_INITIALIZER_BRACES" value="true" />
  197. <option name="SPACE_BEFORE_ARRAY_INITIALIZER_LBRACE" value="true" />
  198. <option name="CALL_PARAMETERS_WRAP" value="1" />
  199. <option name="METHOD_PARAMETERS_WRAP" value="1" />
  200. <option name="RESOURCE_LIST_WRAP" value="1" />
  201. <option name="EXTENDS_LIST_WRAP" value="1" />
  202. <option name="THROWS_LIST_WRAP" value="1" />
  203. <option name="EXTENDS_KEYWORD_WRAP" value="1" />
  204. <option name="THROWS_KEYWORD_WRAP" value="1" />
  205. <option name="METHOD_CALL_CHAIN_WRAP" value="5" />
  206. <option name="BINARY_OPERATION_WRAP" value="1" />
  207. <option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true" />
  208. <option name="TERNARY_OPERATION_WRAP" value="1" />
  209. <option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
  210. <option name="KEEP_SIMPLE_METHODS_IN_ONE_LINE" value="true" />
  211. <option name="FOR_STATEMENT_WRAP" value="1" />
  212. <option name="ARRAY_INITIALIZER_WRAP" value="1" />
  213. <option name="ARRAY_INITIALIZER_LBRACE_ON_NEXT_LINE" value="true" />
  214. <option name="ARRAY_INITIALIZER_RBRACE_ON_NEXT_LINE" value="true" />
  215. <option name="ASSIGNMENT_WRAP" value="1" />
  216. <option name="WRAP_COMMENTS" value="true" />
  217. <option name="ASSERT_STATEMENT_WRAP" value="1" />
  218. <option name="IF_BRACE_FORCE" value="1" />
  219. <option name="DOWHILE_BRACE_FORCE" value="1" />
  220. <option name="WHILE_BRACE_FORCE" value="1" />
  221. <option name="FIELD_ANNOTATION_WRAP" value="1" />
  222. <option name="PARAMETER_ANNOTATION_WRAP" value="1" />
  223. <option name="VARIABLE_ANNOTATION_WRAP" value="1" />
  224. <indentOptions>
  225. <option name="CONTINUATION_INDENT_SIZE" value="4" />
  226. <option name="SMART_TABS" value="true" />
  227. </indentOptions>
  228. <arrangement>
  229. <rules>
  230. <section>
  231. <rule>
  232. <match>
  233. <INTERFACE>true</INTERFACE>
  234. </match>
  235. </rule>
  236. </section>
  237. <section>
  238. <rule>
  239. <match>
  240. <ENUM>true</ENUM>
  241. </match>
  242. </rule>
  243. </section>
  244. <section>
  245. <rule>
  246. <match>
  247. <AND>
  248. <FIELD>true</FIELD>
  249. <FINAL>true</FINAL>
  250. <PUBLIC>true</PUBLIC>
  251. <STATIC>true</STATIC>
  252. </AND>
  253. </match>
  254. </rule>
  255. </section>
  256. <section>
  257. <rule>
  258. <match>
  259. <AND>
  260. <FIELD>true</FIELD>
  261. <FINAL>true</FINAL>
  262. <PROTECTED>true</PROTECTED>
  263. <STATIC>true</STATIC>
  264. </AND>
  265. </match>
  266. </rule>
  267. </section>
  268. <section>
  269. <rule>
  270. <match>
  271. <AND>
  272. <FIELD>true</FIELD>
  273. <FINAL>true</FINAL>
  274. <PACKAGE_PRIVATE>true</PACKAGE_PRIVATE>
  275. <STATIC>true</STATIC>
  276. </AND>
  277. </match>
  278. </rule>
  279. </section>
  280. <section>
  281. <rule>
  282. <match>
  283. <AND>
  284. <FIELD>true</FIELD>
  285. <FINAL>true</FINAL>
  286. <PRIVATE>true</PRIVATE>
  287. <STATIC>true</STATIC>
  288. </AND>
  289. </match>
  290. </rule>
  291. </section>
  292. <section>
  293. <rule>
  294. <match>
  295. <AND>
  296. <FIELD>true</FIELD>
  297. <PUBLIC>true</PUBLIC>
  298. <STATIC>true</STATIC>
  299. </AND>
  300. </match>
  301. </rule>
  302. </section>
  303. <section>
  304. <rule>
  305. <match>
  306. <AND>
  307. <FIELD>true</FIELD>
  308. <PROTECTED>true</PROTECTED>
  309. <STATIC>true</STATIC>
  310. </AND>
  311. </match>
  312. </rule>
  313. </section>
  314. <section>
  315. <rule>
  316. <match>
  317. <AND>
  318. <FIELD>true</FIELD>
  319. <PACKAGE_PRIVATE>true</PACKAGE_PRIVATE>
  320. <STATIC>true</STATIC>
  321. </AND>
  322. </match>
  323. </rule>
  324. </section>
  325. <section>
  326. <rule>
  327. <match>
  328. <AND>
  329. <FIELD>true</FIELD>
  330. <PRIVATE>true</PRIVATE>
  331. <STATIC>true</STATIC>
  332. </AND>
  333. </match>
  334. </rule>
  335. </section>
  336. <section>
  337. <rule>
  338. <match>
  339. <AND>
  340. <INITIALIZER_BLOCK>true</INITIALIZER_BLOCK>
  341. <STATIC>true</STATIC>
  342. </AND>
  343. </match>
  344. </rule>
  345. </section>
  346. <section start_comment="//@Bind">
  347. <rule>
  348. <match>
  349. <AND>
  350. <FIELD>true</FIELD>
  351. <FINAL>true</FINAL>
  352. <PUBLIC>true</PUBLIC>
  353. </AND>
  354. </match>
  355. </rule>
  356. </section>
  357. <section>
  358. <rule>
  359. <match>
  360. <AND>
  361. <FIELD>true</FIELD>
  362. <FINAL>true</FINAL>
  363. <PROTECTED>true</PROTECTED>
  364. </AND>
  365. </match>
  366. </rule>
  367. </section>
  368. <section>
  369. <rule>
  370. <match>
  371. <AND>
  372. <FIELD>true</FIELD>
  373. <FINAL>true</FINAL>
  374. <PACKAGE_PRIVATE>true</PACKAGE_PRIVATE>
  375. </AND>
  376. </match>
  377. </rule>
  378. </section>
  379. <section>
  380. <rule>
  381. <match>
  382. <AND>
  383. <FIELD>true</FIELD>
  384. <FINAL>true</FINAL>
  385. <PRIVATE>true</PRIVATE>
  386. </AND>
  387. </match>
  388. </rule>
  389. </section>
  390. <section>
  391. <rule>
  392. <match>
  393. <AND>
  394. <FIELD>true</FIELD>
  395. <PUBLIC>true</PUBLIC>
  396. </AND>
  397. </match>
  398. </rule>
  399. </section>
  400. <section>
  401. <rule>
  402. <match>
  403. <AND>
  404. <FIELD>true</FIELD>
  405. <PROTECTED>true</PROTECTED>
  406. </AND>
  407. </match>
  408. </rule>
  409. </section>
  410. <section>
  411. <rule>
  412. <match>
  413. <AND>
  414. <FIELD>true</FIELD>
  415. <PACKAGE_PRIVATE>true</PACKAGE_PRIVATE>
  416. </AND>
  417. </match>
  418. </rule>
  419. </section>
  420. <section>
  421. <rule>
  422. <match>
  423. <AND>
  424. <FIELD>true</FIELD>
  425. <PRIVATE>true</PRIVATE>
  426. </AND>
  427. </match>
  428. </rule>
  429. </section>
  430. <section>
  431. <rule>
  432. <match>
  433. <FIELD>true</FIELD>
  434. </match>
  435. </rule>
  436. </section>
  437. <section>
  438. <rule>
  439. <match>
  440. <INITIALIZER_BLOCK>true</INITIALIZER_BLOCK>
  441. </match>
  442. </rule>
  443. </section>
  444. <section>
  445. <rule>
  446. <match>
  447. <CONSTRUCTOR>true</CONSTRUCTOR>
  448. </match>
  449. </rule>
  450. </section>
  451. <section>
  452. <rule>
  453. <match>
  454. <AND>
  455. <METHOD>true</METHOD>
  456. <PUBLIC>true</PUBLIC>
  457. <STATIC>true</STATIC>
  458. </AND>
  459. </match>
  460. </rule>
  461. </section>
  462. <section>
  463. <rule>
  464. <match>
  465. <AND>
  466. <METHOD>true</METHOD>
  467. <PRIVATE>true</PRIVATE>
  468. <STATIC>true</STATIC>
  469. </AND>
  470. </match>
  471. </rule>
  472. </section>
  473. <section>
  474. <rule>
  475. <match>
  476. <AND>
  477. <METHOD>true</METHOD>
  478. <STATIC>true</STATIC>
  479. </AND>
  480. </match>
  481. </rule>
  482. </section>
  483. <section>
  484. <rule>
  485. <match>
  486. <AND>
  487. <METHOD>true</METHOD>
  488. <PUBLIC>true</PUBLIC>
  489. </AND>
  490. </match>
  491. </rule>
  492. </section>
  493. <section>
  494. <rule>
  495. <match>
  496. <AND>
  497. <METHOD>true</METHOD>
  498. <PRIVATE>true</PRIVATE>
  499. </AND>
  500. </match>
  501. </rule>
  502. </section>
  503. <section>
  504. <rule>
  505. <match>
  506. <METHOD>true</METHOD>
  507. </match>
  508. </rule>
  509. </section>
  510. <section>
  511. <rule>
  512. <match>
  513. <AND>
  514. <CLASS>true</CLASS>
  515. <STATIC>true</STATIC>
  516. </AND>
  517. </match>
  518. </rule>
  519. </section>
  520. <section>
  521. <rule>
  522. <match>
  523. <CLASS>true</CLASS>
  524. </match>
  525. </rule>
  526. </section>
  527. </rules>
  528. </arrangement>
  529. </codeStyleSettings>
  530. <codeStyleSettings language="JavaScript">
  531. <option name="KEEP_LINE_BREAKS" value="false" />
  532. <option name="KEEP_FIRST_COLUMN_COMMENT" value="false" />
  533. <option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
  534. <option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
  535. <option name="ALIGN_MULTILINE_FOR" value="false" />
  536. <option name="CALL_PARAMETERS_WRAP" value="1" />
  537. <option name="METHOD_PARAMETERS_WRAP" value="1" />
  538. <option name="BINARY_OPERATION_WRAP" value="5" />
  539. <option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true" />
  540. <option name="TERNARY_OPERATION_WRAP" value="1" />
  541. <option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
  542. <option name="FOR_STATEMENT_WRAP" value="1" />
  543. <option name="ARRAY_INITIALIZER_WRAP" value="1" />
  544. <option name="ASSIGNMENT_WRAP" value="1" />
  545. <option name="IF_BRACE_FORCE" value="1" />
  546. <option name="DOWHILE_BRACE_FORCE" value="1" />
  547. <option name="WHILE_BRACE_FORCE" value="1" />
  548. <option name="PARENT_SETTINGS_INSTALLED" value="true" />
  549. <indentOptions>
  550. <option name="INDENT_SIZE" value="4" />
  551. <option name="TAB_SIZE" value="4" />
  552. </indentOptions>
  553. </codeStyleSettings>
  554. <codeStyleSettings language="XML">
  555. <indentOptions>
  556. <option name="CONTINUATION_INDENT_SIZE" value="4" />
  557. <option name="SMART_TABS" value="true" />
  558. </indentOptions>
  559. <arrangement>
  560. <rules>
  561. <section>
  562. <rule>
  563. <match>
  564. <AND>
  565. <NAME>xmlns:android</NAME>
  566. <XML_ATTRIBUTE />
  567. <XML_NAMESPACE>^$</XML_NAMESPACE>
  568. </AND>
  569. </match>
  570. </rule>
  571. </section>
  572. <section>
  573. <rule>
  574. <match>
  575. <AND>
  576. <NAME>xmlns:.*</NAME>
  577. <XML_ATTRIBUTE />
  578. <XML_NAMESPACE>^$</XML_NAMESPACE>
  579. </AND>
  580. </match>
  581. <order>BY_NAME</order>
  582. </rule>
  583. </section>
  584. <section>
  585. <rule>
  586. <match>
  587. <AND>
  588. <NAME>.*:id</NAME>
  589. <XML_ATTRIBUTE />
  590. <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
  591. </AND>
  592. </match>
  593. </rule>
  594. </section>
  595. <section>
  596. <rule>
  597. <match>
  598. <AND>
  599. <NAME>.*:name</NAME>
  600. <XML_ATTRIBUTE />
  601. <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
  602. </AND>
  603. </match>
  604. </rule>
  605. </section>
  606. <section>
  607. <rule>
  608. <match>
  609. <AND>
  610. <NAME>name</NAME>
  611. <XML_ATTRIBUTE />
  612. <XML_NAMESPACE>^$</XML_NAMESPACE>
  613. </AND>
  614. </match>
  615. </rule>
  616. </section>
  617. <section>
  618. <rule>
  619. <match>
  620. <AND>
  621. <NAME>style</NAME>
  622. <XML_ATTRIBUTE />
  623. <XML_NAMESPACE>^$</XML_NAMESPACE>
  624. </AND>
  625. </match>
  626. </rule>
  627. </section>
  628. <section>
  629. <rule>
  630. <match>
  631. <AND>
  632. <NAME>.*</NAME>
  633. <XML_ATTRIBUTE />
  634. <XML_NAMESPACE>^$</XML_NAMESPACE>
  635. </AND>
  636. </match>
  637. <order>BY_NAME</order>
  638. </rule>
  639. </section>
  640. <section>
  641. <rule>
  642. <match>
  643. <AND>
  644. <NAME>.*</NAME>
  645. <XML_ATTRIBUTE />
  646. <XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
  647. </AND>
  648. </match>
  649. <order>ANDROID_ATTRIBUTE_ORDER</order>
  650. </rule>
  651. </section>
  652. <section>
  653. <rule>
  654. <match>
  655. <AND>
  656. <NAME>.*</NAME>
  657. <XML_ATTRIBUTE />
  658. <XML_NAMESPACE>.*</XML_NAMESPACE>
  659. </AND>
  660. </match>
  661. <order>BY_NAME</order>
  662. </rule>
  663. </section>
  664. </rules>
  665. </arrangement>
  666. </codeStyleSettings>
  667. <codeStyleSettings language="kotlin">
  668. <indentOptions>
  669. <option name="CONTINUATION_INDENT_SIZE" value="4" />
  670. </indentOptions>
  671. </codeStyleSettings>
  672. </code_scheme>

Bytedance_Merchant_Android.xml

安装Bytedance_Merchant_Android

此处输入图片的描述

格式化代码

ctrl+commnd+L

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注