1 Star 0 Fork 0

Archermind-TI / Crescento

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Crescento

Android library that adds a curve at the below of image views and relative layouts. CrescentoImageView and CrescentoContainer are the image view and relative layout respectively. You can change the radius of curve with attribute:curvature.

Overview

Crescento provides following advantages:

  • Curve Bottom: It adds a curve bottom as stated above.
  • Tint: It add tint on CrescentoImageView by using attribute:tintColor. It pick color automatically from the image if tintMode is set to 0.
  • Alpha: Add transparency in tint by using attribute:tintAlpha. Varies from 0 to 255.
  • Gradient : Add gradient on the imageview.
  • Gravity : You can now add crescento to bottom of your layout. Arc will form on top.

DEMO

Sample Image 1 Sample Image 2

Use with [KenBurnsView]

<developer.shivam.crescento.CrescentoContainer
        ohos:height="300fp"
        ohos:width="match_parent"
        ohos:scale_mode="clip_center">
    <com.flaviofaria.kenburnsview.KenBurnsView
        ohos:height="match_parent"
        ohos:width="match_parent"
        ohos:image_src="$media:wallpaper3_optimized"/>
</developer.shivam.library.CrescentoContainer>

Gradle Integration

Add below lines in build.gradle at app level.

compile 'com.gitee.archermind-ti:Crescento:1.0.0'

Basic Usage

For a working implementation, see /app folder

ImageView

<developer.shivam.crescento.CrescentoImageView
    ohos:height="400vp"
    ohos:width="match_parent"
    ohos:image_src="$media:rogue"
    ohos:layout_alignment="top"
    ohos:scale_mode="clip_center"/>

Container

<developer.shivam.crescento.CrescentoContainer
        ohos:height="300fp"
        ohos:width="match_parent"
        ohos:scale_mode="clip_center">
    <com.flaviofaria.kenburnsview.KenBurnsView
        ohos:height="match_parent"
        ohos:width="match_parent"
        ohos:image_src="$media:wallpaper3_optimized"/>
</developer.shivam.library.CrescentoContainer>

Attributes

  • curvature: To change the size of curve.
  • curvatureDirection : To change the direction of curvature. Whether 0 or 1.
  • tintColor: To add tint on image view.
  • tintMode: To add tint 0 or 1. If 0 it will pick color from image you have set.
  • tintAlpha: To set the amount of tint. 0 for 100% transparent and 255 for opaque.
  • gradientDirection : To set the direction of gradient. Supported direction are 0, 1, 2 and 3.
  • gradientStartColor : gradient start color.
  • gradientEndColor : gradient end color.
  • gravity : To set gravity. 0 or 1.

License

MIT License

Copyright (c) 2016 Shivam Satija

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
MIT License Copyright (c) 2016 Shivam Satija Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

Add curve at bottom of image views and relative layouts. 展开 收起
Java
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/archermind-ti/crescento.git
git@gitee.com:archermind-ti/crescento.git
archermind-ti
crescento
Crescento
master

搜索帮助