on 01-19-2006 9:39 AM
Hi all:
In my case, it is not allowed that one text view is in the first line and another in the second line. How can I put them always in the same line?
Thanks.
Hi yashpal:
I tested it as your idea just now. But the two child containers still cannot be wrapped no matter how you resize the window.
Bruce.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Armin:
But if I use the matrix layout the root contain,the first child contain is set as matrixheaddata and the second one is set to matrixdata, the two child containers never be wrapped even you change your windows to a very small size.
Bruce.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Arwin:
Sorry for my unclear explaination.
Now I have two child transparent containers under the root container. And I add three text view into the two child containers individually.
But why the two child containers are both placed from the begin of a row. Not as my expection, they can be palced one by one.
Bruce.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If I understand you correctly, you have two containers C1, C2, each containing some other controls, and you want to have all in one line. Right?
Set the layout of the <b>parent </b>of C1 and C2 (probably the root container of the view) to MatrixLayout, give C1 a MatrixHeadData and C2 a MatrixData as layout data.
Armin
Hi,
Imagination is the limit.. You can try a mix of layout..
I would suggest.. having matrix layout..first container as matrix head data and second container as matrixdata
each transparent container of matrix layout.. and the textviews as matrixdata (matrix head data will make it start in a new row)
regards
Bharathwaj
Hi,
as the window resizes the UIcontrols are also resized if wrapping is enabled and they will be in same row.
as u mentioned they are two containers in root container but appears one by one do as below
for root container
set layout - grid layout
colcount - 2
for 1st child container
set layout -grid layout
set colspan - 1
as u requre 3 Ui control in it
set colcount of child container to 3
add the UI controls
set the colspan of UI controls to 1.
do as same for second container
Thanks,
yashpal
Hi yashpal:
Thank you.
But as your suggestion, I have to calculate the number every time the window resizes?Right?
Bruce.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Armin:
Thank you.I had tested you idea.
But a transparent container must take the place of one whole row. How can I avoid this?
Bruce
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't understand your question.
What is the parent container and what layout has it?
If you want to replace a TextView T inside a container by a pair of two TextViews T1, T2 tied together, then
- create a TransparentContainer C, layout=FlowLayout (wrapping=false)
- add T1, T2 to C
- replace T by C in T's parent container, give C the same layout data that T had
Armin
Put the TextView elements inside a container with FlowLayout and wrapping=false.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
the best way of doing this is set the layout of rootelement container to "gridlayout" and set the "colspan" property to the no of max element u want in a row means in your case 2.
then create the UI controls and set the colspan property to 1 means UI will take space of one row .
Regards,
yashpal
hi,
set the layout property to "flow layout"
hope this helps,
regards,
arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.