'Padding in textview in example.java
StringBuilder sb = new StringBuilder();
for (int x = 0; x <= 5; x++) {
sb.append(x).append("\n");
}
textView.setText(sb);
In the above problem the textView is printing
0
1
2
3
4
5
I am unable to print the number with paddingTop or paddingBottom like the below given example
0
1
2
3
Please help me to achive the above target.
Solution 1:[1]
Try appending more than one \n.
Something like sb.append(x).append("\n\n\n"); should do the trick
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Demigod21 |
