Question
What is the purpose of using "fixed: 1 1;" in a part's description in EDC files?
For example:
part {
name: "abc";
type: TEXTBLOCK;
description {
state: "default" 0.0;
fixed: 1 1; // What does this do?
rel1.relative: 0.5 1.0;
rel2.relative: 0.5 1.0;
text.align: 0.5 0.5;
}
}
Answer
Problem Understanding
The user wants to understand the functionality of the fixed: 1 1; property in EDC (Edje Data Collection) files, specifically how it affects part behavior in Tizen applications.
Solution Methods
- The
fixedproperty controls how a part behaves during minimum size calculations. - It takes two boolean parameters (0 or 1) for width and height respectively.
- When set to
1, it indicates that the part should maintain its size in that dimension during layout calculations.
Code Examples
part {
name: "fixed_example";
type: RECT;
description {
state: "default" 0.0;
fixed: 1 0; // Fixed width, flexible height
min: 100 50;
}
}
Additional Tips
- Setting
fixed: 1 1means the part won't change size in either dimension during layout calculations. - The default value is
0 0, meaning both dimensions are flexible. - This property is particularly useful when you want to prevent certain UI elements from resizing when the container changes size.