0

私が達成したいのは次のようなものです:

H&M アンドロイド アプリ

問題は、一番下のレイアウトの丸ボタンをタップすると、製品の可能な色を含む Horizo​​ntalScrollView が表示されることです (これをダウンロードする必要があります)。私はこのようなことを試しました:

 <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。もう 1 つの質問は、Shape を拡張するクラスを作成せずに、写真のようにボタンを丸くすることはできますか?

4

1 に答える 1