Fix #929 - Scrollable bio when editing profiles

pull/934/head
Thomas 1 year ago
parent e07cb78d65
commit ac24e25da0

@ -17,6 +17,7 @@ package app.fedilab.android.mastodon.activities;
import static app.fedilab.android.BaseMainActivity.currentAccount;
import static app.fedilab.android.BaseMainActivity.instanceInfo;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
@ -60,6 +61,7 @@ public class EditProfileActivity extends BaseBarActivity {
private ActivityEditProfileBinding binding;
private AccountsVM accountsVM;
@SuppressLint("ClickableViewAccessibility")
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@ -70,6 +72,20 @@ public class EditProfileActivity extends BaseBarActivity {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}
binding.scrollContainer.setOnTouchListener((v, event) -> {
binding.bio.getParent().requestDisallowInterceptTouchEvent(false);
return false;
});
binding.bio.setOnTouchListener((v, event) -> {
binding.bio.getParent().requestDisallowInterceptTouchEvent(true);
return false;
});
new ViewModelProvider(EditProfileActivity.this).get(AccountsVM.class).getConnectedAccount(BaseMainActivity.currentInstance, BaseMainActivity.currentToken)
.observe(EditProfileActivity.this, account -> {
if (account != null) {

@ -23,6 +23,7 @@
tools:context=".mastodon.activities.ProfileActivity">
<ScrollView
android:id="@+id/scroll_container"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
@ -154,6 +155,7 @@
android:layout_marginTop="12dp"
android:lines="4"
android:textSize="18sp"
android:scrollbars="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/acct"

Loading…
Cancel
Save