Android Cardview that allows you custom round corner position

Android Cardview that allows you custom round corner position.

License

License

MIT
GroupId

GroupId

com.github.captain-miao
ArtifactId

ArtifactId

optroundcardview
Last Version

Last Version

1.1.0
Release Date

Release Date

Type

Type

aar
Description

Description

Android Cardview that allows you custom round corner position
Android Cardview that allows you custom round corner position.
Project URL

Project URL

https://github.com/captain-miao/OptionRoundCardview
Source Code Management

Source Code Management

https://github.com/captain-miao/OptionRoundCardview

Download optroundcardview

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.captain-miao/optroundcardview/ -->
<dependency>
    <groupId>com.github.captain-miao</groupId>
    <artifactId>optroundcardview</artifactId>
    <version>1.1.0</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/com.github.captain-miao/optroundcardview/
implementation 'com.github.captain-miao:optroundcardview:1.1.0'
// https://jarcasting.com/artifacts/com.github.captain-miao/optroundcardview/
implementation ("com.github.captain-miao:optroundcardview:1.1.0")
'com.github.captain-miao:optroundcardview:aar:1.1.0'
<dependency org="com.github.captain-miao" name="optroundcardview" rev="1.1.0">
  <artifact name="optroundcardview" type="aar" />
</dependency>
@Grapes(
@Grab(group='com.github.captain-miao', module='optroundcardview', version='1.1.0')
)
libraryDependencies += "com.github.captain-miao" % "optroundcardview" % "1.1.0"
[com.github.captain-miao/optroundcardview "1.1.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

OptionRoundCardView

Android CardView that allows you custom round corner position.

Base on Android support-v4 CardView and Slice Support Android 2.3+

Screenshot

option_round_card_view

layout

must add enough layout_margin space for draw Corner

    //rename attribute:cardCornerRadius replace optRoundCardCornerRadius
    <com.github.captain_miao.optroundcardview.OptRoundCardView
        android:id="@+id/top_card_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/activity_horizontal_margin"
        android:layout_marginLeft="@dimen/activity_horizontal_margin"
        android:layout_marginRight="@dimen/activity_horizontal_margin"
        android:layout_marginBottom="@dimen/activity_horizontal_margin"
        app:optRoundCardCornerRadius="8dp"
        app:optRoundCardLeftBottomCorner="false"
        app:optRoundCardRightBottomCorner="false"
        app:optRoundCardBottomEdges="false">

        <TextView
            android:id="@+id/section_label"
            android:padding="@dimen/activity_horizontal_margin"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"/>

    </com.github.captain_miao.optroundcardview.OptRoundCardView>

API

  • showCorner(boolean leftTop, boolean rightTop, boolean leftBottom, boolean rightBottom)
  • showEdgeShadow(boolean left, boolean top, boolean right, boolean bottom)//only work for pre API 21.

Theme (default DayNight)

  • style="@style/OptRoundCardView.DayNight"
  • style="@style/OptRoundCardView.Light"
  • style="@style/OptRoundCardView.Dark"

Gradle

Get library from oss.sonatype.org.io

repositories {
    
    maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
    maven { url "https://oss.sonatype.org/content/repositories/releases" }

}

dependencies {
    compile 'com.github.captain-miao:optroundcardview:1.0.0'
}

Thanks

License

Copyright (C) 2016 YanLu
Copyright (C) 2016 Matthew Lee
Copyright (C) 2014 The Android Open Source Project

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Versions

Version
1.1.0
1.0.0