自定义View -星轨迹

meteor

项目介绍 v1.0 version

模仿流星轨迹,自定义星投影控件

效果图

           

软件架构

软件架构说明

  • library依赖
安装教程

1.Add it in your root build.gradle

allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}

2.Add it in your App build.gradle

dependencies {
        implementation 'com.github.pengMaster:meteor:v1.0.2'
    }
使用说明

3.Attribute introduction

  • type :整体线束所处位置
    • top:至于顶部,头朝下
    • mid_left:至于左侧,头朝右
    • mid_right:至于右侧,头朝左
    • bottom:至于底部,头朝上
  • topLineCount :顶部线束数量
  • midLineCount :中部线束数量
  • bottomLineCount :底部线束数量
  • lineWidth :每条线束宽度
  • lineColor :每条线束颜色

4.import your project

<com.lan.john.gradienttest.wiget.GradientPaintView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@android:color/transparent"
        app:lineWidth="3"
        app:topLineCount="15"
        app:midLineCount="20"
        app:bottomLineCount="8"
        app:type="top" />

5.edit count

/**
     * 代码动态设置线束
     *
     * @param countTop 顶部线束数量
     * @param countMid 中间线束数量
     * @param countBottom 底部线束数量
     */
    public void setLineCount(int countTop,int countMid ,int countBottom){
        lineCountTop = countTop;
        lineCountMid = countMid;
        lineCountBottom = countBottom;
        //可在线程中刷新
        postInvalidate();
    }
参与贡献
  1. Fork 本项目
  2. 新建 Feat_xxx 分支
  3. 提交代码
  4. 新建 Pull Request
github地址
  1. https://github.com/pengMaster/meteor
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值