Skip to content

Instantly share code, notes, and snippets.

@eveliotc
Created July 22, 2013 02:52
Show Gist options
  • Save eveliotc/6051035 to your computer and use it in GitHub Desktop.
Save eveliotc/6051035 to your computer and use it in GitHub Desktop.
A sample of a bad way of doing rounded avatars
<?xml version="1.0" encoding="utf-8"?>
<!-- From post http://evel.io/2013/07/21/rounded-avatars-in-android/ -->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:foreground="@drawable/overlay"
android:foregroundGravity="center"
>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/avatar"
/>
</FrameLayout>
</FrameLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment