Android ToggleButton and switch and the use of Analogcolok and Digitalcolok-android Learning Journey (20)

Source: Internet
Author: User

ToggleButton and switch Introduction

Both ToggleButton and switch inherit the button, so their property settings are similar to the button.

Attributes supported separately

Properties of the ToggleButton:

Properties of Switch:

Analogcolok and Digitalcolok Introduction

Digitalcolok inherited the text, but its SetText method can not be used, can display accurate to the second, as a number of tables, Analogcolok is inherited the view, the geometry of the redraw, can not display seconds.

Analogcolok and Digitalcolok property settings

property settings for Analogcolok:

Examples of Analogcolok and Digitalcolok
<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:paddingleft="@dimen/activity_horizontal_margin"android:paddingright="@dimen/activity_horizontal_margin"android:paddingtop="@dimen/activity_vertical_margin"Android:paddingbottom="@dimen/activity_vertical_margin"tools:context=". Mainactivity "android:orientation="Vertical"> <analogclock android:layout_width="Wrap_content"android:layout_height="Wrap_content"/> <digitalclock android:layout_width="Wrap_content"android:layout_height="Wrap_content"Android:textsize="14pt"Android:textcolor="#f0f"android:drawableright="@drawable/ic_launcher"/> <analogclock android:layout_width="Wrap_content"android:layout_height="Wrap_content"Android:dial="@drawable/ic_launcher"/></linearlayout>

Android ToggleButton and switch and the use of Analogcolok and Digitalcolok-android Learning Journey (20)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.