Gregary Boyles
Newbie
The call to setLayoutParams(...) is causing my app to crash.
If I comment out the line of code in bold then my app run as normal.
What am I doing wrong?
This doesn't work either.
If I comment out the line of code in bold then my app run as normal.
What am I doing wrong?
Code:
ViewGroup.MarginLayoutParams marginParams = new ViewGroup.MarginLayoutParams(m_textviewStatusCurrent.getLayoutParams());
marginParams.leftMargin -= m_nOffset;
m_textviewStatusCurrent.setLayoutParams(marginParams);
This doesn't work either.
Code:
RelativeLayout.LayoutParams layoutparams = (RelativeLayout.LayoutParams)m_textviewStatusCurrent.getLayoutParams();
layoutparams.leftMargin -= m_nOffset;
m_textviewStatusCurrent.setLayoutParams(layoutparams);
Last edited: