Folded strings require two clicks to position caret for editing
Consider this example

Imagine I want to change x: %s to x: %d.
When I click on %s the string is unfolded. And the caret is moved to the beginning of the string.
So I have to aim at %s and click again to position it properly.
Other constructs do not seem to have this problem. E.g. when I click inside folded 'if' condition the caret stays where I clicked even when the condition is unfolded.
I don't think this can be fixed with the current folding API.
First of all, there are no identifiers inside of the String that you provided. %s is just a sequence within a string that we can programmatically change due to it being a standard sequence.
Second, the folded text can be anything; it does not have to represent anything directly related to the code.
The Android team built a fold that replaces context.getString(R.string.hello_world_string_resource) with "Hello World!". If I click on the space between Hello and World, where is the IDE suppose to put the cursor? It doesn't know, so it goes to the beginning of the fold.
It is a little different when identifiers are present.
But why is the whole string folded? Can't just the escape sequences be folded individually? Is it also due to some API limitation?
I would say that keeping the caret position at the same column when a region is unfolded would have been the least surprising behavior.
Sorry, the 2-click issue cannot be solved with the current API. I don't believe there is anything about column position in the API either (I could be wrong, have not seen it that indepth).
Even with that solution, you still have the 2-click issue. Is it more user-friendly to support column placement? I don't know. However, if the folds are small enough, then it will be very close to the column position you clicked.
I call this type of issue Overfolding. Folding unneeded items that should not be folded in the first place. My most recent issues and my next few issues are all Overfolding issues.
So you are correct that only the escaped characters should be folded; not the entire string.
Note: if you added a variable ("...long string" + variable + "long string...), then the whole string will be folded. I believe you want that, correct? But not escaped characters, correct?
I think that is good.
However, it should be possible to programmatically search for all the %s and other valid sequences and replace them.in the folded code with the real identifiers they are associated with. This would mean the whole string would be folded as currently, but the variable names would be inserted into the correct place.
Just a thought