Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <View
- android:id="@+id/my_view"
- android:elevation="4dp"
- android:layout_width="100dp"
- android:layout_height="100dp"
- android:layout_gravity="center"
- android:background="@android:color/white"/>
- View view = findViewById(R.id.my_view);
- view.setClipToOutline(true);
- view.setOutlineProvider(new ViewOutlineProvider() {
- @Override
- public void getOutline(View view, Outline outline) {
- outline.setOval(0, 0, 200, 200);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement