comparison android/DWindows.kt @ 2843:bacac2eb1677

Android: Fix container rows not being selectable in DW_CONTAINER_MODE_MULTI mode. Due to the addition of buttons in multi-line mode, them taking focus prevents interaction with the row they are contained in. So we block descendant focus on the stack (LinearLayout) they are contained in. https://issuetracker.google.com/issues/36908602
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Fri, 16 Sep 2022 20:23:25 +0000
parents 22dd09e90112
children 64c528d38fb8
comparison
equal deleted inserted replaced
2842:22dd09e90112 2843:bacac2eb1677
2274 lp.addRule(RelativeLayout.RIGHT_OF, imageview.id); 2274 lp.addRule(RelativeLayout.RIGHT_OF, imageview.id);
2275 this.addView(text, lp) 2275 this.addView(text, lp)
2276 lp = RelativeLayout.LayoutParams(match, wrap) 2276 lp = RelativeLayout.LayoutParams(match, wrap)
2277 stack.id = View.generateViewId() 2277 stack.id = View.generateViewId()
2278 stack.orientation = LinearLayout.HORIZONTAL 2278 stack.orientation = LinearLayout.HORIZONTAL
2279 stack.descendantFocusability = LinearLayout.FOCUS_BLOCK_DESCENDANTS
2279 lp.addRule(RelativeLayout.BELOW, imageview.id); 2280 lp.addRule(RelativeLayout.BELOW, imageview.id);
2280 lp.addRule(RelativeLayout.BELOW, text.id); 2281 lp.addRule(RelativeLayout.BELOW, text.id);
2281 this.addView(stack, lp) 2282 this.addView(stack, lp)
2282 } 2283 }
2283 2284