diff --git a/BeeTablesCompose/build.gradle.kts b/BeeTablesCompose/build.gradle.kts index 5a4a9b2..93a4cc1 100644 --- a/BeeTablesCompose/build.gradle.kts +++ b/BeeTablesCompose/build.gradle.kts @@ -40,11 +40,11 @@ android { } } compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 } kotlinOptions { - jvmTarget = "17" + jvmTarget = "1.8" } buildFeatures { compose = true diff --git a/BeeTablesCompose/src/main/java/com/breens/beetablescompose/BeeTablesCompose.kt b/BeeTablesCompose/src/main/java/com/breens/beetablescompose/BeeTablesCompose.kt index ad9e562..091e72e 100644 --- a/BeeTablesCompose/src/main/java/com/breens/beetablescompose/BeeTablesCompose.kt +++ b/BeeTablesCompose/src/main/java/com/breens/beetablescompose/BeeTablesCompose.kt @@ -35,6 +35,7 @@ import com.breens.beetablescompose.utils.extractMembers * 🐝 A Compose UI data table library. * * @param data The list of data items to display in the table. + * @param enableTableHeaderTitles show or hide the table header titles. If not set, by default the table header titles will be shown. * @param headerTableTitles The list of header titles to display at the top of the table. * @param headerTitlesBorderColor The color of the border for the header titles, by default it will be [Color.LightGray]. * @param headerTitlesBorderWidth The width of the border for the header titles in DP, by default it will be "0.4.dp". @@ -50,6 +51,7 @@ import com.breens.beetablescompose.utils.extractMembers @Composable inline fun BeeTablesCompose( data: List, + enableTableHeaderTitles: Boolean = true, headerTableTitles: List, headerTitlesBorderColor: Color = Color.LightGray, headerTitlesBorderWidth: Dp = 0.4.dp, @@ -64,13 +66,15 @@ inline fun BeeTablesCompose( ) { Card(elevation = CardDefaults.cardElevation(defaultElevation = tableElevation)) { Column(modifier = Modifier.clip(shape = shape)) { - TableHeaderComponent( - headerTableTitles = headerTableTitles, - headerTitlesBorderColor = headerTitlesBorderColor, - headerTitlesBorderWidth = headerTitlesBorderWidth, - headerTitlesTextStyle = headerTitlesTextStyle, - headerTitlesBackGroundColor = headerTitlesBackGroundColor, - ) + if (enableTableHeaderTitles) { + TableHeaderComponent( + headerTableTitles = headerTableTitles, + headerTitlesBorderColor = headerTitlesBorderColor, + headerTitlesBorderWidth = headerTitlesBorderWidth, + headerTitlesTextStyle = headerTitlesTextStyle, + headerTitlesBackGroundColor = headerTitlesBackGroundColor, + ) + } data.forEachIndexed { index, data -> val rowData = extractMembers(data).map { diff --git a/README.md b/README.md index fb8e525..8665410 100644 --- a/README.md +++ b/README.md @@ -38,11 +38,20 @@ To use the BeeTablesCompose library, follow these steps: +- Add this to either your **project build.gradle** file or **setting.gradle**, depending with what version of Android Studio you are using; + +```gradle +repositories { + ... + maven(url = "https://jitpack.io") +} +``` + - Add the dependency: Include the library in your project's dependencies; ```gradle dependencies { - implementation("com.github.Breens-Mbaka:BeeTablesCompose:1.0.2") + implementation("com.github.Breens-Mbaka:BeeTablesCompose:1.0.3") } ``` @@ -57,7 +66,7 @@ dependencies { titles as parameters to generate the data table.

- + # Want a new shiny feature 🪩✨ - If you want to request a new feature please first read this [short guide](https://github.com/Breens-Mbaka/BeeTablesCompose/blob/master/.github/ISSUE_TEMPLATE/feature_request.md) diff --git a/jitpack.yml b/jitpack.yml index 7a99024..c8b1edd 100644 --- a/jitpack.yml +++ b/jitpack.yml @@ -1,4 +1,4 @@ jdk: -- openjdk17 +- openjdk11 before_install: - ./scripts/prepareJitpackEnvironment.sh \ No newline at end of file