Skip to content

Commit

Permalink
Updated CircularImageView to have gap between image and border (hdode…
Browse files Browse the repository at this point in the history
  • Loading branch information
Nastacia committed Dec 12, 2017
1 parent 73a3b16 commit 86d5943
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">

<stroke
android:width="2dp"
android:color="@color/colorPrimary" />

</shape>
15 changes: 6 additions & 9 deletions app/src/main/res/layout/view_circular_image_view.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
style="@style/CircularImageViewContainer"
android:layout_width="@dimen/width_circular_image_view_out_circle"
android:layout_height="@dimen/height_circular_image_view_out_circle">

<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/circularImageView"
style="@style/FloatingActionButton.Add"
android:layout_width="@dimen/width_circular_image_view_out_circle"
android:layout_height="@dimen/height_circular_image_view_out_circle"
android:src="@drawable/ic_splash"
app:civ_border_color="@color/colorPrimary"
app:civ_border_width="@dimen/margin_circular_image_view_inner_circle" />
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/ic_friend" />
</FrameLayout>
6 changes: 4 additions & 2 deletions app/src/main/res/values/uikit_styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@
<item name="android:src">@drawable/vec_add</item>
</style>

<style name="CircularImageView">
<item name="android:layout_margin">@dimen/space_large</item>
<style name="CircularImageViewContainer">
<item name="android:layout_margin">@dimen/space_regular</item>
<item name="android:padding">@dimen/space_small</item>
<item name="android:background">@drawable/circular_image_view_background_circle</item>
</style>

<style name="PrimaryToolbar">
Expand Down

0 comments on commit 86d5943

Please sign in to comment.