summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramVertexFixedFunction.java
diff options
context:
space:
mode:
authorJiongxuan Gao <jiongxuan.xa.gao@sonymobile.com>2016-11-24 20:20:27 +0900
committerAdam Powell <adamp@google.com>2017-08-29 10:26:39 -0700
commit3365b168218f8692d9124866737a36bb1c57743e (patch)
tree28354c878a3e8f37080ef761b851a51515913559 /rs/java/android/renderscript/ProgramVertexFixedFunction.java
parentd499ae5a853937fba88196e418f9cfa1b2f583ce (diff)
Fix ListView can not be moved after rotation.
Symptom: "Share with" popup displayed incompletely, and cannot be slid after rotated the screen twice. Root cause: Since ChooserActivity's configChanges attribute contains "screenSize|orientation" , when user rotates device, Android will not recreate ChooserActivity, its content view ResolverDrawerLayout is also not recreated. In ResolverDrawerLayout's onMeasure, it will call getHeightUsed to calculate the ListView's height. getHeightUsed will check against the lowest child view plus padding and margin instead of the actual measured height of the ListView. This lets the ListView hang off the edge when all of the content would fit on-screen . Because of ResolverDrawerLayout has not been drawn yet, we can not get the actual showing items' count of ListView before it's drawn, the result of getChildCount for ListView will return the value in landscape mode. The heightUsed of ListView might be smaller. mCollapsibleHeight will be 0. When received a move action, the mCollapseOffset and new position might both be 0. Solution: When configuration changed, we should rebuild the list and refresh adapter's data set. Just like onRestart does. Bug: 34365764 Change-Id: I4be0f9afc68588fbb0d8d152c41509650d04c754
Diffstat (limited to 'rs/java/android/renderscript/ProgramVertexFixedFunction.java')
0 files changed, 0 insertions, 0 deletions