Commit ec2307dd authored by Sajal Narang's avatar Sajal Narang

Implement CircleImageView for NavDrawer header and ProfileFragment, fix #67

parent 5dd6ad62
...@@ -23,14 +23,14 @@ android { ...@@ -23,14 +23,14 @@ android {
ext { ext {
supportLibVersion = '26.1.0' supportLibVersion = '26.1.0'
playServicesVersion = '11.8.0' playServicesVersion = '12.0.0'
butterKnifeVersion = '8.8.1' butterKnifeVersion = '8.8.1'
appAuthVersion = '0.2.0' appAuthVersion = '0.2.0'
retrofitVersion = '2.1.0' retrofitVersion = '2.1.0'
okhttpVersion = '3.4.1' okhttpVersion = '3.4.1'
picassoVersion = '2.5.0' picassoVersion = '2.5.0'
archRoomVersion = "1.1.0-alpha3" archRoomVersion = '1.1.0-beta1'
circleImageViewVersion = '2.2.0'
} }
dependencies { dependencies {
...@@ -57,9 +57,7 @@ dependencies { ...@@ -57,9 +57,7 @@ dependencies {
compile "com.android.support:customtabs:${supportLibVersion}" compile "com.android.support:customtabs:${supportLibVersion}"
compile "android.arch.persistence.room:runtime:${archRoomVersion}" compile "android.arch.persistence.room:runtime:${archRoomVersion}"
annotationProcessor "android.arch.persistence.room:compiler:${archRoomVersion}" annotationProcessor "android.arch.persistence.room:compiler:${archRoomVersion}"
implementation "com.android.support:cardview-v7:${supportLibVersion}" implementation "com.android.support:cardview-v7:${supportLibVersion}"
compile "de.hdodenhof:circleimageview:${circleImageViewVersion}"
} }
apply plugin: 'com.google.gms.google-services' apply plugin: 'com.google.gms.google-services'
...@@ -5,33 +5,43 @@ ...@@ -5,33 +5,43 @@
android:orientation="horizontal" android:orientation="horizontal"
tools:context="in.ac.iitb.gymkhana.iitbapp.fragment.ProfileFragment"> tools:context="in.ac.iitb.gymkhana.iitbapp.fragment.ProfileFragment">
<ImageView <de.hdodenhof.circleimageview.CircleImageView
android:layout_margin="32dp"
android:id="@+id/user_profile_picture_profile" android:id="@+id/user_profile_picture_profile"
android:layout_width="wrap_content" android:layout_width="160dp"
android:layout_height="wrap_content" /> android:layout_height="160dp" />
<LinearLayout <LinearLayout
android:layout_marginTop="32dp"
android:orientation="vertical" android:orientation="vertical"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<TextView <TextView
android:textSize="20sp"
android:layout_marginBottom="2dp"
android:id="@+id/user_name_profile" android:id="@+id/user_name_profile"
android:textStyle="bold" android:textStyle="bold"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
<TextView <TextView
android:textSize="16sp"
android:layout_marginBottom="2dp"
android:id="@+id/user_rollno_profile" android:id="@+id/user_rollno_profile"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
<TextView <TextView
android:textSize="16sp"
android:layout_marginBottom="2dp"
android:id="@+id/user_email_profile" android:id="@+id/user_email_profile"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
<TextView <TextView
android:textSize="16sp"
android:layout_marginBottom="2dp"
android:id="@+id/user_contact_no_profile" android:id="@+id/user_contact_no_profile"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
......
...@@ -12,10 +12,10 @@ ...@@ -12,10 +12,10 @@
android:paddingTop="@dimen/activity_vertical_margin" android:paddingTop="@dimen/activity_vertical_margin"
android:theme="@style/ThemeOverlay.AppCompat.Dark"> android:theme="@style/ThemeOverlay.AppCompat.Dark">
<ImageView <de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/user_profile_picture_nav_header" android:id="@+id/user_profile_picture_nav_header"
android:layout_width="wrap_content" android:layout_width="64dp"
android:layout_height="wrap_content" android:layout_height="64dp"
android:paddingTop="@dimen/nav_header_vertical_spacing" android:paddingTop="@dimen/nav_header_vertical_spacing"
app:srcCompat="@mipmap/ic_launcher_round" /> app:srcCompat="@mipmap/ic_launcher_round" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment