zoukankan      html  css  js  c++  java
  • Android——Button的颜色

    .xml

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">
    
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="拨打电话"
            android:id="@+id/phone"
            android:background="@drawable/anniu1"
           />
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="不拨打电话"
            android:background="@drawable/anniu2"
            />
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="拨打电话"
            android:drawableLeft="@drawable/anniu5"
            />
    
            <Button
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="不拨打电话"
                android:drawableRight="@drawable/anniu6"
                />
    
    
            <ImageButton
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:src="@drawable/anniu3"
                />
    
    
    
    </LinearLayout>

  • 相关阅读:
    POJ-2393
    POJ-1328
    POJ-2376
    CF-811B
    CF-811A
    CF-816B
    P1111 修复公路
    P2777 [AHOI2016初中组]自行车比赛
    P1889 士兵站队
    P1459 三值的排序 Sorting a Three-Valued Sequence
  • 原文地址:https://www.cnblogs.com/Chenshuai7/p/5331412.html
Copyright © 2011-2022 走看看