Fixed
Status Update
Comments
yb...@google.com <yb...@google.com> #2
Hi. Thanks for reporting this. Fixed in alpha-04
da...@google.com <da...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit e782987543a9f8ccd485e970ddc74564b24378db
Author: Vighnesh Raut <vighnesh.raut13@gmail.com>
Date: Mon Jan 02 15:27:40 2023
fix: tab row crashes when only 1 tab is added
Bug: b/264018028
Test: Added unit test
Change-Id: I6381dbac304fc1d69d3708c6655f8b595668e93f
M tv/tv-material/src/androidTest/java/androidx/tv/material/TabRowTest.kt
M tv/tv-material/src/main/java/androidx/tv/material/TabRow.kt
https://android-review.googlesource.com/2373449
Branch: androidx-main
commit e782987543a9f8ccd485e970ddc74564b24378db
Author: Vighnesh Raut <vighnesh.raut13@gmail.com>
Date: Mon Jan 02 15:27:40 2023
fix: tab row crashes when only 1 tab is added
Bug:
Test: Added unit test
Change-Id: I6381dbac304fc1d69d3708c6655f8b595668e93f
M tv/tv-material/src/androidTest/java/androidx/tv/material/TabRowTest.kt
M tv/tv-material/src/main/java/androidx/tv/material/TabRow.kt
ap...@google.com <ap...@google.com> #4
deleted
da...@google.com <da...@google.com>
an...@google.com <an...@google.com> #5
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.tv:tv-material:1.0.0-alpha04
Description
Version used: 2.2.3
Devices/Android versions reproduced on: n/a
Android Studio 3.5.3
Build #AI-191.8026.42.35.6010548, built on November 15, 2019
JRE: 1.8.0_202-release-1483-b49-5587405 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 5.3.0-24-generic
Steps to Reproduce:
1. Import the attached project into Android Studio (tested on 3.5.3)
2. Attempt to build the InterfaceSuspend module
Expected Results: A clean build
Actual Results: A build error:
error: Bookstore_Impl is not abstract and does not override abstract method loadCategoryByTransaction(String,Continuation<? super Pair<Category,? extends List<Book>>>) in Bookstore
public final class Bookstore_Impl implements Bookstore {
^
1 error
Here, Bookstore is a Kotlin interface with a @Dao annotation, defining a concrete suspending function that calls two other functions that should get code-generated:
@Dao
interface Bookstore {
@Insert
suspend fun save(category: Category)
@Insert
suspend fun save(vararg books: Book)
suspend fun loadCategoryByTransaction(shortCode: String) =
_loadCategory(shortCode) to _loadBooksInCategory(shortCode)
@Query("SELECT * FROM categories WHERE shortCode = :shortCode")
suspend fun _loadCategory(shortCode: String): Category
@Query("SELECT * FROM books WHERE categoryShortCode = :shortCode")
suspend fun _loadBooksInCategory(shortCode: String): List<Book>
}
If you switch this to be an abstract class, it compiles (see the AbstractSuspend module). If you add @Transaction to the function on the interface, it compiles (see the InterfaceTransaction module), though there's a separate bug with that (to be filed shortly).
Let me know if you need more details -- thanks!