B4A Library [Custom View] Speak Button

This class implements a "speak button":

SS-2013-06-12_11.21.17.png


It makes it very simple to add a speak button to an EditText.

You should add the button with the designer. Add a CustomView and set its type to SpeakButton.

In your code you should set the SpeakButton TargetEditText to the relevant EditText.

The code in the above example:
B4X:
Sub Globals
   Dim EditText1 As EditText
   Dim EditText2 As EditText
   Dim Speak1 As SpeakButton
   Dim Speak2 As SpeakButton
End Sub

Sub Activity_Create(FirstTime As Boolean)
   Activity.LoadLayout("1")
   Speak1.TargetEditText = EditText1
   Speak2.TargetEditText = EditText2
End Sub

This class depends on the Phone library and Reflection library.
 

Attachments

  • SpeakButton.zip
    8.1 KB · Views: 1,435

metrick

Active Member
Licensed User
Longtime User
Is there a way to hide the speakbutton and only show if there is data/wifi connection?
tried btn.visible = false in CodeCreateView but did not work.
 

Ydm

Active Member
Licensed User
Longtime User
Is it possible for me or the user to be charged when I make an application using this feature?
Are there certain limits? Can the person using my application speak and print as much as they wish?
I am not using any API in the application.
 
Top