Scrollable media description

markdown
Thomas 1 year ago
parent bbb47626ce
commit f37bf1df53

@ -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 -> {

@ -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"

Loading…
Cancel
Save