Skip to content

Commit

Permalink
IDE-122 image view change to new guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
rinaschedl committed Apr 7, 2023
1 parent c17bd87 commit 9861f3e
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 57 deletions.
30 changes: 0 additions & 30 deletions catroid/src/main/res/drawable/image_contour.xml

This file was deleted.

20 changes: 15 additions & 5 deletions catroid/src/main/res/layout/fragment_project_show_details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,24 @@
android:gravity="center_vertical"
android:orientation="horizontal">

<ImageView
android:id="@+id/image"
<com.google.android.material.card.MaterialCardView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="72dp"
android:layout_height="65dp"
android:layout_marginEnd="@dimen/img_margin"
android:background="@drawable/image_contour"
android:cropToPadding="true"
android:scaleType="centerCrop" />
app:cardCornerRadius="10dp"
app:strokeWidth="1dp"
app:strokeColor="@color/black"
app:cardElevation="10dp">

<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:cropToPadding="true"
android:scaleType="centerCrop"
/>
</com.google.android.material.card.MaterialCardView>

<TextView
android:id="@+id/name"
Expand Down
22 changes: 17 additions & 5 deletions catroid/src/main/res/layout/view_holder_background.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,26 @@
android:gravity="center_vertical"
android:orientation="horizontal">

<ImageView
android:id="@+id/image_view"
<com.google.android.material.card.MaterialCardView

xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="72dp"
android:layout_height="65dp"
android:layout_marginEnd="@dimen/img_margin"
android:background="@drawable/image_contour"
android:cropToPadding="true"
android:scaleType="centerCrop" />
app:cardCornerRadius="10dp"
app:strokeWidth="1dp"
app:strokeColor="@color/black"
app:cardElevation="10dp">


<ImageView
android:id="@+id/image_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:cropToPadding="true"
android:scaleType="centerCrop"
/>
</com.google.android.material.card.MaterialCardView>

<LinearLayout
android:layout_width="match_parent"
Expand Down
29 changes: 20 additions & 9 deletions catroid/src/main/res/layout/view_holder_sprite_group_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,26 @@
android:layout_gravity="center_vertical"
android:layout_marginEnd="@dimen/img_margin"/>

<ImageView
android:id="@+id/image_view"
android:layout_width="72dp"
android:layout_height="65dp"
android:layout_marginEnd="@dimen/img_margin"
android:background="@drawable/image_contour"
android:layout_weight="0"
android:cropToPadding="true"
android:scaleType="centerCrop" />
<com.google.android.material.card.MaterialCardView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="72dp"
android:layout_height="65dp"
android:layout_marginEnd="@dimen/img_margin"
app:cardCornerRadius="10dp"
app:strokeWidth="1dp"
app:strokeColor="@color/black"
app:cardElevation="10dp">

<ImageView
android:id="@+id/image_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0"
android:cropToPadding="true"
android:scaleType="centerCrop"
/>
</com.google.android.material.card.MaterialCardView>


<LinearLayout
android:layout_width="match_parent"
Expand Down
24 changes: 17 additions & 7 deletions catroid/src/main/res/layout/view_holder_with_checkbox.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,27 @@
android:layout_marginEnd="@dimen/img_margin"
android:visibility="gone"/>

<ImageView
android:id="@+id/image_view"
<com.google.android.material.card.MaterialCardView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="72dp"
android:layout_height="65dp"
android:layout_weight="0"
android:layout_marginEnd="@dimen/img_margin"
android:background="@drawable/image_contour"
android:cropToPadding="true"
android:scaleType="centerCrop" />
app:cardCornerRadius="10dp"
app:strokeWidth="1dp"
app:strokeColor="@color/black"
app:cardElevation="10dp">

<ImageView
android:id="@+id/image_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0"
android:cropToPadding="true"
android:scaleType="centerCrop"
/>
</com.google.android.material.card.MaterialCardView>

<LinearLayout
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_weight="1"
Expand Down
1 change: 0 additions & 1 deletion catroid/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
<!-- Accent Colors -->
<color name="accent">#A8DFF4</color>
<color name="brick_field_highlight">#33B5E5</color>
<color name="image_view_border">@color/accent</color>
<color name="snackbar">#FF33B5E5</color>
<color name="separator">#51656C</color>
<color name="action_button">#ffab08</color>
Expand Down

0 comments on commit 9861f3e

Please sign in to comment.