android - Image in LinearLayout not resizing well -
i have page called 'simpleresultpage'. in page display detail view different kind of items have in app.
at start of activity determine kind of items should display , based on hide/show viewstub's
currently try display image in betweent 2 textfields , code:
<textview android:id="@+id/simple_result_text_title_1" style="@style/style_simple_result_title"/> <viewstub android:id="@+id/image1_viewstub" android:inflatedid="@+id/image1_inflated_viewstub1" style="@style/style_simple_result_image" android:layout="@layout/simple_list_image"/> <textview android:id="@+id/simple_result_text_text_1" style="@style/style_simple_result_text"/> the style image this:
<style name="style_simple_result_image"> <item name="android:layout_height">wrap_content</item> <item name="android:layout_width">fill_parent</item> <item name="android:adjustviewbounds">true</item> <item name="android:scaletype">center</item> <item name="android:layout_gravity">center_horizontal</item> <item name="android:layout_margintop">10dp</item> <item name="android:layout_marginleft">20dp</item> <item name="android:layout_marginright">20dp</item> <item name="android:layout_marginbottom">20dp</item> </style> but somehow image small , isn't showing way want (fill complete width , leave 20dp margin on both sides).
this ik looks right now: 
how should adjust code make way want it?
does changing line
<item name="android:scaletype">center</item> to
<item name="android:scaletype">center_inside</item> make difference?
Comments
Post a Comment