mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2024-12-22 16:50:04 +02:00
Scrollable media description
This commit is contained in:
parent
bbb47626ce
commit
f37bf1df53
2 changed files with 9 additions and 0 deletions
|
@ -26,6 +26,7 @@ import android.net.Uri;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
|
import android.text.method.ScrollingMovementMethod;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
|
@ -150,6 +151,10 @@ public class MediaActivity extends BaseTransparentActivity implements OnDownload
|
||||||
startActivity(intentContext);
|
startActivity(intentContext);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
binding.mediaDescription.setMovementMethod(new ScrollingMovementMethod());
|
||||||
|
binding.mediaDescriptionTranslated.setMovementMethod(new ScrollingMovementMethod());
|
||||||
|
|
||||||
if (description != null && description.trim().length() > 0 && description.trim().compareTo("null") != 0) {
|
if (description != null && description.trim().length() > 0 && description.trim().compareTo("null") != 0) {
|
||||||
binding.mediaDescription.setText(description);
|
binding.mediaDescription.setText(description);
|
||||||
binding.translate.setOnClickListener(v -> {
|
binding.translate.setOnClickListener(v -> {
|
||||||
|
|
|
@ -35,6 +35,8 @@
|
||||||
android:id="@+id/media_description"
|
android:id="@+id/media_description"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:maxHeight="300dp"
|
||||||
|
android:scrollbars="vertical"
|
||||||
android:layout_gravity="center_horizontal|bottom"
|
android:layout_gravity="center_horizontal|bottom"
|
||||||
android:background="#AA000000"
|
android:background="#AA000000"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
@ -50,6 +52,8 @@
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/media_description_translated"
|
android:id="@+id/media_description_translated"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
android:maxHeight="300dp"
|
||||||
|
android:scrollbars="vertical"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal|bottom"
|
android:layout_gravity="center_horizontal|bottom"
|
||||||
android:layout_marginBottom="70dp"
|
android:layout_marginBottom="70dp"
|
||||||
|
|
Loading…
Reference in a new issue