Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphetS committed Dec 29, 2016
2 parents 2cd0c1b + 553c9a1 commit 7f54855
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,47 @@

## ScreenShot
![image](https://github.com/RaphetS/RoundImageView/blob/master/sample/src/main/res/drawable-xhdpi/screenshot.png)

## Gradle

```
dependencies {
compile 'org.raphets:roundimageview:1.1.0'
}
```

## Usage

Define in xml:

```
<org.raphets.roundimageview.RoundImageView
android:layout_width="180dp"
android:layout_height="180dp"
android:src="@drawable/a"
app:border_width="3dp"
app:border_color="@android:color/holo_red_dark"
app:leftBottom_corner_radius="0dp"
app:leftTop_corner_radius="30dp"
app:rightBottom_corner_radius="30dp"
app:rightTop_corner_radius="0dp"
app:type="round" />
```

Or in code:

```
RoundImageView iv1= (RoundImageView) findViewById(R.id.iv1);
iv1.setBorderWidth(3)
.setBorderColor(Color.RED)
.setType(RoundImageView.TYPE_ROUND)
.setLeftTopCornerRadius(0)
.setRightTopCornerRadius(10)
.setRightBottomCornerRadius(30)
.setLeftBottomCornerRadius(50);
Picasso.with(this)
.load("http://ww2.sinaimg.cn/large/610dc034jw1fa42ktmjh4j20u011hn8g.jpg")
.into(iv1);
```

0 comments on commit 7f54855

Please sign in to comment.