Answer the question
In order to leave comments, you need to log in
How to stick a line to the right edge?
Hello. How exactly in this way, without tables, without RelativeLayout, without rewriting the code, glue a line to the right of the screen. I need exactly this way, I believe that some parameter is needed, which I can't find anywhere =)
String a0 = String.format("%s", "✔ Австралийские подтягивания");
String a1 = String.format("%10s", " 10");
String a2 = String.format("%s", "✔ Приседание");
String a3 = String.format("%10s", " 10");
String a4 = String.format("%s", "✔ Отжимания на коленях");
String a5 = String.format("%10s", " 10");
karProitiTrenurovky1.setText(a0 + a1 + "\n" + a2 + a3 + "\n" + a4 + a5);
vivod_elementov.addView(karProitiTrenurovky1, lpView);
Answer the question
In order to leave comments, you need to log in
The default string has length = Indented character length * number of characters.
This is an algorithm.
So rewrite the code.
option 1 add tabs not very good
option 2 add spaces not very good
option 3 add right-aligned grid 2 columns probably the best
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question