Skip to content

Commit

Permalink
Update MainActivity.java
Browse files Browse the repository at this point in the history
  • Loading branch information
aos3618 authored Jul 26, 2017
1 parent 36ba490 commit 647d9a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Shadow/app/src/main/java/com/aos/shadow/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.aos.shadowlib.drawable.ShadowDrawable;
import com.aos.shadowlib.utils.DensityUtil;


public class MainActivity extends AppCompatActivity {

@Override
Expand All @@ -25,7 +26,7 @@ private void initViews() {
shadowDrawable.setColor(ContextCompat.getColor(this, R.color.my_blur)) //shadowcolor
.setOffsetY(DensityUtil.dip2px(this, 5)) //阴影下偏移--offset of the shadow
.setRadius(DensityUtil.dip2px(this, 8)) //四角半径--concern of the rectangle
.setSoftline(DensityUtil.dip2px(this, 8)) //四周阴影半径-- the shadow of each edge of the rectangle
.setEdgeShadowWidth(DensityUtil.dip2px(this, 8)) //四周阴影半径-- the shadow of each edge of the rectangle
.setFilterColor(0x56ffffff) //中间值,越大阴影越接近设置的值-- the slot to said how close to the shadowcolor
.setTopMargin(DensityUtil.dip2px(this, 3)) //上间距--top margin
.setParentHeight(DensityUtil.dip2px(this, 200)) //设置要依附的View的高度 -- the height of parent view
Expand Down

0 comments on commit 647d9a4

Please sign in to comment.