Repository: Breens-Mbaka/Jetpack-Compose-Tables
Branch: develop
Commit: 0a6c23615d22
Files: 49
Total size: 84.5 KB
Directory structure:
gitextract_yme_lbv7/
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ ├── feature_request.md
│ │ └── pull_request_template.md
│ └── workflows/
│ └── android.yml
├── .gitignore
├── BeeTablesCompose/
│ ├── .gitignore
│ ├── build.gradle.kts
│ ├── consumer-rules.pro
│ ├── proguard-rules.pro
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── com/
│ │ └── breens/
│ │ └── beetablescompose/
│ │ └── ExampleInstrumentedTest.kt
│ ├── main/
│ │ ├── AndroidManifest.xml
│ │ └── java/
│ │ └── com/
│ │ └── breens/
│ │ └── beetablescompose/
│ │ ├── BeeTablesCompose.kt
│ │ ├── components/
│ │ │ ├── TableHeaderComponent.kt
│ │ │ ├── TableHeaderComponentWithoutColumnDividers.kt
│ │ │ ├── TableRowComponent.kt
│ │ │ └── TableRowComponentWithoutVerticalDividers.kt
│ │ └── utils/
│ │ ├── ColorUtils.kt
│ │ └── DataClassToList.kt
│ └── test/
│ └── java/
│ └── com/
│ └── breens/
│ └── beetablescompose/
│ └── ExampleUnitTest.kt
├── README.md
├── app/
│ ├── .gitignore
│ ├── build.gradle.kts
│ ├── proguard-rules.pro
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── com/
│ │ └── breens/
│ │ └── beetablescompose/
│ │ └── ExampleInstrumentedTest.kt
│ ├── main/
│ │ ├── AndroidManifest.xml
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── breens/
│ │ │ └── beetablescompose/
│ │ │ ├── MainActivity.kt
│ │ │ ├── ui/
│ │ │ │ └── theme/
│ │ │ │ ├── Color.kt
│ │ │ │ ├── Theme.kt
│ │ │ │ └── Type.kt
│ │ │ └── utils/
│ │ │ └── Teams.kt
│ │ └── res/
│ │ ├── drawable/
│ │ │ └── ic_launcher_background.xml
│ │ ├── drawable-v24/
│ │ │ └── ic_launcher_foreground.xml
│ │ ├── mipmap-anydpi-v26/
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ ├── values/
│ │ │ ├── colors.xml
│ │ │ ├── strings.xml
│ │ │ └── themes.xml
│ │ └── xml/
│ │ ├── backup_rules.xml
│ │ └── data_extraction_rules.xml
│ └── test/
│ └── java/
│ └── com/
│ └── breens/
│ └── beetablescompose/
│ └── ExampleUnitTest.kt
├── build.gradle.kts
├── gradle/
│ └── wrapper/
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── jitpack.yml
├── settings.gradle.kts
└── spotless/
└── copyright.kt
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**BeeTablesCompose Library Version**
- Library version: [1.0.0]
**Additional context**
Add any other context about the problem here.
================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
================================================
FILE: .github/ISSUE_TEMPLATE/pull_request_template.md
================================================
### 🎯 Goal
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.
### 🛠 Implementation details
Describe the implementation details for this Pull Request.
### ✍️ Explain examples
Explain examples with code for this updates.
### 🔠 Naming pull requests
1. If its a new feature: [feature/*]
2. If its a bug fix: [bugFix/*]
3. If its a documentation update: [documentation/*]
### Preparing a pull request for review
1. Before pushing your changes makes sure to run **"./gradlew spotlessCheck"** and **"./gradlewSpotlessApply"**. If there are any linting issues please fix them before creating a pull request.
2. Your pull request must pass the CI workflow before request a review to any of the maintainers, if not fix the issue first:
3. 🚨Always make a pull request against the develop branch.
4. Always have descriptive commit messages explaining what you did.
5. Always have a description for your pull request to explain what you did in depth, it will be great if you include video recording or screenshots if possible.
6. If you need help with the above please feel to reach out to me and I will help you out.
## Code reviews
All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose. Consult [GitHub Help](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) for more information on using pull requests.
================================================
FILE: .github/workflows/android.yml
================================================
name: Android CI
on:
push:
branches: [ master ]
pull_request:
branches: [ '*' ]
jobs:
lint:
name: Spotless check
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3.1.0
- name: Set up JDK
uses: actions/setup-java@v3.5.1
with:
distribution: 'zulu'
java-version: 17
- name: spotless
run: ./gradlew spotlessCheck
build:
name: Build and Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- name: set up JDK
uses: actions/setup-java@v3.5.1
with:
distribution: 'zulu'
java-version: 17
- name: Cache Gradle and wrapper
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Make Gradle executable
run: chmod +x ./gradlew
- name: Build with Gradle
run: ./gradlew --scan --stacktrace
- name: Run unit tests
run: |
./gradlew --scan --stacktrace \
testDebugUnitTest
================================================
FILE: .gitignore
================================================
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
.idea
================================================
FILE: BeeTablesCompose/.gitignore
================================================
/build
================================================
FILE: BeeTablesCompose/build.gradle.kts
================================================
/*
* Copyright 2023 Breens Mbaka
*
* 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.
*/
plugins {
id("com.android.library")
id("org.jetbrains.kotlin.android")
id("maven-publish")
id("org.jetbrains.kotlin.plugin.compose")
}
android {
namespace = "com.breens.beetablescompose"
compileSdk = 33
defaultConfig {
minSdk = 21
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro",
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
buildFeatures {
compose = true
}
}
dependencies {
implementation("androidx.core:core-ktx:1.9.0")
implementation("androidx.appcompat:appcompat:1.6.1")
implementation(platform("androidx.compose:compose-bom:2023.03.00"))
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.ui:ui-graphics")
implementation("androidx.compose.ui:ui-tooling-preview")
implementation("androidx.compose.material3:material3")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
androidTestImplementation(platform("androidx.compose:compose-bom:2023.03.00"))
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
debugImplementation("androidx.compose.ui:ui-tooling")
debugImplementation("androidx.compose.ui:ui-test-manifest")
implementation(kotlin("reflect"))
}
afterEvaluate {
publishing {
publications {
create<MavenPublication>("release") {
from(components["release"])
groupId = "com.breens.beetablescompose"
artifactId = "bee-tables-compose"
version = "1.0.2"
}
}
}
}
================================================
FILE: BeeTablesCompose/consumer-rules.pro
================================================
================================================
FILE: BeeTablesCompose/proguard-rules.pro
================================================
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
================================================
FILE: BeeTablesCompose/src/androidTest/java/com/breens/beetablescompose/ExampleInstrumentedTest.kt
================================================
/*
* Copyright 2023 Breens Mbaka
*
* 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.
*/
package com.breens.beetablescompose
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
import org.junit.Assert.assertEquals
import org.junit.Test
import org.junit.runner.RunWith
/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.breens.beetablescompose.test", appContext.packageName)
}
}
================================================
FILE: BeeTablesCompose/src/main/AndroidManifest.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
</manifest>
================================================
FILE: BeeTablesCompose/src/main/java/com/breens/beetablescompose/BeeTablesCompose.kt
================================================
/*
* Copyright 2023 Breens Mbaka
*
* 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.
*/
package com.breens.beetablescompose
import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.CardDefaults
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.OutlinedCard
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import com.breens.beetablescompose.components.TableHeaderComponent
import com.breens.beetablescompose.components.TableHeaderComponentWithoutColumnDividers
import com.breens.beetablescompose.components.TableRowComponent
import com.breens.beetablescompose.components.TableRowComponentWithoutDividers
import com.breens.beetablescompose.utils.extractMembers
import com.breens.beetablescompose.utils.lightColor
import com.breens.beetablescompose.utils.lightGray
/**
* 🐝 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".
* @param headerTitlesTextStyle The text style to apply to the header titles, by default it will be [MaterialTheme.typography.bodySmall].
* @param headerTitlesBackGroundColor The background color for the header titles, by default it will be [Color.White].
* @param tableRowColors The list of background colors to alternate between rows in the table, by default it will be a list of: [Color.White], [Color.White].
* @param rowBorderColor The color of the border for the table rows, by default it will be [Color.LightGray].
* @param rowBorderWidth The width of the border for the table rows in DP, by default it will be "0.4.dp".
* @param rowTextStyle The text style to apply to the data cells in the table rows, by default it will be [MaterialTheme.typography.bodySmall].
* @param tableElevation The elevation of the entire table (Card elevation) in DP, by default it will be "6.dp".
* @param shape The shape of the table's corners, by default it will be "RoundedCornerShape(4.dp)".
* @param disableVerticalDividers show or hide the vertical dividers between the table cells. If not set, by default the vertical dividers will be shown.
* @param horizontalDividerThickness The thickness of the horizontal dividers in DP, by default it will be "1.dp". Note: This will only be visible if [disableVerticalDividers] is set to true.
* @param horizontalDividerColor The color of the horizontal dividers, by default it will be [Color.LightGray]. Note: This will only be visible if [disableVerticalDividers] is set to true.
* @param contentAlignment The alignment of the content in the table cells, by default it will be [Alignment.Center].
* @param textAlign The alignment of the text in the table cells, by default it will be [TextAlign.Center].
*/
@Composable
inline fun <reified T : Any> BeeTablesCompose(
data: List<T>,
enableTableHeaderTitles: Boolean = true,
headerTableTitles: List<String>,
headerTitlesBorderColor: Color = lightGray(),
headerTitlesTextStyle: TextStyle = MaterialTheme.typography.bodySmall,
headerTitlesBackGroundColor: Color = lightColor(),
tableRowColors: List<Color> = listOf(
lightColor(),
lightColor(),
),
rowBorderColor: Color = lightGray(),
rowTextStyle: TextStyle = MaterialTheme.typography.bodySmall,
tableElevation: Dp = 0.dp,
shape: RoundedCornerShape = RoundedCornerShape(4.dp),
borderStroke: BorderStroke = BorderStroke(
width = 1.dp,
color = lightGray(),
),
disableVerticalDividers: Boolean = false,
dividerThickness: Dp = 1.dp,
horizontalDividerColor: Color = lightGray(),
contentAlignment: Alignment = Alignment.Center,
textAlign: TextAlign = TextAlign.Center,
tablePadding: Dp = 0.dp,
columnToIndexIncreaseWidth: Int? = null,
) {
OutlinedCard(
elevation = CardDefaults.cardElevation(defaultElevation = tableElevation),
shape = shape,
border = borderStroke,
) {
Column {
if (enableTableHeaderTitles) {
if (disableVerticalDividers) {
TableHeaderComponentWithoutColumnDividers(
headerTableTitles = headerTableTitles,
headerTitlesTextStyle = headerTitlesTextStyle,
headerTitlesBackGroundColor = headerTitlesBackGroundColor,
dividerThickness = dividerThickness,
contentAlignment = contentAlignment,
textAlign = textAlign,
tablePadding = tablePadding,
columnToIndexIncreaseWidth = columnToIndexIncreaseWidth,
)
} else {
TableHeaderComponent(
headerTableTitles = headerTableTitles,
headerTitlesBorderColor = headerTitlesBorderColor,
headerTitlesTextStyle = headerTitlesTextStyle,
headerTitlesBackGroundColor = headerTitlesBackGroundColor,
contentAlignment = contentAlignment,
textAlign = textAlign,
tablePadding = tablePadding,
dividerThickness = dividerThickness,
columnToIndexIncreaseWidth = columnToIndexIncreaseWidth,
)
}
}
data.forEachIndexed { index, data ->
val rowData = extractMembers(data).map {
it.second // getting the value from the returned Pair
}
// alternate background colors between rows
val tableRowBackgroundColor = if (index % 2 == 0) {
tableRowColors[0]
} else {
tableRowColors[1]
}
if (disableVerticalDividers) {
TableRowComponentWithoutDividers(
data = rowData,
rowTextStyle = rowTextStyle,
rowBackGroundColor = tableRowBackgroundColor,
dividerThickness = dividerThickness,
horizontalDividerColor = horizontalDividerColor,
contentAlignment = contentAlignment,
textAlign = textAlign,
tablePadding = tablePadding,
columnToIndexIncreaseWidth = columnToIndexIncreaseWidth,
)
} else {
TableRowComponent(
data = rowData,
rowBorderColor = rowBorderColor,
dividerThickness = dividerThickness,
rowTextStyle = rowTextStyle,
rowBackGroundColor = tableRowBackgroundColor,
contentAlignment = contentAlignment,
textAlign = textAlign,
tablePadding = tablePadding,
columnToIndexIncreaseWidth = columnToIndexIncreaseWidth,
)
}
}
}
}
}
================================================
FILE: BeeTablesCompose/src/main/java/com/breens/beetablescompose/components/TableHeaderComponent.kt
================================================
/*
* Copyright 2023 Breens Mbaka
*
* 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.
*/
package com.breens.beetablescompose.components
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import com.breens.beetablescompose.utils.darkColor
import com.breens.beetablescompose.utils.lightGray
@Composable
fun TableHeaderComponent(
headerTableTitles: List<String>,
headerTitlesBorderColor: Color,
headerTitlesTextStyle: TextStyle,
headerTitlesBackGroundColor: Color,
contentAlignment: Alignment,
textAlign: TextAlign,
tablePadding: Dp,
columnToIndexIncreaseWidth: Int?,
dividerThickness: Dp,
) {
Row(
Modifier
.fillMaxWidth()
.background(headerTitlesBackGroundColor)
.padding(horizontal = tablePadding),
) {
headerTableTitles.forEachIndexed { index, title ->
val weight = if (index == columnToIndexIncreaseWidth) 8f else 2f
Box(
modifier = Modifier
.weight(weight)
.border(
width = dividerThickness,
color = headerTitlesBorderColor,
),
contentAlignment = contentAlignment,
) {
Text(
text = title,
style = headerTitlesTextStyle,
overflow = TextOverflow.Ellipsis,
modifier = Modifier
.height(38.dp)
.wrapContentHeight(),
textAlign = textAlign,
)
}
}
}
}
@Composable
@Preview(showBackground = true)
fun TableHeaderComponentPreview() {
val titles = listOf("Team", "Home", "Away", "Points")
TableHeaderComponent(
headerTableTitles = titles,
headerTitlesBorderColor = darkColor(),
headerTitlesTextStyle = MaterialTheme.typography.labelMedium,
headerTitlesBackGroundColor = lightGray(),
contentAlignment = Alignment.Center,
textAlign = TextAlign.Center,
tablePadding = 0.dp,
columnToIndexIncreaseWidth = null,
dividerThickness = 1.dp,
)
}
================================================
FILE: BeeTablesCompose/src/main/java/com/breens/beetablescompose/components/TableHeaderComponentWithoutColumnDividers.kt
================================================
/*
* Copyright 2023 Breens Mbaka
*
* 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.
*/
package com.breens.beetablescompose.components
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.material3.Divider
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import com.breens.beetablescompose.utils.lightColor
@Composable
fun TableHeaderComponentWithoutColumnDividers(
headerTableTitles: List<String>,
headerTitlesTextStyle: TextStyle,
headerTitlesBackGroundColor: Color,
dividerThickness: Dp,
contentAlignment: Alignment,
textAlign: TextAlign,
tablePadding: Dp,
columnToIndexIncreaseWidth: Int?,
) {
Column {
Row(
Modifier
.fillMaxWidth()
.background(headerTitlesBackGroundColor)
.padding(horizontal = tablePadding),
) {
headerTableTitles.forEachIndexed { index, title ->
val weight = if (index == columnToIndexIncreaseWidth) 8f else 2f
Box(
modifier = Modifier
.weight(weight),
contentAlignment = contentAlignment,
) {
Text(
text = title,
style = headerTitlesTextStyle,
overflow = TextOverflow.Ellipsis,
modifier = Modifier
.height(38.dp)
.wrapContentHeight(),
textAlign = textAlign,
)
}
}
}
Divider(
modifier = Modifier
.fillMaxWidth()
.height(dividerThickness)
.background(headerTitlesBackGroundColor),
)
}
}
@Composable
@Preview(showBackground = true)
fun TableHeaderComponentWithoutColumnDividersPreview() {
val titles = listOf("Team", "Home", "Away", "Points")
TableHeaderComponentWithoutColumnDividers(
headerTableTitles = titles,
headerTitlesTextStyle = MaterialTheme.typography.bodySmall,
headerTitlesBackGroundColor = lightColor(),
dividerThickness = 1.dp,
contentAlignment = Alignment.Center,
textAlign = TextAlign.Center,
tablePadding = 0.dp,
columnToIndexIncreaseWidth = null,
)
}
================================================
FILE: BeeTablesCompose/src/main/java/com/breens/beetablescompose/components/TableRowComponent.kt
================================================
/*
* Copyright 2023 Breens Mbaka
*
* 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.
*/
package com.breens.beetablescompose.components
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import com.breens.beetablescompose.utils.lightColor
import com.breens.beetablescompose.utils.lightGray
@Composable
fun TableRowComponent(
data: List<String>,
rowBorderColor: Color,
rowTextStyle: TextStyle,
rowBackGroundColor: Color,
contentAlignment: Alignment,
textAlign: TextAlign,
tablePadding: Dp,
columnToIndexIncreaseWidth: Int?,
dividerThickness: Dp,
) {
Row(
Modifier
.fillMaxWidth()
.background(rowBackGroundColor)
.padding(tablePadding),
) {
data.forEachIndexed { index, title ->
val weight = if (index == columnToIndexIncreaseWidth) 8f else 2f
Box(
modifier = Modifier
.weight(weight)
.border(
width = dividerThickness,
color = rowBorderColor,
),
contentAlignment = contentAlignment,
) {
Text(
text = title,
style = rowTextStyle,
overflow = TextOverflow.Ellipsis,
modifier = Modifier
.height(38.dp)
.wrapContentHeight()
.padding(end = 8.dp),
textAlign = textAlign,
)
}
}
}
}
@Composable
@Preview(showBackground = true)
fun TableRowComponentPreview() {
val titles = listOf("Man Utd", "26", "7", "95")
TableRowComponent(
data = titles,
rowBorderColor = lightGray(),
rowTextStyle = MaterialTheme.typography.bodySmall,
rowBackGroundColor = lightColor(),
contentAlignment = Alignment.Center,
textAlign = TextAlign.Center,
tablePadding = 0.dp,
columnToIndexIncreaseWidth = null,
dividerThickness = 1.dp,
)
}
================================================
FILE: BeeTablesCompose/src/main/java/com/breens/beetablescompose/components/TableRowComponentWithoutVerticalDividers.kt
================================================
/*
* Copyright 2023 Breens Mbaka
*
* 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.
*/
package com.breens.beetablescompose.components
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.material3.Divider
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import com.breens.beetablescompose.utils.lightGray
@Composable
fun TableRowComponentWithoutDividers(
data: List<String>,
rowTextStyle: TextStyle,
rowBackGroundColor: Color,
dividerThickness: Dp,
horizontalDividerColor: Color,
contentAlignment: Alignment,
textAlign: TextAlign,
tablePadding: Dp,
columnToIndexIncreaseWidth: Int?,
) {
Column(
modifier = Modifier.padding(horizontal = tablePadding),
) {
Row(
Modifier
.fillMaxWidth()
.background(rowBackGroundColor),
) {
data.forEachIndexed { index, title ->
val weight = if (index == columnToIndexIncreaseWidth) 8f else 2f
Box(
modifier = Modifier
.weight(weight),
contentAlignment = contentAlignment,
) {
Text(
text = title,
style = rowTextStyle,
overflow = TextOverflow.Ellipsis,
modifier = Modifier
.height(38.dp)
.wrapContentHeight()
.padding(end = 8.dp),
textAlign = textAlign,
)
}
}
}
Divider(
modifier = Modifier
.fillMaxWidth()
.height(dividerThickness)
.background(horizontalDividerColor),
)
}
}
@Composable
@Preview(showBackground = true)
fun TableRowComponentWithoutDividersPreview() {
val titles = listOf("Man Utd", "26", "7", "95")
TableRowComponentWithoutDividers(
data = titles,
rowTextStyle = MaterialTheme.typography.bodySmall,
rowBackGroundColor = MaterialTheme.colorScheme.background,
dividerThickness = 1.dp,
horizontalDividerColor = lightGray(),
contentAlignment = Alignment.Center,
textAlign = TextAlign.Center,
tablePadding = 0.dp,
columnToIndexIncreaseWidth = null,
)
}
================================================
FILE: BeeTablesCompose/src/main/java/com/breens/beetablescompose/utils/ColorUtils.kt
================================================
/*
* Copyright 2023 Breens Mbaka
*
* 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.
*/
package com.breens.beetablescompose.utils
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
@Composable
fun lightGray() = MaterialTheme.colorScheme.onBackground.copy(alpha = 0.12f)
@Composable
fun darkColor() = MaterialTheme.colorScheme.onBackground
@Composable
fun lightColor() = MaterialTheme.colorScheme.background
================================================
FILE: BeeTablesCompose/src/main/java/com/breens/beetablescompose/utils/DataClassToList.kt
================================================
/*
* Copyright 2023 Breens Mbaka
*
* 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.
*/
package com.breens.beetablescompose.utils
import kotlin.reflect.KProperty1
import kotlin.reflect.full.primaryConstructor
inline fun <reified T : Any> extractMembers(instance: T): List<Pair<String, String>> {
val members = mutableListOf<Pair<String, String>>()
// Get the primary constructor of the data class
val constructor = T::class.primaryConstructor
// Get the parameter names in the constructor declaration order
val parameterNames = constructor?.parameters?.map { it.name } ?: emptyList()
// Get all properties of the class
val properties = T::class.members.filterIsInstance<KProperty1<T, *>>()
// Filter and sort properties based on constructor parameter order
val sortedProperties = properties.filter { it.name in parameterNames }
.sortedBy { parameterNames.indexOf(it.name) }
sortedProperties.forEach { member ->
val name = member.name
val value = member.get(instance)?.toString() ?: "---"
members.add(name to value)
}
return members
}
================================================
FILE: BeeTablesCompose/src/test/java/com/breens/beetablescompose/ExampleUnitTest.kt
================================================
/*
* Copyright 2023 Breens Mbaka
*
* 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.
*/
package com.breens.beetablescompose
import org.junit.Assert.assertEquals
import org.junit.Test
/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
@Test
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}
================================================
FILE: README.md
================================================
<h2 align="center">BeeTablesCompose</h2></br>
<p align="center">
<a href="https://opensource.org/licenses/Apache-2.0"><img alt="License" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"/></a>
<a href="https://android-arsenal.com/api?level=21+"><img alt="API" src="https://img.shields.io/badge/API-21%2B-brightgreen.svg?style=flat"/></a>
<a href="https://github.com/Breens-Mbaka/BeeTablesCompose/actions"><img alt="Build Status" src="https://github.com/Breens-Mbaka/BeeTablesCompose/workflows/Android%20CI/badge.svg"/></a>
<a href="https://jitpack.io/#Breens-Mbaka/BeeTablesCompose"><img alt="Build Status" src="https://jitpack.io/v/Breens-Mbaka/BeeTablesCompose.svg"/></a>
</p><br>
<p align="center">
:bee: A Compose UI data table library which allows developers to seamless integrate visually appealing and customizable tables to their Android apps or IOS apps.
</p><br>
https://github.com/Breens-Mbaka/BeeTablesCompose/assets/72180010/996cb574-766e-45f8-b459-6e7245da17bc
# Features 🌟
- Display tabular data with ease: The library allows you to display a list of data items in a
well-organized table format.
- Customizable header titles: Customize the appearance of header titles with options for border
color, width, text style, and background color.
- Alternating row colors: Easily set up alternating background colors for rows, enhancing the visual
presentation of your data.
- Styling options: Customize the appearance of table rows, including border color, width, and text
style.
- Table elevation: Control the elevation of the entire table with a customizable elevation value.
- Rounded corners: Set the shape of the table's corners, with a default rounded corner shape for a
sleek look.
# Getting Started 🦺
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.2.0")
}
```
# Usage
- Import the library: Import the BeeTablesCompose function into your Compose-based project.
- Prepare your data: Organize your data in a list of objects to be displayed in the table.
- Define the header titles: Create a list of header titles that will be displayed at the top of the
table.
- Use the BeeTablesCompose function: Invoke the BeeTablesCompose function with your data and header
titles as parameters to generate the data table.
<p align="center">
<img src="https://github.com/Breens-Mbaka/BeeTablesCompose/assets/72180010/f5ea94a1-df41-472c-91e2-03d6cb7dc82f" />
# NOTE ⚠️🚨
- Before building a release APK of your app, if you have enabled minification, make sure to annotate your table data classes with @Keep. This will prevent the class from being removed at runtime.
```kotlin
@Keep
data class User(
val name: String,
val email: Int,
val city: String
)
```
# 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)
# Want to report a bug 🐞
- If you want to report a bug please first read this [short guide](https://github.com/Breens-Mbaka/BeeTablesCompose/blob/master/.github/ISSUE_TEMPLATE/bug_report.md)
# Want to contribute 🛠
- If you want to contribute please first read this [short guide](https://github.com/Breens-Mbaka/BeeTablesCompose/blob/master/.github/ISSUE_TEMPLATE/pull_request_template.md)
# Find this repository useful? :heart:
Support it by joining _
_[stargazers](https://github.com/Breens-Mbaka/BeeTablesCompose/stargazers)__
for this repository. :star: <br>
Also __[follow](https://github.com/Breens-Mbaka)__ me for my next creations! 🤩
</p>
# License
```xml
Designed and developed by 2024 Breens Mbaka
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.
```
================================================
FILE: app/.gitignore
================================================
/build
================================================
FILE: app/build.gradle.kts
================================================
/*
* Copyright 2023 Breens Mbaka
*
* 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.
*/
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("org.jetbrains.kotlin.plugin.compose")
}
android {
namespace = "com.breens.beetablescompose"
compileSdk = 33
defaultConfig {
applicationId = "com.breens.beetablescompose"
minSdk = 21
targetSdk = 33
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary = true
}
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro",
)
signingConfig = signingConfigs.getByName("debug")
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
buildFeatures {
compose = true
}
}
dependencies {
implementation("androidx.core:core-ktx:1.9.0")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.1")
implementation("androidx.activity:activity-compose:1.7.2")
implementation(platform("androidx.compose:compose-bom:2023.03.00"))
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.ui:ui-graphics")
implementation("androidx.compose.ui:ui-tooling-preview")
implementation("androidx.compose.material3:material3")
implementation(project(":BeeTablesCompose"))
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
androidTestImplementation(platform("androidx.compose:compose-bom:2023.03.00"))
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
debugImplementation("androidx.compose.ui:ui-tooling")
debugImplementation("androidx.compose.ui:ui-test-manifest")
}
================================================
FILE: app/proguard-rules.pro
================================================
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
================================================
FILE: app/src/androidTest/java/com/breens/beetablescompose/ExampleInstrumentedTest.kt
================================================
/*
* Copyright 2023 Breens Mbaka
*
* 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.
*/
package com.breens.beetablescompose
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
import org.junit.Assert.assertEquals
import org.junit.Test
import org.junit.runner.RunWith
/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.breens.beetablescompose", appContext.packageName)
}
}
================================================
FILE: app/src/main/AndroidManifest.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.BeeTablesCompose"
tools:targetApi="31">
<activity
android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.BeeTablesCompose">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
================================================
FILE: app/src/main/java/com/breens/beetablescompose/MainActivity.kt
================================================
/*
* Copyright 2023 Breens Mbaka
*
* 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.
*/
package com.breens.beetablescompose
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.material3.Checkbox
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Slider
import androidx.compose.material3.Surface
import androidx.compose.material3.Switch
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.breens.beetablescompose.ui.theme.BeeTablesComposeTheme
import com.breens.beetablescompose.utils.premierLeagueTeams
import com.breens.beetablescompose.utils.titles
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
BeeTablesComposeTheme {
MainUi()
}
}
}
}
@Composable
fun MainUi(modifier: Modifier = Modifier) {
Surface(
color = MaterialTheme.colorScheme.background,
modifier = modifier.fillMaxSize(),
) {
var disableVerticalDividers by remember {
mutableStateOf(false)
}
var horizontalDividerThickness by remember {
mutableStateOf(0.6f)
}
var enableHeaderTitles by remember {
mutableStateOf(false)
}
var centerContent by remember {
mutableStateOf(false)
}
var centerTextAlignment by remember {
mutableStateOf(false)
}
var increaseColumnWidth by remember {
mutableStateOf<Int?>(null)
}
LazyColumn(contentPadding = PaddingValues(16.dp)) {
item {
BeeTablesCompose(
data = premierLeagueTeams,
enableTableHeaderTitles = enableHeaderTitles,
disableVerticalDividers = disableVerticalDividers,
dividerThickness = horizontalDividerThickness.dp,
columnToIndexIncreaseWidth = increaseColumnWidth?.minus(1),
headerTableTitles = titles,
headerTitlesBackGroundColor = Color(0XFFE9AB17),
tableRowColors = listOf(
MaterialTheme.colorScheme.surface,
MaterialTheme.colorScheme.surface,
),
contentAlignment = if (centerContent) Alignment.Center else Alignment.CenterStart,
textAlign = if (centerTextAlignment) TextAlign.Center else TextAlign.Start,
)
}
item {
Row(
modifier = Modifier.fillMaxWidth(),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.SpaceBetween,
) {
Text(
text = "Enable Table Header Titles",
style = MaterialTheme.typography.bodyMedium,
)
Switch(
checked = enableHeaderTitles,
onCheckedChange = {
enableHeaderTitles = it
},
)
}
Spacer(modifier = Modifier.padding(12.dp))
}
item {
Row(
modifier = Modifier.fillMaxWidth(),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.SpaceBetween,
) {
Text(
text = "Hide Vertical Divider",
style = MaterialTheme.typography.bodyMedium,
)
Switch(
checked = disableVerticalDividers,
onCheckedChange = {
disableVerticalDividers = it
},
)
}
Spacer(modifier = Modifier.padding(8.dp))
}
item {
Row(
modifier = Modifier.fillMaxWidth(),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.SpaceBetween,
) {
Text(
text = "Divider Thickness",
style = MaterialTheme.typography.bodyMedium,
)
Slider(value = horizontalDividerThickness, onValueChange = {
horizontalDividerThickness = it
})
}
}
item {
Spacer(modifier = Modifier.padding(12.dp))
Row(
modifier = Modifier.fillMaxWidth(),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.SpaceBetween,
) {
Text(
text = "Center Content",
style = MaterialTheme.typography.bodyMedium,
)
Switch(
checked = centerContent,
onCheckedChange = {
centerContent = it
},
)
}
Spacer(modifier = Modifier.padding(12.dp))
}
item {
Row(
modifier = Modifier.fillMaxWidth(),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.SpaceBetween,
) {
Text(
text = "Text Alignment Center",
style = MaterialTheme.typography.bodyMedium,
)
Switch(
checked = centerTextAlignment,
onCheckedChange = {
centerTextAlignment = it
},
)
}
Spacer(modifier = Modifier.padding(12.dp))
}
item {
Column {
Text(
text = "The Column To Increase Width",
style = MaterialTheme.typography.bodyMedium,
)
Row(
modifier = Modifier.fillMaxWidth(),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(8.dp),
) {
Text(text = "1", style = MaterialTheme.typography.bodySmall)
Checkbox(
checked = increaseColumnWidth == 1,
onCheckedChange = {
increaseColumnWidth = if (it) 1 else null
},
)
}
Row(
modifier = Modifier.fillMaxWidth(),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(8.dp),
) {
Text(text = "2", style = MaterialTheme.typography.bodySmall)
Checkbox(
checked = increaseColumnWidth == 2,
onCheckedChange = {
increaseColumnWidth = if (it) 2 else null
},
)
}
Row(
modifier = Modifier.fillMaxWidth(),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(8.dp),
) {
Text(text = "3", style = MaterialTheme.typography.bodySmall)
Checkbox(
checked = increaseColumnWidth == 3,
onCheckedChange = {
increaseColumnWidth = if (it) 3 else null
},
)
}
Row(
modifier = Modifier.fillMaxWidth(),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(8.dp),
) {
Text(text = "4", style = MaterialTheme.typography.bodySmall)
Checkbox(
checked = increaseColumnWidth == 4,
onCheckedChange = {
increaseColumnWidth = if (it) 4 else null
},
)
}
}
}
}
}
}
@Preview
@Composable
private fun MainUiPreview() {
BeeTablesComposeTheme {
MainUi()
}
}
================================================
FILE: app/src/main/java/com/breens/beetablescompose/ui/theme/Color.kt
================================================
/*
* Copyright 2023 Breens Mbaka
*
* 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.
*/
package com.breens.beetablescompose.ui.theme
import androidx.compose.ui.graphics.Color
val Purple80 = Color(0xFFD0BCFF)
val PurpleGrey80 = Color(0xFFCCC2DC)
val Pink80 = Color(0xFFEFB8C8)
val Purple40 = Color(0xFF6650a4)
val PurpleGrey40 = Color(0xFF625b71)
val Pink40 = Color(0xFF7D5260)
================================================
FILE: app/src/main/java/com/breens/beetablescompose/ui/theme/Theme.kt
================================================
/*
* Copyright 2023 Breens Mbaka
*
* 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.
*/
package com.breens.beetablescompose.ui.theme
import android.app.Activity
import android.os.Build
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.darkColorScheme
import androidx.compose.material3.dynamicDarkColorScheme
import androidx.compose.material3.dynamicLightColorScheme
import androidx.compose.material3.lightColorScheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.SideEffect
import androidx.compose.ui.graphics.toArgb
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalView
import androidx.core.view.WindowCompat
private val DarkColorScheme = darkColorScheme(
primary = Purple80,
secondary = PurpleGrey80,
tertiary = Pink80,
)
private val LightColorScheme = lightColorScheme(
primary = Purple40,
secondary = PurpleGrey40,
tertiary = Pink40,
/* Other default colors to override
background = Color(0xFFFFFBFE),
surface = Color(0xFFFFFBFE),
onPrimary = Color.White,
onSecondary = Color.White,
onTertiary = Color.White,
onBackground = Color(0xFF1C1B1F),
onSurface = Color(0xFF1C1B1F),
*/
)
@Composable
fun BeeTablesComposeTheme(
darkTheme: Boolean = isSystemInDarkTheme(),
// Dynamic color is available on Android 12+
dynamicColor: Boolean = true,
content: @Composable () -> Unit,
) {
val colorScheme = when {
dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
val context = LocalContext.current
if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
}
darkTheme -> DarkColorScheme
else -> LightColorScheme
}
val view = LocalView.current
if (!view.isInEditMode) {
SideEffect {
val window = (view.context as Activity).window
window.statusBarColor = colorScheme.primary.toArgb()
WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = darkTheme
}
}
MaterialTheme(
colorScheme = colorScheme,
typography = Typography,
content = content,
)
}
================================================
FILE: app/src/main/java/com/breens/beetablescompose/ui/theme/Type.kt
================================================
/*
* Copyright 2023 Breens Mbaka
*
* 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.
*/
package com.breens.beetablescompose.ui.theme
import androidx.compose.material3.Typography
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.sp
// Set of Material typography styles to start with
val Typography = Typography(
bodyLarge = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Normal,
fontSize = 16.sp,
lineHeight = 24.sp,
letterSpacing = 0.5.sp,
),
/* Other default text styles to override
titleLarge = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Normal,
fontSize = 22.sp,
lineHeight = 28.sp,
letterSpacing = 0.sp
),
labelSmall = TextStyle(
fontFamily = FontFamily.Default,
fontWeight = FontWeight.Medium,
fontSize = 11.sp,
lineHeight = 16.sp,
letterSpacing = 0.5.sp
)
*/
)
================================================
FILE: app/src/main/java/com/breens/beetablescompose/utils/Teams.kt
================================================
/*
* Copyright 2023 Breens Mbaka
*
* 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.
*/
package com.breens.beetablescompose.utils
data class Teams(
val name: String,
val homeWins: String,
val awayWins: String,
val totalPoints: String,
)
val premierLeagueTeams = listOf(
Teams("Manchester United", "1", "2", "14"),
Teams("Manchester City", "5", "3", "18"),
Teams("Chelsea", "22", "1", "19"),
Teams("Arsenal", "4", "4", "23"),
Teams("Liverpool", "21", "1", "23"),
Teams("Tottenham", "1", "1", "3"),
// Add more teams as needed
)
val titles = listOf("Team", "Home", "Away", "Points")
================================================
FILE: app/src/main/res/drawable/ic_launcher_background.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>
================================================
FILE: app/src/main/res/drawable-v24/ic_launcher_foreground.xml
================================================
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
================================================
FILE: app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
================================================
FILE: app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
================================================
FILE: app/src/main/res/values/colors.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="purple_200">#FFBB86FC</color>
<color name="purple_500">#FF6200EE</color>
<color name="purple_700">#FF3700B3</color>
<color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
</resources>
================================================
FILE: app/src/main/res/values/strings.xml
================================================
<resources>
<string name="app_name">BeeTablesCompose</string>
</resources>
================================================
FILE: app/src/main/res/values/themes.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.BeeTablesCompose" parent="android:Theme.Material.Light.NoActionBar" />
</resources>
================================================
FILE: app/src/main/res/xml/backup_rules.xml
================================================
<?xml version="1.0" encoding="utf-8"?><!--
Sample backup rules file; uncomment and customize as necessary.
See https://developer.android.com/guide/topics/data/autobackup
for details.
Note: This file is ignored for devices older that API 31
See https://developer.android.com/about/versions/12/backup-restore
-->
<full-backup-content>
<!--
<include domain="sharedpref" path="."/>
<exclude domain="sharedpref" path="device.xml"/>
-->
</full-backup-content>
================================================
FILE: app/src/main/res/xml/data_extraction_rules.xml
================================================
<?xml version="1.0" encoding="utf-8"?><!--
Sample data extraction rules file; uncomment and customize as necessary.
See https://developer.android.com/about/versions/12/backup-restore#xml-changes
for details.
-->
<data-extraction-rules>
<cloud-backup>
<!-- TODO: Use <include> and <exclude> to control what is backed up.
<include .../>
<exclude .../>
-->
</cloud-backup>
<!--
<device-transfer>
<include .../>
<exclude .../>
</device-transfer>
-->
</data-extraction-rules>
================================================
FILE: app/src/test/java/com/breens/beetablescompose/ExampleUnitTest.kt
================================================
/*
* Copyright 2023 Breens Mbaka
*
* 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.
*/
package com.breens.beetablescompose
import org.junit.Assert.assertEquals
import org.junit.Test
/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
@Test
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}
================================================
FILE: build.gradle.kts
================================================
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id("com.android.application") version "8.1.4" apply false
id("org.jetbrains.kotlin.android") version "2.0.0" apply false
id("com.android.library") version "8.1.4" apply false
id("com.diffplug.spotless") version "6.19.0" apply false
id("org.jetbrains.kotlin.plugin.compose") version "2.0.0" apply false
}
subprojects {
apply(plugin = "com.diffplug.spotless")
configure<com.diffplug.gradle.spotless.SpotlessExtension> {
kotlin {
target(
fileTree(".") {
include("**/*.kt")
exclude("spotless/copyright.kt", "**/build/**")
},
)
ktlint()
licenseHeaderFile(rootProject.file("spotless/copyright.kt"))
trimTrailingWhitespace()
endWithNewline()
}
format("kts") {
target("**/*.kts")
targetExclude("$buildDir/**/*.kts")
licenseHeaderFile(rootProject.file("spotless/copyright.kt"), "(^(?![\\/ ]\\*).*$)")
trimTrailingWhitespace()
endWithNewline()
}
}
afterEvaluate {
tasks.named("preBuild") {
dependsOn("spotlessApply")
}
}
}
================================================
FILE: gradle/wrapper/gradle-wrapper.properties
================================================
#Thu Jul 27 02:22:27 EAT 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
================================================
FILE: gradle.properties
================================================
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
================================================
FILE: gradlew
================================================
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# 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
#
# https://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.
#
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=`expr $i + 1`
done
case $i in
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
exec "$JAVACMD" "$@"
================================================
FILE: gradlew.bat
================================================
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
================================================
FILE: jitpack.yml
================================================
jdk:
- openjdk17
before_install:
- ./scripts/prepareJitpackEnvironment.sh
================================================
FILE: settings.gradle.kts
================================================
pluginManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}
rootProject.name = "BeeTablesCompose"
include(":app")
include(":BeeTablesCompose")
================================================
FILE: spotless/copyright.kt
================================================
/*
* Copyright 2023 Breens Mbaka
*
* 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.
*/
gitextract_yme_lbv7/
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ ├── feature_request.md
│ │ └── pull_request_template.md
│ └── workflows/
│ └── android.yml
├── .gitignore
├── BeeTablesCompose/
│ ├── .gitignore
│ ├── build.gradle.kts
│ ├── consumer-rules.pro
│ ├── proguard-rules.pro
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── com/
│ │ └── breens/
│ │ └── beetablescompose/
│ │ └── ExampleInstrumentedTest.kt
│ ├── main/
│ │ ├── AndroidManifest.xml
│ │ └── java/
│ │ └── com/
│ │ └── breens/
│ │ └── beetablescompose/
│ │ ├── BeeTablesCompose.kt
│ │ ├── components/
│ │ │ ├── TableHeaderComponent.kt
│ │ │ ├── TableHeaderComponentWithoutColumnDividers.kt
│ │ │ ├── TableRowComponent.kt
│ │ │ └── TableRowComponentWithoutVerticalDividers.kt
│ │ └── utils/
│ │ ├── ColorUtils.kt
│ │ └── DataClassToList.kt
│ └── test/
│ └── java/
│ └── com/
│ └── breens/
│ └── beetablescompose/
│ └── ExampleUnitTest.kt
├── README.md
├── app/
│ ├── .gitignore
│ ├── build.gradle.kts
│ ├── proguard-rules.pro
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── com/
│ │ └── breens/
│ │ └── beetablescompose/
│ │ └── ExampleInstrumentedTest.kt
│ ├── main/
│ │ ├── AndroidManifest.xml
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── breens/
│ │ │ └── beetablescompose/
│ │ │ ├── MainActivity.kt
│ │ │ ├── ui/
│ │ │ │ └── theme/
│ │ │ │ ├── Color.kt
│ │ │ │ ├── Theme.kt
│ │ │ │ └── Type.kt
│ │ │ └── utils/
│ │ │ └── Teams.kt
│ │ └── res/
│ │ ├── drawable/
│ │ │ └── ic_launcher_background.xml
│ │ ├── drawable-v24/
│ │ │ └── ic_launcher_foreground.xml
│ │ ├── mipmap-anydpi-v26/
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ ├── values/
│ │ │ ├── colors.xml
│ │ │ ├── strings.xml
│ │ │ └── themes.xml
│ │ └── xml/
│ │ ├── backup_rules.xml
│ │ └── data_extraction_rules.xml
│ └── test/
│ └── java/
│ └── com/
│ └── breens/
│ └── beetablescompose/
│ └── ExampleUnitTest.kt
├── build.gradle.kts
├── gradle/
│ └── wrapper/
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── jitpack.yml
├── settings.gradle.kts
└── spotless/
└── copyright.kt
Condensed preview — 49 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (94K chars).
[
{
"path": ".github/ISSUE_TEMPLATE/bug_report.md",
"chars": 901,
"preview": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Describe the b"
},
{
"path": ".github/ISSUE_TEMPLATE/feature_request.md",
"chars": 595,
"preview": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Is your fea"
},
{
"path": ".github/ISSUE_TEMPLATE/pull_request_template.md",
"chars": 1602,
"preview": "### 🎯 Goal\nDescribe the big picture of your changes here to communicate to the maintainers why we should accept this pul"
},
{
"path": ".github/workflows/android.yml",
"chars": 1246,
"preview": "name: Android CI\n\non:\n push:\n branches: [ master ]\n pull_request:\n branches: [ '*' ]\n\njobs:\n lint:\n name: Sp"
},
{
"path": ".gitignore",
"chars": 230,
"preview": "*.iml\n.gradle\n/local.properties\n/.idea/caches\n/.idea/libraries\n/.idea/modules.xml\n/.idea/workspace.xml\n/.idea/navEditor."
},
{
"path": "BeeTablesCompose/.gitignore",
"chars": 6,
"preview": "/build"
},
{
"path": "BeeTablesCompose/build.gradle.kts",
"chars": 2816,
"preview": "/*\n * Copyright 2023 Breens Mbaka\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "BeeTablesCompose/consumer-rules.pro",
"chars": 0,
"preview": ""
},
{
"path": "BeeTablesCompose/proguard-rules.pro",
"chars": 750,
"preview": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguar"
},
{
"path": "BeeTablesCompose/src/androidTest/java/com/breens/beetablescompose/ExampleInstrumentedTest.kt",
"chars": 1288,
"preview": "/*\n * Copyright 2023 Breens Mbaka\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "BeeTablesCompose/src/main/AndroidManifest.xml",
"chars": 121,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n</manifest"
},
{
"path": "BeeTablesCompose/src/main/java/com/breens/beetablescompose/BeeTablesCompose.kt",
"chars": 8392,
"preview": "/*\n * Copyright 2023 Breens Mbaka\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "BeeTablesCompose/src/main/java/com/breens/beetablescompose/components/TableHeaderComponent.kt",
"chars": 3543,
"preview": "/*\n * Copyright 2023 Breens Mbaka\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "BeeTablesCompose/src/main/java/com/breens/beetablescompose/components/TableHeaderComponentWithoutColumnDividers.kt",
"chars": 3674,
"preview": "/*\n * Copyright 2023 Breens Mbaka\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "BeeTablesCompose/src/main/java/com/breens/beetablescompose/components/TableRowComponent.kt",
"chars": 3441,
"preview": "/*\n * Copyright 2023 Breens Mbaka\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "BeeTablesCompose/src/main/java/com/breens/beetablescompose/components/TableRowComponentWithoutVerticalDividers.kt",
"chars": 3715,
"preview": "/*\n * Copyright 2023 Breens Mbaka\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "BeeTablesCompose/src/main/java/com/breens/beetablescompose/utils/ColorUtils.kt",
"chars": 955,
"preview": "/*\n * Copyright 2023 Breens Mbaka\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "BeeTablesCompose/src/main/java/com/breens/beetablescompose/utils/DataClassToList.kt",
"chars": 1626,
"preview": "/*\n * Copyright 2023 Breens Mbaka\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "BeeTablesCompose/src/test/java/com/breens/beetablescompose/ExampleUnitTest.kt",
"chars": 954,
"preview": "/*\n * Copyright 2023 Breens Mbaka\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "README.md",
"chars": 4632,
"preview": "<h2 align=\"center\">BeeTablesCompose</h2></br>\n\n<p align=\"center\">\n<a href=\"https://opensource.org/licenses/Apache-2.0\"><"
},
{
"path": "app/.gitignore",
"chars": 6,
"preview": "/build"
},
{
"path": "app/build.gradle.kts",
"chars": 2772,
"preview": "/*\n * Copyright 2023 Breens Mbaka\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "app/proguard-rules.pro",
"chars": 750,
"preview": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguar"
},
{
"path": "app/src/androidTest/java/com/breens/beetablescompose/ExampleInstrumentedTest.kt",
"chars": 1283,
"preview": "/*\n * Copyright 2023 Breens Mbaka\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "app/src/main/AndroidManifest.xml",
"chars": 1043,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:to"
},
{
"path": "app/src/main/java/com/breens/beetablescompose/MainActivity.kt",
"chars": 10671,
"preview": "/*\n * Copyright 2023 Breens Mbaka\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "app/src/main/java/com/breens/beetablescompose/ui/theme/Color.kt",
"chars": 884,
"preview": "/*\n * Copyright 2023 Breens Mbaka\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "app/src/main/java/com/breens/beetablescompose/ui/theme/Theme.kt",
"chars": 2803,
"preview": "/*\n * Copyright 2023 Breens Mbaka\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "app/src/main/java/com/breens/beetablescompose/ui/theme/Type.kt",
"chars": 1592,
"preview": "/*\n * Copyright 2023 Breens Mbaka\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "app/src/main/java/com/breens/beetablescompose/utils/Teams.kt",
"chars": 1132,
"preview": "/*\n * Copyright 2023 Breens Mbaka\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "app/src/main/res/drawable/ic_launcher_background.xml",
"chars": 5606,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:wi"
},
{
"path": "app/src/main/res/drawable-v24/ic_launcher_foreground.xml",
"chars": 1702,
"preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:aapt=\"http://schemas.android.com/aapt\"\n "
},
{
"path": "app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml",
"chars": 343,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <b"
},
{
"path": "app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml",
"chars": 343,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <b"
},
{
"path": "app/src/main/res/values/colors.xml",
"chars": 378,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <color name=\"purple_200\">#FFBB86FC</color>\n <color name=\"purpl"
},
{
"path": "app/src/main/res/values/strings.xml",
"chars": 78,
"preview": "<resources>\n <string name=\"app_name\">BeeTablesCompose</string>\n</resources>"
},
{
"path": "app/src/main/res/values/themes.xml",
"chars": 158,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n\n <style name=\"Theme.BeeTablesCompose\" parent=\"android:Theme.Mater"
},
{
"path": "app/src/main/res/xml/backup_rules.xml",
"chars": 478,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?><!--\n Sample backup rules file; uncomment and customize as necessary.\n See htt"
},
{
"path": "app/src/main/res/xml/data_extraction_rules.xml",
"chars": 551,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?><!--\n Sample data extraction rules file; uncomment and customize as necessary.\n "
},
{
"path": "app/src/test/java/com/breens/beetablescompose/ExampleUnitTest.kt",
"chars": 954,
"preview": "/*\n * Copyright 2023 Breens Mbaka\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
},
{
"path": "build.gradle.kts",
"chars": 1330,
"preview": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\nplugins {\n id(\"co"
},
{
"path": "gradle/wrapper/gradle-wrapper.properties",
"chars": 230,
"preview": "#Thu Jul 27 02:22:27 EAT 2023\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://"
},
{
"path": "gradle.properties",
"chars": 1358,
"preview": "# Project-wide Gradle settings.\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will ov"
},
{
"path": "gradlew",
"chars": 5766,
"preview": "#!/usr/bin/env sh\n\n#\n# Copyright 2015 the original author or authors.\n#\n# Licensed under the Apache License, Version 2.0"
},
{
"path": "gradlew.bat",
"chars": 2763,
"preview": "@rem\r\n@rem Copyright 2015 the original author or authors.\r\n@rem\r\n@rem Licensed under the Apache License, Version 2.0 (th"
},
{
"path": "jitpack.yml",
"chars": 73,
"preview": "jdk:\n- openjdk17\nbefore_install:\n- ./scripts/prepareJitpackEnvironment.sh"
},
{
"path": "settings.gradle.kts",
"chars": 364,
"preview": "pluginManagement {\n repositories {\n google()\n mavenCentral()\n gradlePluginPortal()\n }\n}\ndepen"
},
{
"path": "spotless/copyright.kt",
"chars": 591,
"preview": "/*\n * Copyright 2023 Breens Mbaka\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not u"
}
]
// ... and 1 more files (download for full content)
About this extraction
This page contains the full source code of the Breens-Mbaka/Jetpack-Compose-Tables GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 49 files (84.5 KB), approximately 21.7k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.