An open API service indexing awesome lists of open source software.

https://github.com/theluckycoder/expandable-card-view


https://github.com/theluckycoder/expandable-card-view

android android-library android-view kotlin-android kotlin-library

Last synced: 17 days ago
JSON representation

Awesome Lists containing this project

README

        

# Expandable CardView
[![API](https://img.shields.io/badge/API-14%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=14)
[![Download](https://api.bintray.com/packages/theluckycoder/expandablecardview/expandable-cardview/images/download.svg) ](https://bintray.com/theluckycoder/expandablecardview/expandable-cardview/_latestVersion)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/vipulasri/Timeline-View/blob/master/LICENSE)

## Sample Project

For an example: checkout [Sample App Code](https://github.com/TheLuckyCoder/Expandable-Card-View/tree/master/sample/src/main) in repository.

## Quick Setup

### 1. Include library

**Using Gradle**

```gradle
dependencies {
implementation 'net.theluckycoder.expandablecardview:expandablecardview:1.2.0'
}
```

**Using Maven**

```maven

net.theluckycoder.expandablecardview
expandablecardview
1.2.0
pom

```

### 2. Usage
* In XML Layout:
```xml

```

* In Kotlin Code:
```kotlin
val card = findViewById(R.id.card)
card.cardTitle = "Card with Action"
card.cardDescription = "An expandable card with an action button"
card.setAction("Action", View.OnClickListener {
Toast.makeText(this, "Button Clicked", Toast.LENGTH_SHORT).show()
})
```

## Documentation
You can find all the usable methods documented [here](https://github.com/TheLuckyCoder/Expandable-Card-View/blob/master/library/src/main/java/net/theluckycoder/expandablecardview/ExpandableCardView.kt)

## License

```
Copyright 2019 The Lucky Coder

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.
```