Thursday, March 6, 2014

Andrews two EditText be aligned on the same line, how to set the layout parameters?


Two EditText to be aligned on the same line, how to set the layout parameters?<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
It is aligned in the same row as long as it is as high as 2 edittext naturally aligned textsize the same value which is like a
Reply:
tableROw will automatically align, and other components, then you can use a relative layout, the same height, so the adjacent, and the distance from the upper end of the parent component has on it
Reply:
Aligned on a line instead of the default right?
Reply:
Using a linear layout, horizontal display, two controls each half
Reply:
The landlord needs no specific ah.
Reply:
Many properties can be aligned
The linear layout of the example 2 in the horizontal direction are set to Solo
edittextOr relative layout using android: layout_alignBottom is the point as well as other so that they are aligned
Reply:
Linear layout, equally aligned

android: orientation = "horizontal"
android: layout_width = "match_parent"
android: layout_height = "wrap_content"
>

android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: layout_weight = "1"
android: singleLine = "true"
android: textSize = "12dip"
android: gravity = "left | center_vertical"
android: layout_gravity = "left"
android: hint = "input box 1"
/>

android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: layout_weight = "1"
android: singleLine = "true"
android: textSize = "12dip"
android: gravity = "left | center_vertical"
android: layout_gravity = "right"
android: hint = "input box 2"
/>


Reply:
I have resolved, ELICPSE control is visual,
Several controls WIDTH width should be set to a specific value, such as 50dp
You can visualize any drag, otherwise, do any effort to no avail.

Reply:
reference to the 8th floor BCBPLC reply:
I have resolved, ELICPSE control is visual,
Several controls WIDTH width should be set to a specific value, such as 50dp
You can visualize any drag, otherwise, do any effort to no avail.

Graphical Layout There are limitations in the change directly in the xml more flexible. In fact, not have to be set to a specific width, there are many non-method can be achieved, and easier to fit different resolutions.
Reply:
reference to the 8th floor BCBPLC reply:
I have resolved, ELICPSE control is visual,
Several controls WIDTH width should be set to a specific value, such as 50dp
You can visualize any drag, otherwise, do any effort to no avail.

If you do not necessarily adapt to drag each resolution phone,
My advice is it in two EditText in a LinearLayout.
Reply:
reference to the 7th floor lulong1985 reply:
linear layout, equally aligned

android: orientation = "horizontal"
android: layout_width = "match_parent"
android: layout_height = "wrap_content"
>

android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: layout_weight = "1"
android: singleLine = "true"
android: textSize = "12dip"
android: gravity = "left | center_vertical"
android: layout_gravity = "left"
android: hint = "input box 1"
/>

android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: layout_weight = "1"
android: singleLine = "true"
android: textSize = "12dip"
android: gravity = "left | center_vertical"
android: layout_gravity = "right"
android: hint = "input box 2"
/>


This is good
Reply:
Tried it, paste in the past can be.
I just want to visualize, manual code really annoying.

No comments:

Post a Comment