Вывод ответа #1865359072

-

SL4A - Scripting Layer For Android

Программа для написания и запуска скриптов прямо н

{autor_name}


{text_rank}
репутация: {repa}
{registration_date}
сообщений: {posts}
{tel_link}
#{postnumber_id}

Мужики! Помогите сделать макет интерфейса (снимок на скрине). Там видно, что у меня проблемы с долбаными весами - не могу никак точно отвесить лайоутам нужный вес, так, чтобы кнопки вверху и внизу макета были одинаковыми!
Вот структура макета:

1<?xml version="1.0"
2encoding="utf-8"?>
3<LinearLayout
5    android:id="@+id/cloth"
6    android:layout_width="fill_parent"
7    android:layout_height="fill_parent"
8    android:orientation="vertical">
9 
10   <!-- Логотип HeaTPlaY -->
11 
12    <View
13        android:id="@+id/up_bar"
14        android:layout_width="fill_parent"
15        android:layout_height="fill_parent"
16        android:layout_weight="2"/>
17 
18    <!-- Background верхней панели кнопок -->
19 
20    <LinearLayout
21        android:orientation="horizontal"
22        android:layout_width="fill_parent"
23        android:layout_weight="0"
24        android:background="#cccccc">
25 
26        <!-- Кнопки верхней панели -->
27 
28        <LinearLayout
29            android:orientation="vertical"
30            android:layout_weight="1"
31            android:background="#000000"
32            android:layout_marginLeft="1dp"
33            android:layout_marginBottom="1dp"
34            android:layout_marginTop="1dp">
35 
36            <ImageButton
37                android:id="@+id/ic_menu_agenda"
38                android:gravity="center"/>
39 
40        </LinearLayout>
41 
42        <LinearLayout
43            android:orientation="vertical"
44            android:layout_weight="1"
45            android:background="#000000"
46            android:layout_marginLeft="1dp"
47            android:layout_marginBottom="1dp"
48            android:layout_marginTop="1dp">
49 
50            <ImageButton
51                android:id="@+id/ic_menu_rotate"
52                android:layout_gravity="center"/>
53 
54        </LinearLayout>
55 
56        <LinearLayout
57            android:orientation="vertical"
58            android:layout_weight="1"
59            android:background="#000000"
60            android:layout_marginLeft="1dp"
61            android:layout_marginBottom="1dp"
62            android:layout_marginTop="1dp">
63 
64            <ImageButton
65                android:id="@+id/ic_menu_recent_history"
66                android:layout_gravity="center"/>
67 
68        </LinearLayout>
69 
70        <LinearLayout
71            android:orientation="vertical"
72            android:layout_weight="1"
73            android:background="#000000"
74            android:layout_marginRight="1dp"
75            android:layout_marginLeft="1dp"
76            android:layout_marginBottom="1dp"
77            android:layout_marginTop="1dp">
78 
79            <ImageButton
80                android:id="@+id/ic_menu_search"
81                android:layout_gravity="center"/>
82 
83        </LinearLayout>
84 
85    </LinearLayout>
86 
87    <!-- ListView для списка медиа контента -->
88 
89    <ListView
90        android:id="@+id/music_list"
91        android:layout_width="fill_parent"
92        android:layout_height="fill_parent"
93        android:layout_weight="1"/>
94 
95    <!-- Background нижней панели кнопок -->
96 
97    <LinearLayout
98        android:layout_below="@id/body"
99        android:orientation="horizontal"
100        android:layout_width="fill_parent"
101        android:layout_weight="0"
102        android:background="#cccccc">
103 
104        <!-- Кнопки нижней панели -->
105 
106        <LinearLayout
107            android:orientation="vertical"
108            android:layout_weight="1"
109            android:background="#000000"
110            android:layout_marginLeft="1dp"
111            android:layout_marginBottom="1dp"
112            android:layout_marginTop="1dp">
113 
114            <ImageButton
115                android:id="@+id/ic_media_previous"
116                android:gravity="center"/>
117 
118        </LinearLayout>
119 
120        <LinearLayout
121            android:orientation="vertical"
122            android:layout_weight="1"
123            android:background="#000000"
124            android:layout_marginLeft="1dp"
125            android:layout_marginBottom="1dp"
126            android:layout_marginTop="1dp">
127 
128            <ImageButton
129                android:id="@+id/ic_media_rew"
130                android:layout_gravity="center"/>
131 
132        </LinearLayout>
133 
134        <LinearLayout
135            android:orientation="vertical"
136            android:layout_weight="1"
137            android:background="#000000"
138            android:layout_marginLeft="1dp"
139            android:layout_marginBottom="1dp"
140            android:layout_marginTop="1dp">
141 
142            <ImageButton
143                android:id="@+id/ic_media_play"
144                android:layout_gravity="center"/>
145 
146        </LinearLayout>
147 
148        <LinearLayout
149            android:orientation="vertical"
150            android:layout_weight="1"
151            android:background="#000000"
152            android:layout_marginRight="1dp"
153            android:layout_marginLeft="1dp"
154            android:layout_marginBottom="1dp"
155            android:layout_marginTop="1dp">
156 
157            <ImageButton
158                android:id="@+id/ic_media_ff"
159                android:layout_gravity="center"/>
160 
161        </LinearLayout>
162 
163        <LinearLayout
164            android:orientation="vertical"
165            android:layout_weight="1"
166            android:background="#000000"
167            android:layout_marginRight="1dp"
168            android:layout_marginLeft="1dp"
169            android:layout_marginBottom="1dp"
170            android:layout_marginTop="1dp">
171 
172            <ImageButton
173                android:id="@+id/ic_media_next"
174                android:layout_gravity="center"/>
175 
176        </LinearLayout>
177 
178    </LinearLayout>
179 
180</LinearLayout>

Если есть желание, можете предложить свой вариант.
Спасибо!

Дополнительный скрин #1 (606,04 Kb)


ответ опубликован:
Рейтинг: 5
голосов: 2



Яндекс.Метрика