<?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" tools:context="com.example.testyk.MainActivity"> <ToggleButton android:layout_width="match_parent" android:id="@+id/tb" android:textOff="off" //text when off android:textOn="Open" //Text when closed android:layout_height="wrap_content" /> <Switch android:layout_width="wrap_content" android:id="@+id/switch1" android:text="Please select" android:textOff="Cancel" //Text when closing android:textOn="OK" //Text when closing android:layout_height="wrap_content" /> <RatingBar android:layout_width="wrap_content" android:id="@+id/rb" android:numStars="5" //Total number of stars android:rating="2" //The number of stars currently selected android:stepSize="0.5" //Minimum half a star can be selected each time android:layout_height="wrap_content" /> <RatingBar android:layout_width="wrap_content" android:id="@+id/rb1" android:numStars="6" android:rating="3" android:isIndicator="true" //Settings are not selectable android:stepSize="0.5" android:layout_height="wrap_content" /> </LinearLayout>
ToggleButton,RatingBar,Switch,Instance
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=325769167&siteId=291194637
Recommended
Ranking