#SharpView gitgub地址这是一个自定义控件,带有微信聊天尖角。目前有TextView,LinearLayout,RelativeLayout.## 效果

## Import```java Step 1. Add the JitPack repository to your build file Add it in your root build.gradle at the end of repositories: allprojects {repositories {...maven { url "https://jitpack.io" }}}Step 2. Add the dependencydependencies {        compile 'com.github.zengzhaoxing:SharpView:v2.0.0'}```## Maven```javaStep 1.jitpack.iohttps://jitpack.ioStep 2. Add the dependencycom.github.zengzhaoxingSharpViewv2.0.0```* 自定义属性name | format | instructions-----|------|----radius    | dimension    | radius of the view cornerbackgroundColor  | color    | backgroundColorarrowDirection    | enum    | the sharp location,can be one of the(top,left,right,bottom)relativePosition  | relativePosition| relative position of the sharpsharpSize    | dimension    | sharp length## 使用* 1.In the XML```java```

* 2.In the code

```java

SharpLinearLayout sharpLinearLayout = (SharpLinearLayout) findViewById(R.id.sharp_ll);

//get the SharpViewRenderProxy of the sharpView to refresh sharp

sharpLinearLayout.getRenderProxy().setArrowDirection(SharpView.ArrowDirection.BOTTOM);

sharpLinearLayout.getRenderProxy().setSharpSize(50);

sharpLinearLayout.getRenderProxy().setRelativePosition(0.8f);

sharpLinearLayout.getRenderProxy().setRadius(20);

sharpLinearLayout.getRenderProxy().setBackgroundColor(0xff000000);

```

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容