You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello , i've just face a problem on odoo framwork when i use Constraint layout inside OForm it's will stay INVISIBLE , i made a change in the code and now it's works perfectly , so i want to share this with you guys.
the change made on OForm class ( odoo/controls/OForm )
( sorry for my bad english )
old method :
private void findAllFields(ViewGroup view) {
int child = view.getChildCount();
for (int i = 0; i < child; i++) {
View v = view.getChildAt(i);
if (v instanceof LinearLayout || v instanceof RelativeLayout) {
if (v.getVisibility() == View.VISIBLE)
findAllFields((ViewGroup) v);
}
if (v instanceof OField) {
OField field = (OField) v;
if (field.getVisibility() == View.VISIBLE)
mFormFieldControls.put(field.getFieldName(), field);
}
}
}
the new one that work :
private void findAllFields(ViewGroup view) {
int child = view.getChildCount();
for (int i = 0; i < child; i++) {
View v = view.getChildAt(i);
if (v instanceof LinearLayout || v instanceof RelativeLayout || v instanceof ConstraintLayout) {
if (v.getVisibility() == View.VISIBLE)
findAllFields((ViewGroup) v);
}
if (v instanceof OField) {
OField field = (OField) v;
if (field.getVisibility() == View.VISIBLE)
mFormFieldControls.put(field.getFieldName(), field);
}
}
}
The text was updated successfully, but these errors were encountered:
Hello , i've just face a problem on odoo framwork when i use Constraint layout inside OForm it's will stay INVISIBLE , i made a change in the code and now it's works perfectly , so i want to share this with you guys.
the change made on OForm class ( odoo/controls/OForm )
( sorry for my bad english )
old method :
private void findAllFields(ViewGroup view) {
int child = view.getChildCount();
for (int i = 0; i < child; i++) {
View v = view.getChildAt(i);
if (v instanceof LinearLayout || v instanceof RelativeLayout) {
if (v.getVisibility() == View.VISIBLE)
findAllFields((ViewGroup) v);
}
if (v instanceof OField) {
OField field = (OField) v;
if (field.getVisibility() == View.VISIBLE)
mFormFieldControls.put(field.getFieldName(), field);
}
}
}
the new one that work :
private void findAllFields(ViewGroup view) {
int child = view.getChildCount();
for (int i = 0; i < child; i++) {
View v = view.getChildAt(i);
if (v instanceof LinearLayout || v instanceof RelativeLayout || v instanceof ConstraintLayout) {
if (v.getVisibility() == View.VISIBLE)
findAllFields((ViewGroup) v);
}
if (v instanceof OField) {
OField field = (OField) v;
if (field.getVisibility() == View.VISIBLE)
mFormFieldControls.put(field.getFieldName(), field);
}
}
}
The text was updated successfully, but these errors were encountered: