То, что я хочу достичь, это что-то вроде этого:Горизонтального ScrollView над кнопкой из LinearLayout
Вещи: после того, как я нажимаю на кнопке круга на нижнем макете, он появляется HorizontalScrollView с возможные цвета продукта (который мне придется загрузить). я пытался что-то вроде этого:
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" >
<LinearLayout
android:id="@+id/lay_productdetailed_bottombar"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/transparent"
android:gravity="center_vertical"
android:orientation="horizontal" >
<Button
android:id="@+id/btn_productdetailed_fullscreen"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Full" />
<Button
android:id="@+id/btn_productdetailed_colors"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Colors" />
<Button
android:id="@+id/btn_productdetailed_sizes"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Sizes" />
<Button
android:id="@+id/btn_productdetailed_buy"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Buy" />
</LinearLayout>
<HorizontalScrollView
android:id="@+id/hscroll_productdetailed_colors"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/btn_productdetailed_colors" >
<LinearLayout
android:id="@+id/lay_productdetailed_colors"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="2dp" >
<ImageButton
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_gravity="center_vertical" />
<ImageButton
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_gravity="center_vertical" />
</LinearLayout>
</HorizontalScrollView>
</RelativeLayout>
эти 2 ImageButtons являются только для тестирования, чтобы посмотреть их положение на экране (Eclipse).
Этот код, похоже, не выравнивает горизонтальное прокручивание над кнопкой. Любые идеи о том, как я могу это достичь?
PS. Другой вопрос: могу ли я сделать эти кнопки округлыми, как на рис., Без создания класса, который расширяет форму?