mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2024-12-22 16:50:04 +02:00
Fix #929 - Scrollable bio when editing profiles
This commit is contained in:
parent
e07cb78d65
commit
ac24e25da0
2 changed files with 18 additions and 0 deletions
|
@ -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…
Reference in a new issue