Text and Speech
Text and Speech:
Android Text and Speech" generally refers to the capabilities and functionalities related to handling text and speech within Android applications.
Example:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
android:transitionGroup="true"
android:padding="16dp">
<TextView
android:id="@+id/textview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Text to Speech"
android:textSize="28dp"
android:textColor="#000000"
android:gravity="center"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"/>
<EditText
android:id="@+id/userText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/textview"
android:layout_marginTop="45dp"
android:hint="Enter your text"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Text to Speech"
android:textColor="@color/colorWhite"
android:layout_below="@+id/userText"
android:layout_centerHorizontal="true"
android:padding="16dp"
android:layout_marginTop="46dp"
android:background="@color/colorPrimaryDark"/>
<TextView
android:id="@+id/clickMic"
android:layout_below="@id/button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Tap on mic to speak"
android:textSize="18dp"
android:textColor="#808080"
android:textStyle="bold"
android:gravity="center"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"/>
<ImageView
android:id="@+id/imageMic"
android:layout_width="70dp"
android:layout_height="70dp"
android:src="@drawable/ic_microphone"
android:layout_below="@id/clickMic"
android:layout_centerHorizontal="true"
android:layout_marginTop="30dp"/>
</RelativeLayout>