mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-24 00:50:32 +00:00
use ellipsis character
This commit is contained in:
parent
a026143a84
commit
07f8dcb3ca
@ -118,9 +118,9 @@ public class CommentsMiniInfoItemHolder extends InfoItemHolder {
|
||||
private void ellipsize() {
|
||||
if (itemContentView.getLineCount() > commentDefaultLines){
|
||||
int endOfLastLine = itemContentView.getLayout().getLineEnd(commentDefaultLines - 1);
|
||||
int end = itemContentView.getText().toString().lastIndexOf(' ', endOfLastLine -3);
|
||||
if(end == -1) end = Math.max(endOfLastLine -3, 0);
|
||||
String newVal = itemContentView.getText().subSequence(0, end) + "...";
|
||||
int end = itemContentView.getText().toString().lastIndexOf(' ', endOfLastLine -2);
|
||||
if(end == -1) end = Math.max(endOfLastLine -2, 0);
|
||||
String newVal = itemContentView.getText().subSequence(0, end) + " …";
|
||||
itemContentView.setText(newVal);
|
||||
}
|
||||
linkify();
|
||||
|
Loading…
Reference in New Issue
Block a user