1 Star 0 Fork 3

CHINASOFT3_OHOS / MaterialShadows

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README
MIT

MaterialShadows

项目介绍

  • 项目名称: MaterialShadows
  • 所属系列: openharmony的第三方组件适配移植
  • 功能: 实现阴影效果的组件
  • 项目移植状态: 主功能完成
  • 调用差异:无
  • 开发版本:sdk6,DevEco Studio 2.2 Beta1
  • 基线版本:master分支

项目演示

安装教程

1.在项目根目录下的build.gradle文件中,

allprojects {
   repositories {
       maven {
           url 'https://s01.oss.sonatype.org/content/repositories/releases/'
       }
   }
}

2.在entry模块的build.gradle文件中,

dependencies {
   implementation('com.gitee.chinasoft_ohos:MaterialShadows:1.0.0')
   ......  
}

在sdk6,DevEco Studio 2.2 Beta1下项目可直接运行 如无法运行,删除项目.gradle,.idea,build,gradle,build.gradle文件, 并依据自己的版本创建新项目,将新项目的对应文件复制到根目录下

使用说明

    <com.sdsmdg.harjot.materialshadows.MaterialShadowViewWrapper
        ohos:id="$+id:shadow_wrapper"
        ohos:height="match_content"
        ohos:width="match_parent"
        ohos:background_element="#FFFFFF"
        ohos:padding="20vp"
        app:animateShadow="true"
        app:animationDuration="300"
        app:calculateAsync="true"
        app:shadowOffsetX="10"
        app:shadowOffsetY="10"
        app:showWhenAllReady="true"
        >

        <Image
            ohos:id="$+id:image"
            ohos:height="80vp"
            ohos:width="80vp"
            ohos:align_parent_left="true"
            ohos:image_src="$media:google"
            ohos:padding="10vp"
            ohos:scale_mode="clip_center"/>

    </com.sdsmdg.harjot.materialshadows.MaterialShadowViewWrapper>
  • Documentation
XML attribute Java set methods Description Default Value
shadowOffsetX setOffsetX(...) Set the X-offset of the shadow 0.0f
shadowOffsetY setOffsetX(...) Set the Y-offset of the shadow 0.0f
calculateAsync setShouldCalculateAsync(...) Set the flag for async shadow calculations. true
showWhenAllReady setShowShadowsWhenAllReady(...) Set the flag for showing all shadows after all calculations are over true
animateShadow setShouldAnimateShadow(...) Set the flag for shadow animation true
animationDuration setAnimationDuration(...) Set the value of shadow animation duration. 300ms

测试信息

CodeCheck代码测试无异常

CloudTest代码测试无异常

病毒安全检测通过

当前版本demo功能与原组件基本无差异

版本迭代

  • 1.0.0

版权和许可信息

MaterialShadows is licensed under `MIT license`. View license.
Copyright 2016-17 Harjot Singh Oberai 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.

About

一个图形阴影库 expand collapse
Java
MIT
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
Java
1
https://gitee.com/chinasoft3_ohos/MaterialShadows.git
git@gitee.com:chinasoft3_ohos/MaterialShadows.git
chinasoft3_ohos
MaterialShadows
MaterialShadows
master

Search