zoukankan      html  css  js  c++  java
  • 登录时旋转等待效果

    下面的属性只有在android:shape="ring时可用:

      android:innerRadius 尺寸,内环的半径。

      android:innerRadiusRatio 浮点型,以环的宽度比率来表示内环的半径,

      例如,如果android:innerRadiusRatio,表示内环半径等于环的宽度除以5,这个值是可以被覆盖的,默认为9.

      android:thickness 尺寸,环的厚度

      android:thicknessRatio 浮点型,以环的宽度比率来表示环的厚度,例如,如果android:thicknessRatio="2",

      那么环的厚度就等于环的宽度除以2。这个值是可以被android:thickness覆盖的,默认值是3.

      android:useLevel boolean值,如果当做是LevelListDrawable使用时值为true,否则为false.

    <?xml version="1.0" encoding="utf-8"?>
    <rotate xmlns:android="http://schemas.android.com/apk/res/android"
    android:pivotX="50%" android:pivotY="50%"               //围绕旋转的中心点。50%表示围绕圆心旋转
    android:fromDegrees="0" android:toDegrees="360">
    <shape
    android:shape="ring"
    android:innerRadiusRatio="3"
    android:thicknessRatio="8"
    android:useLevel="false">
    <gradient
    android:type="sweep"
    android:useLevel="false"
    android:startColor="#ffffffff"
    android:centerColor="#ff808080"
    android:centerY="0.45"
    android:endColor="#ff000000"/>
    </shape>
    </rotate>

    <shape android:shape="rectangle"      //矩形
    xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="@android:color/white" />     //矩形的颜色
    <stroke android:width="2.0dip" android:color="#00ff00" />  //矩形边框的宽度和颜色
    <corners android:radius="4.0dip" />     //矩形圆角的半径
    </shape>

  • 相关阅读:
    int是逻辑炸弹吗?
    悲剧
    下班啦
    Android SDK 2.2 开发环境安装
    MVC
    用于主题检测的临时日志(61d47e0cd5874842a9f56a725c1f25f6 3bfe001a32de4114a6b44005b770f6d7)
    ASP.NET读取XML文件
    asp.net执行顺序
    理解POCO
    乐观中谨慎 招聘调薪现"贫富差距"
  • 原文地址:https://www.cnblogs.com/jkx1229761162/p/4831995.html
Copyright © 2011-2022 走看看