Skip to content

Commit

Permalink
Tests / Style for #2815 (#2817)
Browse files Browse the repository at this point in the history
* style: reorg getAttributes (StyledString)

* test: assertion for aapt2 string (#2815)
  • Loading branch information
iBotPeaches committed May 23, 2022
1 parent c1f6dc7 commit b7c56c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Expand Up @@ -82,9 +82,10 @@ public String getName() {
public Map<String, String> getAttributes() {
int separatorIdx = tag.indexOf(';');
return separatorIdx == -1 ? null : ATTRIBUTES_SPLITTER.split(
tag.substring(separatorIdx + 1, tag.endsWith(";") ? tag.length() - 1 : tag.length()));
tag.substring(separatorIdx + 1, tag.endsWith(";") ? tag.length() - 1 : tag.length())
);
}

@Override
public int compareTo(Span o) {
int res = Integer.compare(firstChar, o.firstChar);
Expand Down
Expand Up @@ -4,4 +4,5 @@
<string name="long_string_32767" />
<string name="surrogate_issue_2299">🔆</string>
<string name="html_string_issue_2632"><ul> <li><b>aaaaa aa aaaaa</b> – aaaaaaa aaaaaaaaaa aa aaaaaaaa aaaaaa aaaaa (aaaa) aaaa aaaaaaaaa aaaaa aa aaaaaaaaa aaaaaaa aaaa</li> <li><b>aaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaa</b> – aaaaaaa aaaaaaaaaa aaaaaaaaa aaaa aaaaaa aa aaaa aaaa aaaa aaaa aaaaaaa aaaaaaaaaaaaa, aaaaaa aaa aaaaaaaaaa (aaa) aaaaaaaaaaaaaaa</li> <li><b>aaaaaaaaaaa aaaaaa aaaaaaaaaa</b> – aaaaaaaaaa aaaa aaaaaa aa a aaa aa aaaaaa aaa aaaaaaa (aaaaa aaaaaaaa) aaaaaaaa aa aaaaaa aaaaa aaa aaaa</li> </ul></string>
<string name="styled_string_issue_2815">Quickly zoom in on the screen to display content more clearly.<br/><br/> <b>To zoom in:</b><br/> 1. Use shortcut to start magnification<br/> 2. Tap the screen<br/> 3. Drag 2 fingers to move around screen<br/> 4. Pinch with 2 fingers to adjust zoom<br/> 5. Use shortcut to stop magnification<br/><br/> <b>To zoom in temporarily:</b><br/> 1. Use shortcut to start magnification<br/> 2. Touch &amp; hold anywhere on the screen<br/> 3. Drag finger to move around screen<br/> 4. Lift finger to stop magnification</string>
</resources>

0 comments on commit b7c56c8

Please sign in to comment.