Created
August 14, 2020 10:56
-
-
Save ataulm/ccf2dc796992faaf70674e3f9254b8be to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private val intervalBounds = Rect() | |
@Suppress("DEPRECATION") // setBoundsInParent is required by [ExploreByTouchHelper] | |
override fun onPopulateNodeForVirtualView(virtualViewId: Int, node: AccessibilityNodeInfoCompat) { | |
node.className = RatingsHistogramView::class.simpleName | |
node.contentDescription = "content desc $virtualViewId" | |
updateBoundsForInterval(virtualViewId) | |
node.setBoundsInParent(intervalBounds) | |
} | |
private fun updateBoundsForInterval(index: Int) { | |
val histogram = this@RatingsHistogramView.ratingsHistogram ?: return | |
val intervalWidth = width.toFloat() / histogram.intervals.size | |
val left = index * intervalWidth | |
intervalBounds.left = (left + 2).roundToInt() | |
intervalBounds.top = (height - (histogram.intervals[index].weight * height)).roundToInt() | |
intervalBounds.right = (left + intervalWidth - 2).roundToInt() | |
intervalBounds.bottom = height | |
} |
Hi Hyongsop Kim, you can find the full project here https://github.com/ataulm/android-skeleton/compare/virtual-views-a11y?expand=1
Hi, thank you so much for sharing your full project regarding canvas accessibility demo.
But there is one thing I would like to ask you for help with using the AccessibilityNodeInfo object to allow TalkBack to read the previously declared class differently.
If you don't mind, can I get your email address?
Thank you.
김형섭 / Hyongsop Kim
(주)엔비전스 / 웹접근성사업팀 팀장
서울시 종로구 가회동 1-29
1-29 Gahoe-dong, Jongno-gu, Seoul, Korea
T. +82 2 313 9977 F. +82 2 313 3645 M. +82 10 3316 5996
http://dialogueinthedark.co.kr
http://cafe.naver.com/dialogueinthedark
…-----Original Message-----
From: "Ataul Munim"<[email protected]>
To: "ataulm"<[email protected]>;
Cc: "khsbory"<[email protected]>; "Comment"<[email protected]>;
Sent: 2020. 8. 15. (토) 15:15 (GMT+09:00)
Subject: Re: ataulm/RatingsView.kt
@ataulm commented on this gist.
Hi Hyongsop Kim, you can find the full project here https://github.com/ataulm/android-skeleton/compare/virtual-views-a11y?expand=1
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
Hi Hyongsop Kim
It'll be better if you write your question on Stack Overflow and link it
here. If I can answer it, I'll reply there.
…On Mon, 24 Aug 2020, 07:40 khsbory, ***@***.***> wrote:
***@***.**** commented on this gist.
------------------------------
Hi, thank you so much for sharing your full project regarding canvas
accessibility demo.
But there is one thing I would like to ask you for help with using the
AccessibilityNodeInfo object to allow TalkBack to read the previously
declared class differently.
If you don't mind, can I get your email address?
Thank you.
김형섭 / Hyongsop Kim
(주)엔비전스 / 웹접근성사업팀 팀장
서울시 종로구 가회동 1-29
1-29 Gahoe-dong, Jongno-gu, Seoul, Korea
T. +82 2 313 9977 F. +82 2 313 3645 M. +82 10 3316 5996
http://dialogueinthedark.co.kr
http://cafe.naver.com/dialogueinthedark
-----Original Message-----
From: "Ataul ***@***.***>
To: ***@***.***>;
Cc: ***@***.***>; "Comment"<
***@***.***>;
Sent: 2020. 8. 15. (토) 15:15 (GMT+09:00)
Subject: Re: ataulm/RatingsView.kt
@ataulm commented on this gist.
Hi Hyongsop Kim, you can find the full project here
https://github.com/ataulm/android-skeleton/compare/virtual-views-a11y?expand=1
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://gist.github.com/ccf2dc796992faaf70674e3f9254b8be#gistcomment-3428707>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAUN6GZYNU4WJ3AO2W67WHDSCIDMVANCNFSM4P774KKA>
.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, my name is Hyongsop Kim from Korea and accessibility consultant.
I read your blod post that android custom view accessible article.
I learned a lot from your posting that even a Cambus view can be implemented so that TalkBack can read the view.
Could you share the entire sample app project for my study?
I'd like to build your project on my phone and experience it in person, see each of the source codes, and learn more deeply.
My email address is [email protected].
Thank you.