Browse Source

Crop center the image in account info

Because we need to correctly crop and center the image we can no longer support snapping of toolbar in appbar. Since AppBarLayout is a subclass of LinearLayout and doesn't look deeper into subview hierachy for snapping children, thus it is better not to support it.

Also instead of using ScrollView and pad it with some weird magic numbers, use NestedScrollView class which is made to cooperate with AppBarLayout.
Bartosz Przybylski 7 years ago
parent
commit
a3db144ecc

+ 7 - 14
src/main/java/com/owncloud/android/ui/activity/UserInfoActivity.java

@@ -48,6 +48,7 @@ import android.view.Menu;
 import android.view.MenuInflater;
 import android.view.MenuItem;
 import android.view.View;
+import android.view.ViewGroup;
 import android.webkit.URLUtil;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
@@ -277,9 +278,11 @@ public class UserInfoActivity extends FileActivity {
 
     private void setHeaderImage() {
         if (getStorageManager().getCapability(account.name).getServerBackground() != null) {
-            final AppBarLayout appBar = findViewById(R.id.appbar);
+            ViewGroup appBar = findViewById(R.id.appbar);
 
             if (appBar != null) {
+                ImageView backgroundImageView = appBar.findViewById(R.id.drawer_header_background);
+
                 String background = getStorageManager().getCapability(account.name).getServerBackground();
                 int primaryColor = ThemeUtils.primaryColor(getAccount());
 
@@ -290,12 +293,7 @@ public class UserInfoActivity extends FileActivity {
                         public void onResourceReady(Drawable resource, GlideAnimation glideAnimation) {
                             Drawable[] drawables = {new ColorDrawable(primaryColor), resource};
                             LayerDrawable layerDrawable = new LayerDrawable(drawables);
-                            
-                            if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
-                                appBar.setBackgroundDrawable(layerDrawable);
-                            } else {
-                                appBar.setBackground(layerDrawable);
-                            }
+                            backgroundImageView.setImageDrawable(layerDrawable);
                         }
 
                         @Override
@@ -303,12 +301,7 @@ public class UserInfoActivity extends FileActivity {
                             Drawable[] drawables = {new ColorDrawable(primaryColor),
                                     getResources().getDrawable(R.drawable.background)};
                             LayerDrawable layerDrawable = new LayerDrawable(drawables);
-
-                            if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
-                                appBar.setBackgroundDrawable(layerDrawable);
-                            } else {
-                                appBar.setBackground(layerDrawable);
-                            }
+                            backgroundImageView.setImageDrawable(layerDrawable);
                         }
                     };
 
@@ -321,7 +314,7 @@ public class UserInfoActivity extends FileActivity {
                             .into(target);
                 } else {
                     // plain color
-                    appBar.setBackgroundColor(ThemeUtils.primaryColor(account));
+                    backgroundImageView.setImageDrawable(new ColorDrawable(primaryColor));
                 }
             }
         }

+ 1 - 1
src/main/res/layout/drawer_header.xml

@@ -135,4 +135,4 @@
 
     </RelativeLayout>
 
-</FrameLayout>
+</FrameLayout>

+ 79 - 70
src/main/res/layout/toolbar_user_information.xml

@@ -24,88 +24,97 @@
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="@dimen/nav_drawer_header_height"
-    android:background="@drawable/background"
     android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
 
-    <android.support.v7.widget.Toolbar
-        android:id="@id/toolbar"
+    <RelativeLayout
         android:layout_width="match_parent"
-        android:layout_height="?attr/actionBarSize"
-        app:layout_scrollFlags="scroll|enterAlways|snap"
-        app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/>
+        android:layout_height="match_parent">
 
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:orientation="vertical"
-        android:gravity="bottom">
+        <ImageView
+            android:id="@+id/drawer_header_background"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:scaleType="centerCrop"/>
+
+        <android.support.v7.widget.Toolbar
+            android:id="@id/toolbar"
+            android:layout_width="match_parent"
+            android:layout_height="?attr/actionBarSize"
+            app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/>
 
-        <RelativeLayout
+        <LinearLayout
             android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginBottom="12dp"
-            android:layout_marginStart="12dp"
-            android:layout_marginLeft="12dp"
-            android:layout_marginRight="@dimen/standard_half_margin"
-            android:layout_marginEnd="@dimen/standard_half_margin"
+            android:layout_height="match_parent"
             android:gravity="bottom"
-            android:orientation="horizontal"
-            android:weightSum="1">
-
-            <FrameLayout
-                android:id="@+id/avatar_container"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content">
-
-                <ImageView
-                    android:id="@+id/user_icon"
-                    android:layout_width="@dimen/nav_drawer_header_avatar"
-                    android:layout_height="@dimen/nav_drawer_header_avatar"
-                    android:src="@drawable/ic_account_circle"
-                    android:contentDescription="@string/avatar"/>
-            </FrameLayout>
-
-            <LinearLayout
+            android:orientation="vertical">
+
+            <RelativeLayout
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:layout_centerInParent="true"
-                android:layout_marginLeft="@dimen/standard_half_margin"
+                android:layout_marginBottom="12dp"
+                android:layout_marginEnd="@dimen/standard_half_margin"
+                android:layout_marginLeft="12dp"
                 android:layout_marginRight="@dimen/standard_half_margin"
-                android:layout_toEndOf="@id/avatar_container"
-                android:layout_toRightOf="@id/avatar_container"
-                android:orientation="vertical">
+                android:layout_marginStart="12dp"
+                android:gravity="bottom"
+                android:orientation="horizontal"
+                android:weightSum="1">
 
-                <TextView
-                    android:id="@+id/userinfo_username_full"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:ellipsize="end"
-                    android:maxLines="1"
-                    android:shadowColor="@color/black"
-                    android:shadowDx="0.5"
-                    android:shadowDy="0"
-                    android:shadowRadius="2"
-                    android:textColor="@android:color/white"
-                    android:textSize="@dimen/drawer_header_text"
-                    android:textStyle="bold"/>
-
-                <TextView
-                    android:id="@+id/userinfo_username"
+                <FrameLayout
+                    android:id="@+id/avatar_container"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content">
+
+                    <ImageView
+                        android:id="@+id/user_icon"
+                        android:layout_width="@dimen/nav_drawer_header_avatar"
+                        android:layout_height="@dimen/nav_drawer_header_avatar"
+                        android:contentDescription="@string/avatar"
+                        android:src="@drawable/ic_account_circle"/>
+                </FrameLayout>
+
+                <LinearLayout
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:ellipsize="end"
-                    android:lines="1"
-                    android:maxLines="1"
-                    android:shadowColor="@color/black"
-                    android:shadowDx="0.5"
-                    android:shadowDy="0"
-                    android:shadowRadius="2"
-                    android:textColor="@android:color/white"
-                    android:textSize="@dimen/drawer_header_subtext"/>
-            </LinearLayout>
-
-        </RelativeLayout>
-
-    </LinearLayout>
+                    android:layout_centerInParent="true"
+                    android:layout_marginLeft="@dimen/standard_half_margin"
+                    android:layout_marginRight="@dimen/standard_half_margin"
+                    android:layout_toEndOf="@id/avatar_container"
+                    android:layout_toRightOf="@id/avatar_container"
+                    android:orientation="vertical">
+
+                    <TextView
+                        android:id="@+id/userinfo_username_full"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:ellipsize="end"
+                        android:maxLines="1"
+                        android:shadowColor="@color/black"
+                        android:shadowDx="0.5"
+                        android:shadowDy="0"
+                        android:shadowRadius="2"
+                        android:textColor="@android:color/white"
+                        android:textSize="@dimen/drawer_header_text"
+                        android:textStyle="bold"/>
+
+                    <TextView
+                        android:id="@+id/userinfo_username"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:ellipsize="end"
+                        android:lines="1"
+                        android:maxLines="1"
+                        android:shadowColor="@color/black"
+                        android:shadowDx="0.5"
+                        android:shadowDy="0"
+                        android:shadowRadius="2"
+                        android:textColor="@android:color/white"
+                        android:textSize="@dimen/drawer_header_subtext"/>
+                </LinearLayout>
+
+            </RelativeLayout>
+
+        </LinearLayout>
+    </RelativeLayout>
 
 </android.support.design.widget.AppBarLayout>

+ 209 - 215
src/main/res/layout/user_info_layout.xml

@@ -20,6 +20,7 @@
 -->
 <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
                                                  xmlns:card_view="http://schemas.android.com/apk/res-auto"
+                                                 xmlns:app="http://schemas.android.com/apk/res-auto"
                                                  android:layout_width="match_parent"
                                                  android:layout_height="match_parent">
 
@@ -28,236 +29,229 @@
 
     <include layout="@layout/empty_list"/>
 
-    <RelativeLayout
-        android:id="@+id/multi_view"
+    <android.support.v4.widget.NestedScrollView
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:paddingTop="@dimen/nav_drawer_header_height">
+        android:layout_alignParentLeft="true"
+        android:layout_alignParentStart="true"
+        android:layout_alignParentTop="true"
+        app:layout_behavior="@string/appbar_scrolling_view_behavior">
 
-        <ScrollView
+        <LinearLayout
+            android:id="@+id/user_info_view"
             android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:layout_alignParentTop="true"
-            android:layout_alignParentLeft="true"
-            android:layout_alignParentStart="true">
+            android:layout_height="wrap_content"
+            android:orientation="vertical"
+            android:visibility="gone">
 
-            <LinearLayout
-                android:id="@+id/user_info_view"
+            <android.support.v7.widget.CardView
+                android:id="@+id/primary_user_info_view"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:orientation="vertical"
-                android:visibility="gone">
+                android:layout_gravity="center"
+                android:layout_margin="@dimen/standard_half_margin"
+                card_view:cardCornerRadius="3dp"
+                card_view:cardUseCompatPadding="true">
 
-                <android.support.v7.widget.CardView
-                    android:id="@+id/primary_user_info_view"
+                <LinearLayout
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_gravity="center"
-                    android:layout_margin="@dimen/standard_half_margin"
-                    card_view:cardCornerRadius="3dp"
-                    card_view:cardUseCompatPadding="true">
+                    android:orientation="vertical">
 
-                    <LinearLayout
+                    <RelativeLayout
+                        android:id="@+id/phone_container"
                         android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:orientation="vertical">
+                        android:layout_height="wrap_content">
+
+                        <ImageView
+                            android:id="@+id/phone_icon"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginBottom="@dimen/standard_margin"
+                            android:layout_marginLeft="@dimen/standard_icon_list_horizontal_margin"
+                            android:layout_marginRight="@dimen/standard_icon_list_horizontal_margin"
+                            android:layout_marginTop="@dimen/standard_margin"
+                            android:contentDescription="@string/user_info_phone"
+                            android:src="@drawable/ic_phone"/>
+
+                        <TextView
+                            android:id="@+id/phone_number"
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+                            android:layout_centerInParent="true"
+                            android:layout_marginBottom="@dimen/standard_margin"
+                            android:layout_marginEnd="@dimen/standard_padding"
+                            android:layout_marginRight="@dimen/standard_padding"
+                            android:layout_marginTop="@dimen/standard_margin"
+                            android:layout_toEndOf="@id/phone_icon"
+                            android:layout_toRightOf="@id/phone_icon"
+                            android:maxLines="3"
+                            android:text="@string/placeholder_filename"
+                            android:textAppearance="?android:attr/textAppearanceListItem"/>
+
+                    </RelativeLayout>
+
+                    <RelativeLayout
+                        android:id="@+id/email_container"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content">
 
-                        <RelativeLayout
-                            android:id="@+id/phone_container"
+                        <View
+                            android:layout_width="match_parent"
+                            android:layout_height="1dp"
+                            android:background="@color/list_divider_background"/>
+
+                        <ImageView
+                            android:id="@+id/email_icon"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginBottom="@dimen/standard_margin"
+                            android:layout_marginLeft="@dimen/standard_icon_list_horizontal_margin"
+                            android:layout_marginRight="@dimen/standard_icon_list_horizontal_margin"
+                            android:layout_marginTop="@dimen/standard_margin"
+                            android:contentDescription="@string/user_info_email"
+                            android:src="@drawable/ic_email"/>
+
+                        <TextView
+                            android:id="@+id/email_address"
                             android:layout_width="match_parent"
-                            android:layout_height="wrap_content">
-
-                            <ImageView
-                                android:id="@+id/phone_icon"
-                                android:layout_width="wrap_content"
-                                android:layout_height="wrap_content"
-                                android:layout_marginBottom="@dimen/standard_margin"
-                                android:layout_marginLeft="@dimen/standard_icon_list_horizontal_margin"
-                                android:layout_marginRight="@dimen/standard_icon_list_horizontal_margin"
-                                android:layout_marginTop="@dimen/standard_margin"
-                                android:src="@drawable/ic_phone"
-                                android:contentDescription="@string/user_info_phone"/>
-
-                            <TextView
-                                android:id="@+id/phone_number"
-                                android:layout_width="match_parent"
-                                android:layout_height="wrap_content"
-                                android:layout_centerInParent="true"
-                                android:layout_marginRight="@dimen/standard_padding"
-                                android:layout_marginEnd="@dimen/standard_padding"
-                                android:layout_marginBottom="@dimen/standard_margin"
-                                android:layout_marginTop="@dimen/standard_margin"
-                                android:layout_toEndOf="@id/phone_icon"
-                                android:layout_toRightOf="@id/phone_icon"
-                                android:maxLines="3"
-                                android:text="@string/placeholder_filename"
-                                android:textAppearance="?android:attr/textAppearanceListItem"/>
-
-                        </RelativeLayout>
-
-                        <RelativeLayout
-                            android:id="@+id/email_container"
+                            android:layout_height="wrap_content"
+                            android:layout_centerInParent="true"
+                            android:layout_marginBottom="@dimen/standard_margin"
+                            android:layout_marginEnd="@dimen/standard_padding"
+                            android:layout_marginRight="@dimen/standard_padding"
+                            android:layout_marginTop="@dimen/standard_margin"
+                            android:layout_toEndOf="@id/email_icon"
+                            android:layout_toRightOf="@id/email_icon"
+                            android:maxLines="3"
+                            android:text="@string/placeholder_filename"
+                            android:textAppearance="?android:attr/textAppearanceListItem"/>
+
+                    </RelativeLayout>
+
+                    <RelativeLayout
+                        android:id="@+id/address_container"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content">
+
+                        <View
+                            android:layout_width="match_parent"
+                            android:layout_height="1dp"
+                            android:background="@color/list_divider_background"/>
+
+                        <ImageView
+                            android:id="@+id/address_icon"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginBottom="@dimen/standard_margin"
+                            android:layout_marginLeft="@dimen/standard_icon_list_horizontal_margin"
+                            android:layout_marginRight="@dimen/standard_icon_list_horizontal_margin"
+                            android:layout_marginTop="@dimen/standard_margin"
+                            android:contentDescription="@string/user_info_address"
+                            android:src="@drawable/ic_map_marker"/>
+
+                        <TextView
+                            android:id="@+id/address"
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+                            android:layout_centerInParent="true"
+                            android:layout_marginBottom="@dimen/standard_margin"
+                            android:layout_marginEnd="@dimen/standard_padding"
+                            android:layout_marginRight="@dimen/standard_padding"
+                            android:layout_marginTop="@dimen/standard_margin"
+                            android:layout_toEndOf="@+id/address_icon"
+                            android:layout_toRightOf="@+id/address_icon"
+                            android:maxLines="3"
+                            android:text="@string/placeholder_filename"
+                            android:textAppearance="?android:attr/textAppearanceListItem"/>
+
+                    </RelativeLayout>
+
+                    <RelativeLayout
+                        android:id="@+id/website_container"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content">
+
+                        <View
                             android:layout_width="match_parent"
-                            android:layout_height="wrap_content">
-
-                            <View
-                                android:layout_width="match_parent"
-                                android:layout_height="1dp"
-                                android:background="@color/list_divider_background"/>
-
-                            <ImageView
-                                android:id="@+id/email_icon"
-                                android:layout_width="wrap_content"
-                                android:layout_height="wrap_content"
-                                android:layout_marginBottom="@dimen/standard_margin"
-                                android:layout_marginLeft="@dimen/standard_icon_list_horizontal_margin"
-                                android:layout_marginRight="@dimen/standard_icon_list_horizontal_margin"
-                                android:layout_marginTop="@dimen/standard_margin"
-                                android:src="@drawable/ic_email"
-                                android:contentDescription="@string/user_info_email"/>
-
-                            <TextView
-                                android:id="@+id/email_address"
-                                android:layout_width="match_parent"
-                                android:layout_height="wrap_content"
-                                android:layout_centerInParent="true"
-                                android:layout_marginRight="@dimen/standard_padding"
-                                android:layout_marginEnd="@dimen/standard_padding"
-                                android:layout_marginBottom="@dimen/standard_margin"
-                                android:layout_marginTop="@dimen/standard_margin"
-                                android:layout_toEndOf="@id/email_icon"
-                                android:layout_toRightOf="@id/email_icon"
-                                android:maxLines="3"
-                                android:text="@string/placeholder_filename"
-                                android:textAppearance="?android:attr/textAppearanceListItem"/>
-
-                        </RelativeLayout>
-
-                        <RelativeLayout
-                            android:id="@+id/address_container"
+                            android:layout_height="1dp"
+                            android:background="@color/list_divider_background"/>
+
+                        <ImageView
+                            android:id="@+id/website_icon"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginBottom="@dimen/standard_margin"
+                            android:layout_marginLeft="@dimen/standard_icon_list_horizontal_margin"
+                            android:layout_marginRight="@dimen/standard_icon_list_horizontal_margin"
+                            android:layout_marginTop="@dimen/standard_margin"
+                            android:contentDescription="@string/user_info_website"
+                            android:src="@drawable/ic_web"/>
+
+                        <TextView
+                            android:id="@+id/website_address"
                             android:layout_width="match_parent"
-                            android:layout_height="wrap_content">
-
-                            <View
-                                android:layout_width="match_parent"
-                                android:layout_height="1dp"
-                                android:background="@color/list_divider_background"/>
-
-                            <ImageView
-                                android:id="@+id/address_icon"
-                                android:layout_width="wrap_content"
-                                android:layout_height="wrap_content"
-                                android:layout_marginBottom="@dimen/standard_margin"
-                                android:layout_marginLeft="@dimen/standard_icon_list_horizontal_margin"
-                                android:layout_marginRight="@dimen/standard_icon_list_horizontal_margin"
-                                android:layout_marginTop="@dimen/standard_margin"
-                                android:src="@drawable/ic_map_marker"
-                                android:contentDescription="@string/user_info_address"/>
-
-                            <TextView
-                                android:id="@+id/address"
-                                android:layout_width="match_parent"
-                                android:layout_height="wrap_content"
-                                android:layout_centerInParent="true"
-                                android:layout_marginRight="@dimen/standard_padding"
-                                android:layout_marginEnd="@dimen/standard_padding"
-                                android:layout_marginBottom="@dimen/standard_margin"
-                                android:layout_marginTop="@dimen/standard_margin"
-                                android:maxLines="3"
-                                android:text="@string/placeholder_filename"
-                                android:textAppearance="?android:attr/textAppearanceListItem"
-                                android:layout_toRightOf="@+id/address_icon"
-                                android:layout_toEndOf="@+id/address_icon"/>
-
-                        </RelativeLayout>
-
-                        <RelativeLayout
-                            android:id="@+id/website_container"
+                            android:layout_height="wrap_content"
+                            android:layout_centerInParent="true"
+                            android:layout_marginBottom="@dimen/standard_margin"
+                            android:layout_marginEnd="@dimen/standard_padding"
+                            android:layout_marginRight="@dimen/standard_padding"
+                            android:layout_marginTop="@dimen/standard_margin"
+                            android:layout_toEndOf="@id/website_icon"
+                            android:layout_toRightOf="@id/website_icon"
+                            android:maxLines="3"
+                            android:text="@string/placeholder_filename"
+                            android:textAppearance="?android:attr/textAppearanceListItem"
+                            android:textColor="?android:attr/textColorSecondary"/>
+
+                    </RelativeLayout>
+
+                    <RelativeLayout
+                        android:id="@+id/twitter_container"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content">
+
+                        <View
                             android:layout_width="match_parent"
-                            android:layout_height="wrap_content">
-
-                            <View
-                                android:layout_width="match_parent"
-                                android:layout_height="1dp"
-                                android:background="@color/list_divider_background"/>
-
-                            <ImageView
-                                android:id="@+id/website_icon"
-                                android:layout_width="wrap_content"
-                                android:layout_height="wrap_content"
-                                android:src="@drawable/ic_web"
-                                android:layout_marginBottom="@dimen/standard_margin"
-                                android:layout_marginLeft="@dimen/standard_icon_list_horizontal_margin"
-                                android:layout_marginRight="@dimen/standard_icon_list_horizontal_margin"
-                                android:layout_marginTop="@dimen/standard_margin"
-                                android:contentDescription="@string/user_info_website"/>
-
-                            <TextView
-                                android:id="@+id/website_address"
-                                android:layout_width="match_parent"
-                                android:layout_height="wrap_content"
-                                android:layout_centerInParent="true"
-                                android:layout_marginRight="@dimen/standard_padding"
-                                android:layout_marginEnd="@dimen/standard_padding"
-                                android:layout_marginBottom="@dimen/standard_margin"
-                                android:layout_marginTop="@dimen/standard_margin"
-                                android:layout_toEndOf="@id/website_icon"
-                                android:layout_toRightOf="@id/website_icon"
-                                android:maxLines="3"
-                                android:text="@string/placeholder_filename"
-                                android:textAppearance="?android:attr/textAppearanceListItem"
-                                android:textColor="?android:attr/textColorSecondary"/>
-
-                        </RelativeLayout>
-
-                        <RelativeLayout
-                            android:id="@+id/twitter_container"
+                            android:layout_height="1dp"
+                            android:background="@color/list_divider_background"/>
+
+                        <ImageView
+                            android:id="@+id/twitter_icon"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginBottom="@dimen/standard_margin"
+                            android:layout_marginLeft="@dimen/standard_icon_list_horizontal_margin"
+                            android:layout_marginRight="@dimen/standard_icon_list_horizontal_margin"
+                            android:layout_marginTop="@dimen/standard_margin"
+                            android:contentDescription="@string/user_info_twitter"
+                            android:src="@drawable/ic_twitter"/>
+
+                        <TextView
+                            android:id="@+id/twitter_handle"
                             android:layout_width="match_parent"
-                            android:layout_height="wrap_content">
-
-                            <View
-                                android:layout_width="match_parent"
-                                android:layout_height="1dp"
-                                android:background="@color/list_divider_background"/>
-
-                            <ImageView
-                                android:id="@+id/twitter_icon"
-                                android:layout_width="wrap_content"
-                                android:layout_height="wrap_content"
-                                android:layout_marginBottom="@dimen/standard_margin"
-                                android:layout_marginLeft="@dimen/standard_icon_list_horizontal_margin"
-                                android:layout_marginRight="@dimen/standard_icon_list_horizontal_margin"
-                                android:layout_marginTop="@dimen/standard_margin"
-                                android:src="@drawable/ic_twitter"
-                                android:contentDescription="@string/user_info_twitter"/>
-
-                            <TextView
-                                android:id="@+id/twitter_handle"
-                                android:layout_width="match_parent"
-                                android:layout_height="wrap_content"
-                                android:layout_centerInParent="true"
-                                android:layout_marginRight="@dimen/standard_padding"
-                                android:layout_marginEnd="@dimen/standard_padding"
-                                android:layout_marginBottom="@dimen/standard_margin"
-                                android:layout_marginTop="@dimen/standard_margin"
-                                android:layout_toEndOf="@id/twitter_icon"
-                                android:layout_toRightOf="@id/twitter_icon"
-                                android:maxLines="3"
-                                android:text="@string/placeholder_filename"
-                                android:textAppearance="?android:attr/textAppearanceListItem"
-                                android:textColor="?android:attr/textColorSecondary"/>
-
-                        </RelativeLayout>
-
-                    </LinearLayout>
-
-                </android.support.v7.widget.CardView>
-
-            </LinearLayout>
-
-        </ScrollView>
-
-    </RelativeLayout>
-
-
-</android.support.design.widget.CoordinatorLayout>
+                            android:layout_height="wrap_content"
+                            android:layout_centerInParent="true"
+                            android:layout_marginBottom="@dimen/standard_margin"
+                            android:layout_marginEnd="@dimen/standard_padding"
+                            android:layout_marginRight="@dimen/standard_padding"
+                            android:layout_marginTop="@dimen/standard_margin"
+                            android:layout_toEndOf="@id/twitter_icon"
+                            android:layout_toRightOf="@id/twitter_icon"
+                            android:maxLines="3"
+                            android:text="@string/placeholder_filename"
+                            android:textAppearance="?android:attr/textAppearanceListItem"
+                            android:textColor="?android:attr/textColorSecondary"/>
+
+                    </RelativeLayout>
+
+                </LinearLayout>
+
+            </android.support.v7.widget.CardView>
+
+        </LinearLayout>
+
+    </android.support.v4.widget.NestedScrollView>
+
+
+</android.support.design.widget.CoordinatorLayout>