5 Star 3 Fork 1

HarmonyOS-TPC / triangle-view

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

triangle-view

A simple openharmony view to easily draw triangle shapes. Add a ** triangle-view** to your slice the same way you'd add any other component. The size and shape of the triangle is determined by the size given to the component. The direction and color of the triangle is set via public setters or via the XML attributes:

triangle-view includes :

*Set Direction *Set Color

  • Adding triangle-view programmatically
  • Adding triangle-view through xml layout
  • Changing color and direction of triangle using public setter and from directly from xml

Usage Instructions

  1. The related classes are as follows:

     TriangleView triangleView = new TriangleView(this);
     triangleView.setDirection(TriangleView.Direction.DOWN);
     triangleView.setColor(COLOR_YELLOW);
  2. XML <com.itaihanski.triangleview.TriangleView ohos:id="$+id:1_one" ohos:width="50vp" ohos:height="50vp" ohos:top_margin="15vp" ohos:tr_direction="up" ohos:tr_color="#F44336"/>

Installation Instructions

  1. For using triangle-view module in sample app,include the below library jar/har in libs folder of "entry" module to generate hap/triangleview.har: Modify entry build.gradle as below : dependencies { implementation fileTree(dir: 'libs', include: ['.jar', '.har']) }

  2. For using triangle-view in separate application make sure to add the below dependent libraries in entry gradle dependency: Modify entry build.gradle as below : dependencies { implementation project(':triangleview') }

  3. For using triangle-view from a remote repository in separate application, add the below dependencies: Modify entry build.gradle as below : dependencies { implementation 'io.openharmony.tpc.thirdlib:triangle-view:1.0.1' }

Installation2

For using the picasso in sample app, Add below dependencies in gradle.

Solution 1: local har package integration
Add the .har package to the lib folder.
Add the following code to the gradle of the entry:
implementation fileTree(dir: 'libs', include: ['.jar', '.har'])

Solution 2: Add following dependencies in your build.gradle:

allprojects {
    repositories {
        mavenCentral()
    }
}
implementation 'io.openharmony.tpc.thirdlib:triangle-view:1.0.1'
The MIT License (MIT) Copyright (c) 2014 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.

简介

A simple openharmony view to easily draw triangle shapes 展开 收起
Java
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/HarmonyOS-tpc/triangle-view.git
git@gitee.com:HarmonyOS-tpc/triangle-view.git
HarmonyOS-tpc
triangle-view
triangle-view
master

搜索帮助