Mobile Application Development Practical 9
Mobile Application Development Practical 9 Question 1 Write a program to create a toggle button to display ON / OFF Bluetooth on the display screen. activity_main.xml <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity"> <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent"> <ToggleButton android:id="@+id/toggleButton" android:layout_width="153dp" android:layout_height="262dp" android:layout_gravity="center" android:drawableBottom="@drawable/bluetooth" android:textOff="off" android:textOn="on" /> <TextView android:id="@+id/textView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="100dp" android:layout_gravity="center_horizontal" android:text="Bluetooth […]
Mobile Application Development Practical 9 Read More »