Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Records are not showing using Kotlin #205

Open
alcarazolabs opened this issue Jul 22, 2022 · 0 comments
Open

Records are not showing using Kotlin #205

alcarazolabs opened this issue Jul 22, 2022 · 0 comments

Comments

@alcarazolabs
Copy link

Hi I implement this library using kotlin however the records are not showing only the headers.

 implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
    implementation 'com.github.ISchwarz23:SortableTableView:2.8.1'

layout.xml

  <de.codecrafters.tableview.SortableTableView
                        android:layout_marginTop="5dp"
                        xmlns:table="http://schemas.android.com/apk/res-auto"
                        android:id="@+id/tableView"
                        table:tableView_columnCount="2"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        />

Fragment.kt

 private lateinit var tableViewSalesPerMonth: SortableTableView<Array<String>>
onViewCreated(...){
  tableViewSalesPerMonth = binding.tableView as SortableTableView<Array<String>>
        tableViewSalesPerMonth.headerAdapter = SimpleTableHeaderAdapter(requireContext(),"Mes","Cantidad Ventas")

        var data = arrayOf(arrayOf("may", "33"), arrayOf("jun","32"))
        tableViewSalesPerMonth.dataAdapter = SimpleTableDataAdapter(requireContext(), data)

}

I will appreciate any idea to fix this problem. Thanks so much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant