Scrollable media description

This commit is contained in:
Thomas 2023-07-30 18:16:16 +02:00
parent bbb47626ce
commit f37bf1df53
2 changed files with 9 additions and 0 deletions

View file

@ -26,6 +26,7 @@ import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.text.method.ScrollingMovementMethod;
import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
@ -150,6 +151,10 @@ public class MediaActivity extends BaseTransparentActivity implements OnDownload
startActivity(intentContext);
});
}
binding.mediaDescription.setMovementMethod(new ScrollingMovementMethod());
binding.mediaDescriptionTranslated.setMovementMethod(new ScrollingMovementMethod());
if (description != null && description.trim().length() > 0 && description.trim().compareTo("null") != 0) {
binding.mediaDescription.setText(description);
binding.translate.setOnClickListener(v -> {

View file

@ -35,6 +35,8 @@
android:id="@+id/media_description"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:maxHeight="300dp"
android:scrollbars="vertical"
android:layout_gravity="center_horizontal|bottom"
android:background="#AA000000"
android:gravity="center"
@ -50,6 +52,8 @@
<TextView
android:id="@+id/media_description_translated"
android:layout_width="0dp"
android:maxHeight="300dp"
android:scrollbars="vertical"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|bottom"
android:layout_marginBottom="70dp"