Merge "Aggregation checkbox and locale text" into main

This commit is contained in:
Josh Hou
2024-03-27 09:20:05 +00:00
committed by Android (Google) Code Review
2 changed files with 11 additions and 3 deletions

View File

@@ -38,7 +38,9 @@
style="@style/LanguageCheckboxAndLabel" style="@style/LanguageCheckboxAndLabel"
android:layout_marginRight="0dp" android:layout_marginRight="0dp"
android:minWidth="24dp" android:minWidth="24dp"
android:paddingEnd="-8dp"/> android:paddingEnd="-8dp"
android:clickable="false"
android:focusable="false"/>
<TextView <TextView
android:id="@+id/miniLabel" android:id="@+id/miniLabel"

View File

@@ -27,6 +27,7 @@ import android.util.TypedValue;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.MotionEvent; import android.view.MotionEvent;
import android.view.View; import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.CheckBox; import android.widget.CheckBox;
import android.widget.CompoundButton; import android.widget.CompoundButton;
@@ -189,6 +190,13 @@ class LocaleDragAndDropAdapter
setCheckBoxDescription(dragCell, checkbox, isChecked); setCheckBoxDescription(dragCell, checkbox, isChecked);
} }
}); });
dragCell.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
checkbox.toggle();
}
});
} }
@VisibleForTesting @VisibleForTesting
@@ -200,8 +208,6 @@ class LocaleDragAndDropAdapter
CharSequence checkedStatus = mContext.getText( CharSequence checkedStatus = mContext.getText(
isChecked ? com.android.internal.R.string.checked isChecked ? com.android.internal.R.string.checked
: com.android.internal.R.string.not_checked); : com.android.internal.R.string.not_checked);
// Talkback
dragCell.setStateDescription(checkedStatus);
// Select to Speak // Select to Speak
checkbox.setContentDescription(checkedStatus); checkbox.setContentDescription(checkedStatus);
} }