Skip to content

Commit

Permalink
Merge pull request #724 from microsoft/joypal/peoplePickerV1Ally
Browse files Browse the repository at this point in the history
V1 People picker a11y fixes
  • Loading branch information
joyeeta26 authored Nov 8, 2024
2 parents 651d48f + d1f826d commit c522be2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import android.content.Context
import android.graphics.Paint
import android.graphics.Rect
import android.graphics.drawable.ColorDrawable
import android.graphics.drawable.Drawable
import android.os.Build
import android.os.Bundle
import androidx.core.view.ViewCompat
Expand All @@ -34,6 +35,7 @@ import android.view.accessibility.AccessibilityNodeInfo
import android.view.inputmethod.InputMethodManager
import android.widget.LinearLayout
import android.widget.MultiAutoCompleteTextView
import androidx.core.content.ContextCompat
import com.microsoft.fluentui.persona.IPersona
import com.microsoft.fluentui.persona.PersonaChipView
import com.microsoft.fluentui.persona.setPersona
Expand Down Expand Up @@ -252,9 +254,14 @@ internal class PeoplePickerTextView : TokenCompleteTextView<IPersona> {

// Soft keyboard does not always show up when the view first loads without this
if (hasFocus) {
// add bottom border
this.background = ContextCompat.getDrawable(context, R.drawable.people_picker_textview_focusable_background)
post {
context.inputMethodManager.showSoftInput(this, InputMethodManager.SHOW_IMPLICIT)
}
} else {
// remove bottom border
this.background = null
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:left="-8dp"
android:right="-8dp"
android:top="-8dp">
<shape>
<stroke
android:width="0.5dp"
android:color="@color/fluentui_communication_shade_20" />
</shape>
</item>
</layer-list>

0 comments on commit c522be2

Please sign in to comment.