android - Horizontal ScrollView above a Button from LinearLayout -


what wish achieve this:

h&m android app

the thing is: after tap on circle button on bottom layout, appears horizontalscrollview possible colors of product (which have download). tried this:

 <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> 

those 2 imagebuttons testing, watch position on screen (eclipse).

this code not seem align horizontal scrollview above button @ all. ideas on how can achieve that?

ps. question be: can make buttons rounded, in pic, without creating a class extends shape?

you can't add rules placing children of relativelayout in regards of views not direct siblings of views. means horizontalscrollview can't placed relative button because button isn't placed direct child relativelayout holds horizontalscrollview.

at best place horizontalscrollview above lay_productdetailed_bottombar linearlayout but, said, not give positioning control relative button. approach popupwindow holding horizontalscrollview.

judging image want horizontalscrollview centered around center of button can't done in xml layout, can manually calculating dimensions.

can make buttons rounded, in pic, without creating class extends shape?

no, you'll need create yourself.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -