|
Разметка GridLayout ?
|
|||
---|---|---|---|
#18+
Суть такая: надо разместить в одну строку EditText и Button. Кнопка фиксированной ширины, выравнивание к правому краю. А вот полее ввода должно растягиваться в ширину до заполнения свободного пространства. Как только я ставлю для поля ввода Width = MATCH_PARENT оно растягивается на всю ширину экрана и вытесняет кнопку за видимую область. Как можно решить? ... |
|||
:
Нравится:
Не нравится:
|
|||
27.09.2013, 01:42 |
|
Разметка GridLayout ?
|
|||
---|---|---|---|
#18+
а разве там не android:layout_gravity="fill_horizontal" ... |
|||
:
Нравится:
Не нравится:
|
|||
27.09.2013, 01:54 |
|
Разметка GridLayout ?
|
|||
---|---|---|---|
#18+
Когда ставлю android:layout_gravity="fill_horizontal" , ширина поля ввода не изменяется. Ширина колонок остаётся как на скрине. Даже если кнопку сдвинуть к правому краю. ... |
|||
:
Нравится:
Не нравится:
|
|||
27.09.2013, 02:03 |
|
Разметка GridLayout ?
|
|||
---|---|---|---|
#18+
http://developer.android.com/reference/android/widget/GridLayout.html авторLimitations GridLayout does not provide support for the principle of weight, as defined in weight. In general, it is not therefore possible to configure a GridLayout to distribute excess space between multiple components. Some common use-cases may nevertheless be accommodated as follows. To place equal amounts of space around a component in a cell group; use CENTER alignment (or gravity). For complete control over excess space distribution in a row or column; use a LinearLayout subview to hold the components in the associated cell group. When using either of these techniques, bear in mind that cell groups may be defined to overlap. и почему именно gridlayout ? может можно обойтись и с relativelayout ? ... |
|||
:
Нравится:
Не нравится:
|
|||
27.09.2013, 02:17 |
|
|
start [/forum/topic.php?fid=13&fpage=28&tid=1331748]: |
0ms |
get settings: |
11ms |
get forum list: |
13ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
30ms |
get topic data: |
11ms |
get forum data: |
2ms |
get page messages: |
42ms |
get tp. blocked users: |
2ms |
others: | 250ms |
total: | 369ms |
0 / 0 |