Bento, the office suite that fits in a file
TypeScript mit-licenseofficeoffice-365office-suiteoffice-toolsoffice365open-sourcepowerpointself-hostedsingle-page-appslidesslideshareslideshowslideshow-galleryslideshow-makerslideshows
home/android: tapping a document in grid view opens it again (#752)
nyblnet88a8f57e9687
diff --git a/home/android/app/src/main/java/page/bento/home/DocumentsActivity.kt b/home/android/app/src/main/java/page/bento/home/DocumentsActivity.ktindex 8cd5e86d..5bd8e14a 100644--- a/home/android/app/src/main/java/page/bento/home/DocumentsActivity.kt+++ b/home/android/app/src/main/java/page/bento/home/DocumentsActivity.kt@@ -622,6 +622,9 @@ class DocumentsActivity : AppCompatActivity() {col.addView(empty)list = GridView(this).apply {+ // Over the cards, not under them: each card paints an opaque+ // surface that would hide a selector drawn beneath it.+ isDrawSelectorOnTop = trueadapter = RowAdapter()horizontalSpacing = dp(10)verticalSpacing = dp(10)@@ -809,8 +812,11 @@ class DocumentsActivity : AppCompatActivity() {strokeWidth = dp(1)strokeColor = themed(com.google.android.material.R.attr.colorOutlineVariant)setCardBackgroundColor(themed(com.google.android.material.R.attr.colorSurfaceContainerLow))- isClickable = true- isFocusable = true+ // NOT clickable. A clickable child consumes the touch, so the+ // GridView's item click and long click never fire: tapping a+ // document in grid view did nothing, and Remove was unreachable.+ // The press feedback the card used to draw comes from the+ // grid's selector instead, drawn on top (drawSelectorOnTop).addView(LinearLayout(context).apply {orientation = LinearLayout.VERTICALsetPadding(dp(8), dp(8), dp(8), dp(10))