fix scaling for customizations

This commit is contained in:
Phillip Thelen 2016-01-20 15:31:34 +01:00
parent d607f38742
commit 5dbdd212ac
3 changed files with 5 additions and 2 deletions

View file

@ -27,7 +27,7 @@
android:layout_width="@dimen/avatar_width"
android:layout_height="@dimen/avatar_height"
android:layout_gravity="center_horizontal"
android:scaleType="centerInside"
android:scaleType="fitCenter"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:layout_centerVertical="true"

View file

@ -52,4 +52,7 @@
<dimen name="task_top_bottom_padding">20dp</dimen>
<dimen name="reward_spacing">8dp</dimen>
<dimen name="grid_item_margin">6dp</dimen>
<dimen name="avatar_small_width">114dp</dimen>
<dimen name="avatar_small_height">90dp</dimen>
<dimen name="customization_width">100dp</dimen>
</resources>

View file

@ -111,7 +111,7 @@ public class AvatarCustomizationFragment extends BaseFragment {
if (this.type.equals("background")) {
itemWidth = getContext().getResources().getDimension(R.dimen.avatar_width);
} else {
itemWidth = 100;
itemWidth = getContext().getResources().getDimension(R.dimen.customization_width);
}
int spanCount = (int) (width / itemWidth);