Skip to content

Instantly share code, notes, and snippets.

@r4hulp
Last active August 29, 2015 14:27
Show Gist options
  • Save r4hulp/90f26504c8d5350f5945 to your computer and use it in GitHub Desktop.
Save r4hulp/90f26504c8d5350f5945 to your computer and use it in GitHub Desktop.
Sample Profile Layout
<!-- Don't forget to add custom namespace in first xml element, otherwise get ready for exceptions and errors -->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:custom="http://schemas.android.com/apk/res-auto"
android:minWidth="25px"
android:minHeight="25px"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:id="@+id/parentLayout">
<!-- REPLACE Standard ImageView -->
<!--<ImageView
android:src="@drawable/icn_profile_pic"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minWidth="150dp"
android:minHeight="150dp"
android:maxWidth="160dp"
android:maxHeight="160dp"
android:id="@+id/imgProfileUserImage" />-->
<!-- WITH THIS CUSTOM ImageView -->
<WrapCode.Util.CircleImageView
android:layout_width="135dp"
android:layout_height="135dp"
android:id="@+id/imgProfilePicture"
android:src="@drawable/icn_profile_picture"
custom:border="true"
custom:border_color="#eeeeee"
custom:border_width="4dp"
custom:shadow="true" />
</RelativeLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment