Share text of TextView on button click (Kotlin) - Android Studio
In this tutorial we will learn how to share text of a TextView on button click. When the button is clicked bottom sheet will appear listing the apps that can share that text... Step 1: Create a new project OR Open your project Step 2: Code activity_main.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout 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" android:orientation= "vertical" android:padding= "10dp" tools:context= ".MainActivity" > <TextView android:id= "@+id/textView" android:textAlignment= "center" android:layout_width= "match_parent" android:layout_height= "wrap_content" android:text= ...