• android widgets控件


    1.TextView

     类似,C#里的lable,显示一段文本

    <TextView
            android:id="@+id/textView2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="TextView" />

    2.Button

        <Button
            android:text="PDA"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@+id/buttonPDA"
            android:layout_weight="1"
            />

    3.ToggleButton

    点击按钮 OFF ON切换

     

        <ToggleButton
            android:id="@+id/toggleButton"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="ToggleButton" />

    4.CheckBox

    复选框

        <CheckBox
            android:id="@+id/checkBox2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="CheckBox" />

    5.RadioButton

    单选框

        <RadioButton
            android:id="@+id/radioButton2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="RadioButton" />

    6.CheckedTextView

     

        <CheckedTextView
        android:id="@+id/checkedTextView3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:text="多选风格"
        android:checkMark="?android:attr/listChoiceIndicatorMultiple"
        />
        <CheckedTextView
            android:id="@+id/checkedTextView4"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="单选风格"
            android:checkMark="?android:attr/listChoiceIndicatorSingle"
            />

    7.Spinner

    下拉框

        <Spinner
            android:id="@+id/spinner"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1" />

    8.ProgressBar

    弧形进度条1

       <ProgressBar
            android:id="@+id/progressBar"
            style="?android:attr/progressBarStyle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1" />

    线型进度条2

       <ProgressBar
            android:id="@+id/progressBar3"
            style="?android:attr/progressBarStyleHorizontal"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1" />

    9.SeekBar

    滑动调节1

    <SeekBar
        android:id="@+id/seekBar"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="1" />

    滑动调节2

    
    
    <SeekBar
        android:id="@+id/seekBar2"
        style="@style/Widget.AppCompat.SeekBar.Discrete"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:max="10"
        android:progress="3" />
     

    10.QuickContactBadge

     联系人

    11.RatingBar

    打分

     

        <RatingBar
            android:id="@+id/ratingBar"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1" />

    12.Switch

     滑动开关

        <Switch
            android:id="@+id/switch1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="Switch" />

    13.Space

  • 相关阅读:
    Codeforces956D. Contact ATC
    一道题14
    扰动法--*BZOJ3157: 国王奇遇记
    一道题13
    不是一道题
    一道题12
    *Codeforces891E. Lust
    二次剩余详解
    BZOJ3994: [SDOI2015]约数个数和
    *Codeforces961G. Partitions
  • 原文地址:https://www.cnblogs.com/buchizaodian/p/8744616.html
Copyright © 2020-2023  润新知