ICode9

精准搜索请尝试: 精确搜索
  • Android 自定义谷歌风格ProgressBar,鸿蒙app开发工具2022-03-19 21:05:15

    final int color = a.getColor(R.styleable.GoogleStyleProgressBar_color, res.getColor(R.color.default_color)); final int sectionsCount = a.getInteger( R.styleable.GoogleStyleProgressBar_sections_count, res.getInteger(R.integer.default_sections_count)); fin

  • 全网最深入 Android Style/Theme/Attr/Styleable/TypedArray 清清楚楚明明白白2021-10-04 19:34:03

    前言 回顾一下:自定义View的时候,根据不同条件设置不同颜色,那么需要提供对外的方法设置颜色。而View可以在xml里引用,我们想当然的认为是否能够在xml里根据不同条件设置颜色属性呢?这样的话就很灵活了。当然,Android系统已经为我们准备好了,接下来我们来分析其解析原理及其使用。

  • 自定义 ImageView 代替原生 CheckBox2021-05-09 13:35:10

    在开发过程中,经常会用到 checkbox,这很简单,霸特,产品要的并不是系统自带的样式。所以我们就只能自定义样式,看似没毛病了,然而限制太多了,checkbox 再怎么改样式,图片资源的尺寸大小在影响着 checkbox 的大小,也就是 checkbox 的大小不能自己随意设置大小,如果 checkbox 设置的小了,那么你

  • 自定义View的简单实现2021-04-24 16:34:04

    继承View后实现构造方法,并在其获取自定义的属性值:  res/values/ 目录下添加一个 attrs.xml ,: <resources> <declare-styleable name="MyView"> <attr name="content1" format="string" /> <attr name="isShow1" form

  • kotlin 圆形进度条2021-02-25 12:34:06

    kotlin版的自定义圆形进度条 大多数启动页都会带个进度条加载样式,所以就自己用kotlin重新写了一个,如果真的要很炫酷还是有很多东西可以附加的 一个简单的进度条基本组成就是一个背景环,一个进度环,需要注意的就是绘制的方式了 因为圆形进度条是宽高对等的,我们定义view宽高可能不是

  • Android进度条升级篇2021-02-19 18:30:47

    先上效果图 import android.animation.ValueAnimator; import android.content.Context; import android.content.res.Resources; import android.content.res.TypedArray; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Pain

  • Activity的setContentView()2021-02-13 17:32:37

      1.调用的是PhoneWindow的setContentView PhoneWindow.java @Override public void setContentView(int layoutResID) { // Note: FEATURE_CONTENT_TRANSITIONS may be set in the process of installing the window // decor, when theme attributes

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有