Yuvaraj S
Yuvaraj S

Reputation: 311

Talkback not pronouncing the button name

In my app, Talkback is not pronouncing the name of the button. Instead it's just pronouncing as "button".
Can anyone help me to do the task?

I tried the following xml

 <Button 
            android:id="@+id/loginsuccess"
            android:scaleType="fitXY"
            android:layout_width="100dp"
            android:layout_height="30dp"
            android:background="@drawable/submit_button"            
            android:layout_alignParentRight="true"
             />

that's not working

Upvotes: 3

Views: 1893

Answers (4)

Halil Ozel
Halil Ozel

Reputation: 3332

You must Content description is set on Button. Like this android:contentDescription="login"

Upvotes: 0

user2891659
user2891659

Reputation: 131

For reference it was because you didn't have android:text so there was nothing to read out.

Upvotes: 0

Yuvaraj S
Yuvaraj S

Reputation: 311

I simply added a property android:contentDescription=" " in the xml file, Like the following

<Button
            android:text="Login"
            android:textSize="0sp" 
            android:id="@+id/loginsuccess"
            android:scaleType="fitXY"
            android:layout_width="100dp"
            android:layout_height="30dp"
            android:background="@drawable/submit_button"    
            android:contentDescription="login"      
            android:layout_alignParentRight="true"
             />

that solved the problem.

Upvotes: 1

user1506104
user1506104

Reputation: 7106

You should add the following in button xml declaration:

android:contentDescription="buttonName"

Upvotes: 1

Related Questions