Android Question [SOLVED] IconButton and TalkBack

rleiman

Well-Known Member
Licensed User
Hi Everyone,

One of my customers needs to use my app with TalkBack. It's almost compatible with TalkBack. The views that work with it are the label views and sliders. The app is also using the IconButton view but TalkBack speaks "Unlabled button" when the user slides a finger over they type of view and I have a lot of them in the app.

I already tried to enter text into the text property of the view but TalkBack ignores the text. Is there a way to make the IconButton visible to TalkBack?

Thanks.
 

canalrun

Well-Known Member
Licensed User
Hi Everyone,

One of my customers needs to use my app with TalkBack. It's almost compatible with TalkBack. The views that work with it are the label views and sliders. The app is also using the IconButton view but TalkBack speaks "Unlabled button" when the user slides a finger over they type of view and I have a lot of them in the app.

I already tried to enter text into the text property of the view but TalkBack ignores the text. Is there a way to make the IconButton visible to TalkBack?

Thanks.
I use the following subroutine to set the "content description" for each view. This seems to be what Talkback relies on.

B4X:
Sub SetContentDesc(v As View, desc As String)
  Dim r As Reflector
 
  r.Target = v
 
  r.RunMethod2("setContentDescription", desc, "java.lang.CharSequence")
End Sub
For example, for an image button I have:

B4X:
  SetContentDesc(bnHelp, "Help")
Barry.
 

rleiman

Well-Known Member
Licensed User
Works like a charm!!! :p

Is there a tutorial on using RunMethod2? I would like to learn all the neat tricks that can be done with it.

Thanks so much.
 

Shelby

Active Member
Licensed User
Use the search field above and I think you'll find something on the 7 pages that it shows.
 

canalrun

Well-Known Member
Licensed User
Works like a charm!!! :p

Is there a tutorial on using RunMethod2? I would like to learn all the neat tricks that can be done with it.

Thanks so much.
Search the form for:
Reflector

There is some information. Maybe Erel has created a tutorial. I don't think there is a lot of information. Maybe there is some information in one of the B4A books.

Reflector has a few routines. The Reflector and Java Object allow you to access Android things not directly available in B4A.

I'm sure someone else can offer a much better description.

Barry.
 
Top