nafiefn_10

strings.xml

Apr 10th, 2021
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.16 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3.    xmlns:app="http://schemas.android.com/apk/res-auto"
  4.    xmlns:tools="http://schemas.android.com/tools"
  5.    android:layout_width="match_parent"
  6.    android:layout_height="match_parent"
  7.    android:orientation="vertical"
  8.    tools:context=".MainActivity">
  9.  
  10.     <TextView
  11.        android:layout_width="wrap_content"
  12.        android:layout_height="wrap_content"
  13.        android:layout_marginTop="20dp"
  14.        android:text="Tombol ON/OFF Flash"
  15.        android:textSize="16sp"
  16.        android:textStyle="bold" />
  17.     <ToggleButton
  18.        android:id="@+id/toggleButton"
  19.        android:layout_width="wrap_content"
  20.        android:layout_height="wrap_content"
  21.        android:layout_marginTop="20dp"
  22.        android:layout_marginLeft="5dp"
  23.        android:text="ToggleButton"
  24.        android:textOff="Flash Mati" // text label OFF, Jika di tekan maka akan berubah textnya
  25.        android:textOn="Flash Hidup" //text label ON
  26.        app:layout_constraintStart_toStartOf="parent"
  27.        app:layout_constraintTop_toTopOf="parent" />
  28. </LinearLayout>
Advertisement
Add Comment
Please, Sign In to add comment