Do not ellipsize description on Android 2.X
For some reason, even when showing the entire description some words at the end of lines and paragraphs still get cut off. This results in little parts of the description being completely inaccessible. Ellipsizing is just cosmetic, so ditch it on 2.X altogether. I tested and proved that this fixes the issue with an android-10 x86 emulator, after reproducing the bug. Keep the ellipsizing on newer versions, as it doesn't misbehave on those. Fixes #510.
This commit is contained in:
parent
6ce94a22d3
commit
1192468015
@ -33,6 +33,7 @@ import android.content.pm.PackageManager;
|
|||||||
import android.database.ContentObserver;
|
import android.database.ContentObserver;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
@ -1112,7 +1113,10 @@ public class AppDetails extends AppCompatActivity {
|
|||||||
viewMorePermissions.setText(getString(R.string.less));
|
viewMorePermissions.setText(getString(R.string.less));
|
||||||
} else {
|
} else {
|
||||||
description.setMaxLines(MAX_LINES);
|
description.setMaxLines(MAX_LINES);
|
||||||
description.setEllipsize(TextUtils.TruncateAt.MARQUEE);
|
if (Build.VERSION.SDK_INT > 10) {
|
||||||
|
// ellipsizing doesn't work properly here on 2.X
|
||||||
|
description.setEllipsize(TextUtils.TruncateAt.MARQUEE);
|
||||||
|
}
|
||||||
viewMorePermissions.setText(R.string.more);
|
viewMorePermissions.setText(R.string.more);
|
||||||
}
|
}
|
||||||
viewAllDescription ^= true;
|
viewAllDescription ^= true;
|
||||||
@ -1133,7 +1137,10 @@ public class AppDetails extends AppCompatActivity {
|
|||||||
// If description has more than five lines
|
// If description has more than five lines
|
||||||
if (description.getLineCount() > MAX_LINES) {
|
if (description.getLineCount() > MAX_LINES) {
|
||||||
description.setMaxLines(MAX_LINES);
|
description.setMaxLines(MAX_LINES);
|
||||||
description.setEllipsize(TextUtils.TruncateAt.MARQUEE);
|
if (Build.VERSION.SDK_INT > 10) {
|
||||||
|
// ellipsizing doesn't work properly here on 2.X
|
||||||
|
description.setEllipsize(TextUtils.TruncateAt.MARQUEE);
|
||||||
|
}
|
||||||
description.setOnClickListener(expanderDescription);
|
description.setOnClickListener(expanderDescription);
|
||||||
viewAllDescription = true;
|
viewAllDescription = true;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user