gcssloop / rclayout Goto Github PK
View Code? Open in Web Editor NEW[暂停维护]Android通用圆角布局。
[暂停维护]Android通用圆角布局。
Button设置的有背景色,但是放置到圆角布局内直接变透明看不到了,很奇怪,放置其他控件没问题。
9.0切背景导致白板。感觉9.0不是很稳定,有个思路是判断下版本,9.0以后使用setOutlineProvider设置圆角
给该布局添加background颜色,该布局还会直接显示直角矩形背景颜色,不过可以通过在该布局内部定义其他布局解决,这个能否直接定义background达到圆角矩形?
实现圆形、圆角,一开始也想过这种实现方式,通用。但是效果不理想,锯齿很严重,最终放弃。这也是为什么那么多圆形圆角实现方法不采用该方式的原因。
http://lib.gcssloop.com:8081/repository/gcssloop-central/
访问不到,里面的资源也无法下载
布局如下
`
<com.test.testandroid.test_round_corner.p2.RCRelativeLayout
android:id="@+id/frame_container"
android:layout_width="wrap_content"
app:round_corner="14dp"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/img_default"
android:layout_width="50dp"
android:background="#0000ff"
android:layout_height="3000dp"/>
</com.test.testandroid.test_round_corner.p2.RCRelativeLayout>
</LinearLayout>
</ScrollView>`
<com.gcssloop.widget.RCImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:background="@drawable/bg_750x750"
android:scaleType="fitXY"
app:round_corner="5dp"
app:clip_background="true"/>
预览 有效果的,运行在华为8.0就方了,小米6.0还是圆角
6.0,7.0和8.0都正常,在4.4没有效果,边缘仍然是尖角。
RCRelativeLayout设置圆角后,View会填充为背景色
只有Button是不显示的, 但是再包裹一层就可以了
圆形没有反应
这个做的很棒!,但是还不是真正的真正的自定义圆角layout,这本质上用的还是background,layout的边框还是矩形,能不能做一个layout的边框变成矩形的控件呀
能否添加一些动态设置属性的方法
setRoundAsCircle
setRadius
setStrokeWidth
...
使用rcimageview列表大量图片时,直观感到卡顿不流畅
以前是1.4的版本
请问
mClipPath.moveTo(-mEdgeFix, -mEdgeFix); // 通过空操作让Path区域占满画布
mClipPath.moveTo(w + mEdgeFix, h + mEdgeFix);
这两端代码是什么意思呢
当RCLayout内部的子View有点击效果时,比如MD的水波纹效果,如果先按住子View然后一直按住滑动到RCLayout外再松手时,事件被消费了导致子View的水波纹效果没能消退。希望可以优化一下这点。
clip_background) not found. 直接无法调用
使用框架的内部嵌套一个WebView,在android 9.0 的机器上,WebView显示的内容不能和顶部对齐,请问这是什么原因?
我在RecyclerView的item中最外层使用RCRelativeLayout导致滑动时也会触发长按
SurfaceViewyu预览camera不显示
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter/' }
我的仓库配置了上面这个地址,然后发现下载下来的RCHelper的代码和github下载的不一样。阿里云上的对应的地址是这个:http://maven.aliyun.com/nexus/content/repositories/jcenter/com/gcssloop/widget/rclayout/1.6.0/
这个问题会导致控件的一些效果不起作用。
我看readme这个库貌似只发布在私有仓库中,是不是被别人私自发阿里云上了。
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.gcssloop.widget:rclayout:1.8.1.
Show Details
Affected Modules: app
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.gcssloop.widget:rclayout:1.8.1.
Show Details
Affected Modules: app
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve com.gcssloop.widget:rclayout:1.8.1.
Show Details
Affected Modules: app
VideoView能播放, 但是完全不能显示, 并且没有圆角:
private String url = "http://tb-video.bdstatic.com/tieba-smallvideo-transcode/8_4871b1e9218ec13f03131176197ef53d_1.mp4";
videoView.setVideoURI(Uri.parse(url));
videoView.start();
view.setDrawingCacheEnabled(true);
view.buildDrawingCache(true);
viewBitmap = viewRoot.getDrawingCache();
拿到的截图没有圆角
使用RCRelativeLayout后,通过开发者工具--显示过渡绘制,发现会导致多出一次绘制次数
<com.gcssloop.widget.RCRelativeLayout
android:layout_width="50dp"
android:layout_height="50dp"
app:round_as_circle="true"
app:clip_background="true"
>
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitXY"
android:src="@drawable/sample_bg" />
</com.gcssloop.widget.RCRelativeLayout>
在android studio中无法预览,编译安装后有裁剪效果
用您这个控件,发现会和RecycleView item的长按事件冲突,就是你手指按着某个item上下滑动就会触达长按事件,而用普通的RelativeLayout则不会
SurfaceViewyu预览camera不显示画面
圆角和描边在P版本下失效,O版本可以工作,请帮忙看下,谢谢
Could not resolve com.gcssloop.widget:rclayout:1.8.1.
Required by:
project :app
Could not resolve com.gcssloop.widget:rclayout:1.8.1.
> Could not get resource 'http://lib.gcssloop.com:8081/repository/gcssloop-central/com/gcssloop/widget/rclayout/1.8.1/rclayout-1.8.1.pom'.
> Could not GET 'http://lib.gcssloop.com:8081/repository/gcssloop-central/com/gcssloop/widget/rclayout/1.8.1/rclayout-1.8.1.pom'.
> Connect to lib.gcssloop.com:8081 [lib.gcssloop.com/192.157.231.172] failed: Connection refused (Connection refused)
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 9s
左下和右下弄反了,
之前是
mRCHelper.radii[4] = bottomLeftRadius;
mRCHelper.radii[5] = bottomLeftRadius;
改成
mRCHelper.radii[6] = bottomLeftRadius;
mRCHelper.radii[7] = bottomLeftRadius;
之前是
mRCHelper.radii[6] = bottomRightRadius;
mRCHelper.radii[7] = bottomRightRadius;
改成
mRCHelper.radii[4] = bottomRightRadius;
mRCHelper.radii[5] = bottomRightRadius;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.