layout - Image button not wrapping content android -
layout - Image button not wrapping content android -
in below image, have 3 imagebuttions aligned in horizontal scroll view. each of these buttons sourcing image, , should taking finish size of image. however, facebook button isn't. ive triple checked - 3 buttons same size, , 3 set wrap_content (see code below)
can see going on , how prepare it?
<horizontalscrollview android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/horizontalscrollview2" android:layout_weight="0.2" android:layout_gravity="center_horizontal"> <relativelayout android:orientation="horizontal" android:layout_width="120dp" android:layout_height="90dp"> <imagebutton android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/facebook" android:layout_gravity="center_horizontal" android:clickable="true" android:src="@drawable/facebookbutton" android:background="@null" android:padding="5dp"/> <imagebutton android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_torightof="@+id/facebook" android:id="@+id/twitter" android:layout_gravity="center_horizontal" android:clickable="true" android:src="@drawable/twitterbutton" android:background="@null" android:padding="5dp"/> <imagebutton android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_torightof="@+id/twitter" android:id="@+id/contact" android:clickable="true" android:src="@drawable/contactbutton" android:background="@null" android:padding="5dp"/> </relativelayout> </horizontalscrollview> android layout
Comments
Post a Comment