captain-miao / optionroundcardview Goto Github PK
View Code? Open in Web Editor NEWAndroid Cardview that allows you custom round position.
License: Apache License 2.0
Android Cardview that allows you custom round position.
License: Apache License 2.0
The support library CardViews use following code to set the default background:
ColorStateList backgroundColor;
if (a.hasValue(R.styleable.CardView_cardBackgroundColor)) {
backgroundColor = a.getColorStateList(R.styleable.CardView_cardBackgroundColor);
} else {
// There isn't one set, so we'll compute one based on the theme
final TypedArray aa = getContext().obtainStyledAttributes(COLOR_BACKGROUND_ATTR);
final int themeColorBackground = aa.getColor(0, 0);
aa.recycle();
// If the theme colorBackground is light, use our own light color, otherwise dark
final float[] hsv = new float[3];
Color.colorToHSV(themeColorBackground, hsv);
backgroundColor = ColorStateList.valueOf(hsv[2] > 0.5f
? getResources().getColor(R.color.cardview_light_background)
: getResources().getColor(R.color.cardview_dark_background));
}
Perhaps it would be nice if the OptionRoundCardview did this as well? I use this library in an app where we are currently implementing a night mode, and adding this code would make the OptionRoundCardview adjust automatically to light and dark themes.
Hi, I'm having problem syncing gradle with the info provided in the README.
I keep getting the following error:
Received status code 401 from server: Repo not found or no access token provided
I've included the following in build.gradle
repositories {
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}
...
dependencies {
compile 'com.github.captain-miao:optroundcardview:1.0.0-SNAPSHOT'
}
Hi,
I need fix for disabling the edge shadows on Lolipop and above devices. Any update will be a great help.
Thanks,
Shirisha S.
I'm using a phone with Oreo (API 26) and when adding a ImageView that uses width and height = matchParent
it is not getting clipped - the radius on the card is lost. I can't use padding, or else I would have a white background around my image. This is the same as #3 . I'm using version 1.0.0
.
Hi, thanks for this library. I tried to use it but unfortunately it is not rounding the corners of its contents when I put ImageView inside. Support Library's CardView does so.
Error:(417) Attribute "cardBackgroundColor" has already been defined
Error:(417) Attribute "cardCornerRadius" has already been defined
Error:(417) Attribute "cardElevation" has already been defined
Error:(417) Attribute "cardMaxElevation" has already been defined
Error:(417) Attribute "cardUseCompatPadding" has already been defined
Error:(417) Attribute "cardPreventCornerOverlap" has already been defined
Error:(417) Attribute "contentPadding" has already been defined
Error:(417) Attribute "contentPaddingLeft" has already been defined
Error:(417) Attribute "contentPaddingRight" has already been defined
Error:(417) Attribute "contentPaddingTop" has already been defined
Error:(417) Attribute "contentPaddingBottom" has already been defined
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.