cancel
Showing results for 
Search instead for 
Did you mean: 

ListLayout child container height changed problem

Xxoyo.1
Associate III

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

0693W00000BbsF9QAJ.png 

After pressing the flex button

0693W00000BbsKDQAZ.png 

Code

container_keypad.setHeight(269);
container_keypad.invalidate();
listLayout1.invalidate();

0693W00000BbsKhQAJ.png 

Screen Hierarchy : Screen Container -> Scroll Container -> List Container

0693W00000BbsLLQAZ.png 

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();

0693W00000BbssPQAR.png 

Any ideas/solution is appreciated !

0 REPLIES 0