2021-06-24 01:32 AM
I am having issue to display a keypad container inside ListLayout.
Problem: After displaying the keypad container by setting the container height, and invalidating the container & ListLayout, the other child inside ListLayout is not moved shifted/rearranged accordingly.
Note: The entire ListLayout is placed inside a scrollable container, so when the keypad is shown, I should be able to scroll down and access the hidden keys.
Before pressing the flex button
After pressing the flex button
Code
container_keypad.setHeight(269);
container_keypad.invalidate();
listLayout1.invalidate();
Screen Hierarchy : Screen Container -> Scroll Container -> List Container
Update1:
I solved the problem by using the following lines when the flex button is clicked
listLayout1.insert(&container2,container_keypad);
listLayout1.invalidate();
Problem2:
Now I have to close this keypad, I would like to make the button inside the keypad be able to call a function like
listLayout1.remove(container_keypad);
listLayout1.invalidate();
But its not working...
My error is either container_keypad not found or Drawable no member named remove
code when cancel button is clicked
touchgfx::ListLayout listLayouta = (touchgfx::ListLayout) this->getParent();
listLayouta.remove(container_keypad);
//this->getParent()->getParent()->invalidate();
Any ideas/solution is appreciated !