Fix issue #779 - Focus view for accessibility with visibility when composing

This commit is contained in:
Thomas 2023-02-06 09:41:53 +01:00
parent f817fd0797
commit 3db9d22e48
2 changed files with 3 additions and 0 deletions

View File

@ -49,6 +49,7 @@ import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.view.WindowManager; import android.view.WindowManager;
import android.view.accessibility.AccessibilityEvent;
import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodManager;
import android.widget.ArrayAdapter; import android.widget.ArrayAdapter;
import android.widget.Button; import android.widget.Button;
@ -1506,6 +1507,7 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
holder.binding.buttonCloseAttachmentPanel.setOnClickListener(v -> holder.binding.attachmentChoicesPanel.setVisibility(View.GONE)); holder.binding.buttonCloseAttachmentPanel.setOnClickListener(v -> holder.binding.attachmentChoicesPanel.setVisibility(View.GONE));
holder.binding.buttonVisibility.setOnClickListener(v -> { holder.binding.buttonVisibility.setOnClickListener(v -> {
holder.binding.visibilityPanel.setVisibility(View.VISIBLE); holder.binding.visibilityPanel.setVisibility(View.VISIBLE);
holder.binding.visibilityGroup.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_FOCUSED);
holder.binding.buttonVisibility.setChecked(false); holder.binding.buttonVisibility.setChecked(false);
}); });
holder.binding.buttonCloseVisibilityPanel.setOnClickListener(v -> holder.binding.visibilityPanel.setVisibility(View.GONE)); holder.binding.buttonCloseVisibilityPanel.setOnClickListener(v -> holder.binding.visibilityPanel.setVisibility(View.GONE));

View File

@ -335,6 +335,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:id="@+id/visibility_group"
android:padding="6dp" android:padding="6dp"
app:singleSelection="true"> app:singleSelection="true">