Просмотр исходного кода

Merge pull request #2944 from nextcloud/removeDivider

remove dividers
Andy Scherzinger 6 лет назад
Родитель
Сommit
506acd0bbb

+ 0 - 2
src/main/java/com/owncloud/android/ui/activity/NotificationsActivity.java

@@ -249,10 +249,8 @@ public class NotificationsActivity extends FileActivity {
         recyclerView.setAdapter(adapter);
 
         LinearLayoutManager layoutManager = new LinearLayoutManager(this);
-        DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(this, layoutManager.getOrientation());
 
         recyclerView.setLayoutManager(layoutManager);
-        recyclerView.addItemDecoration(dividerItemDecoration);
 
         BottomNavigationView bottomNavigationView = findViewById(R.id.bottom_navigation_view);
 

+ 0 - 1
src/main/java/com/owncloud/android/ui/activity/UserInfoActivity.java

@@ -148,7 +148,6 @@ public class UserInfoActivity extends FileActivity {
         updateActionBarTitleAndHomeButtonByString("");
 
         mUserInfoList.setAdapter(new UserInfoAdapter(null, ThemeUtils.primaryColor(getAccount(), true, this)));
-        mUserInfoList.addItemDecoration(new DividerItemDecoration(this, DividerItemDecoration.VERTICAL));
 
         if (userInfo != null) {
             populateUserInfoUi(userInfo);

+ 0 - 1
src/main/java/com/owncloud/android/ui/adapter/TrashbinListAdapter.java

@@ -54,7 +54,6 @@ import butterknife.ButterKnife;
 /**
  * Adapter for the trashbin view
  */
-
 public class TrashbinListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
 
     private static final int TRASHBIN_ITEM = 100;

+ 4 - 3
src/main/res/layout/account_action.xml

@@ -41,13 +41,14 @@
         android:id="@+id/user_name"
         android:layout_width="0dp"
         android:layout_height="fill_parent"
-
         android:layout_weight="1"
         android:gravity="center_vertical"
+        android:paddingEnd="@dimen/standard_padding"
+        android:paddingLeft="28dp"
         android:paddingRight="@dimen/standard_padding"
-        android:paddingLeft="@dimen/standard_padding"
+        android:paddingStart="28dp"
         android:text="@string/prefs_add_account"
         android:textColor="@color/primary"
-        android:textSize="@dimen/two_line_primary_text_size"/>
+        android:textSize="@dimen/two_line_primary_text_size" />
 
 </LinearLayout>         

+ 7 - 3
src/main/res/layout/account_item.xml

@@ -64,14 +64,18 @@
         android:layout_centerInParent="true"
         android:layout_toEndOf="@id/avatar_container"
         android:layout_toRightOf="@id/avatar_container"
-        android:orientation="vertical">
+        android:orientation="vertical"
+        android:paddingEnd="@dimen/zero"
+        android:paddingLeft="3dp"
+        android:paddingRight="@dimen/zero"
+        android:paddingStart="3dp">
 
         <TextView
             android:id="@+id/user_name"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginEnd="@dimen/standard_half_margin"
-            android:layout_marginLeft="@dimen/standard_half_margin"
+            android:layout_marginLeft="@dimen/standard_margin"
             android:layout_marginRight="@dimen/standard_half_margin"
             android:layout_marginStart="@dimen/standard_margin"
             android:layout_marginTop="@dimen/standard_quarter_margin"
@@ -87,7 +91,7 @@
             android:layout_height="wrap_content"
             android:layout_marginBottom="@dimen/standard_quarter_margin"
             android:layout_marginEnd="@dimen/standard_half_margin"
-            android:layout_marginLeft="@dimen/standard_half_margin"
+            android:layout_marginLeft="@dimen/standard_margin"
             android:layout_marginRight="@dimen/standard_half_margin"
             android:layout_marginStart="@dimen/standard_margin"
             android:ellipsize="end"

+ 1 - 3
src/main/res/layout/accounts_layout.xml

@@ -33,8 +33,6 @@
 		android:id="@+id/account_list"
 		android:layout_width="fill_parent"
 		android:layout_height="fill_parent"
-		android:divider="@color/list_divider_background"
-		android:dividerHeight="@dimen/divider_height_independent">
-	</ListView>
+		android:divider="@null" />
 
 </LinearLayout>

+ 4 - 4
src/main/res/layout/activity_list_item.xml

@@ -17,9 +17,9 @@
   You should have received a copy of the GNU Affero General Public
   License along with this program. If not, see <http://www.gnu.org/licenses/>.
 -->
-
 <RelativeLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:orientation="horizontal"
@@ -54,7 +54,7 @@
             android:paddingRight="@dimen/zero"
             android:paddingStart="@dimen/activity_icon_layout_right_end_margin"
             android:paddingTop="@dimen/standard_padding"
-            android:text="@string/placeholder_filename"
+            tools:text="@string/placeholder_filename"
             android:textAppearance="?android:attr/textAppearanceListItem" />
 
         <TextView
@@ -66,7 +66,7 @@
             android:paddingRight="@dimen/zero"
             android:paddingStart="@dimen/activity_icon_layout_right_end_margin"
             android:ellipsize="end"
-            android:text="@string/placeholder_sentence"
+            tools:text="@string/placeholder_sentence"
             android:textAppearance="?android:attr/textAppearanceListItem"/>
 
         <GridLayout
@@ -92,7 +92,7 @@
             android:paddingLeft="@dimen/activity_icon_layout_right_end_margin"
             android:paddingRight="@dimen/zero"
             android:paddingStart="@dimen/activity_icon_layout_right_end_margin"
-            android:text="@string/placeholder_sentence"
+            tools:text="@string/placeholder_sentence"
             android:textColor="?android:attr/textColorSecondary"/>
 
     </LinearLayout>

+ 159 - 172
src/main/res/layout/list_item.xml

@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
+<?xml version="1.0" encoding="UTF-8"?><!--
   ownCloud Android client application
 
   Copyright (C) 2012  Bartek Przybylski
@@ -24,193 +23,181 @@
     android:background="@drawable/list_selector"
     android:descendantFocusability="blocksDescendants"
     android:foreground="?android:attr/selectableItemBackground"
-    android:orientation="vertical">
+    android:baselineAligned="false"
+    android:orientation="horizontal">
+
+    <RelativeLayout
+        android:layout_width="@dimen/standard_list_item_size"
+        android:layout_height="@dimen/standard_list_item_size"
+        android:paddingBottom="@dimen/standard_padding"
+        android:paddingEnd="@dimen/standard_quarter_padding"
+        android:paddingLeft="@dimen/zero"
+        android:paddingRight="@dimen/standard_quarter_padding"
+        android:paddingStart="@dimen/zero"
+        android:paddingTop="@dimen/standard_padding">
+
+        <ImageView
+            android:id="@+id/thumbnail"
+            android:layout_width="@dimen/file_icon_size"
+            android:layout_height="@dimen/file_icon_size"
+            android:layout_centerInParent="true"
+            android:layout_marginLeft="@dimen/standard_half_margin"
+            android:layout_marginStart="@dimen/standard_half_margin"
+            android:contentDescription="@null"
+            android:src="@drawable/folder" />
+
+        <ImageView
+            android:id="@+id/favorite_action"
+            android:layout_width="@dimen/list_item_favorite_action_layout_width"
+            android:layout_height="@dimen/list_item_favorite_action_layout_height"
+            android:layout_alignParentEnd="true"
+            android:layout_alignParentRight="true"
+            android:layout_alignParentTop="true"
+            android:layout_marginEnd="@dimen/standard_quarter_margin"
+            android:layout_marginRight="@dimen/standard_quarter_margin"
+            android:contentDescription="@string/favorite"
+            android:src="@drawable/badge_favorite" />
+
+        <ImageView
+            android:id="@+id/keptOfflineIcon"
+            android:layout_width="@dimen/list_item_kept_offline_icon_layout_width"
+            android:layout_height="@dimen/list_item_kept_offline_icon_layout_height"
+            android:layout_alignParentBottom="true"
+            android:layout_alignParentEnd="true"
+            android:layout_alignParentRight="true"
+            android:layout_marginEnd="@dimen/list_item_kept_offline_icon_layout_right_end_margin"
+            android:layout_marginRight="@dimen/list_item_kept_offline_icon_layout_right_end_margin"
+            android:contentDescription="@string/available_offline_icon"
+            android:src="@drawable/ic_available_offline" />
+
+        <ImageView
+            android:id="@+id/localFileIndicator"
+            android:layout_width="@dimen/list_item_local_file_indicator_layout_width"
+            android:layout_height="@dimen/list_item_local_file_indicator_layout_height"
+            android:layout_alignParentBottom="true"
+            android:layout_alignParentEnd="true"
+            android:layout_alignParentRight="true"
+            android:layout_marginEnd="@dimen/standard_quarter_margin"
+            android:layout_marginRight="@dimen/standard_quarter_margin"
+            android:contentDescription="@string/downloader_download_succeeded_ticker"
+            android:scaleType="fitCenter"
+            android:src="@drawable/ic_synced" />
+
+    </RelativeLayout>
 
     <LinearLayout
-        android:layout_width="match_parent"
+        android:layout_width="0dp"
         android:layout_height="match_parent"
-        android:baselineAligned="false"
-        android:orientation="horizontal">
-
-        <RelativeLayout
-            android:layout_width="@dimen/standard_list_item_size"
-            android:layout_height="@dimen/standard_list_item_size"
-            android:paddingBottom="@dimen/standard_padding"
-            android:paddingEnd="@dimen/standard_quarter_padding"
-            android:paddingLeft="@dimen/zero"
-            android:paddingRight="@dimen/standard_quarter_padding"
-            android:paddingStart="@dimen/zero"
-            android:paddingTop="@dimen/standard_padding">
-
-            <ImageView
-                android:id="@+id/thumbnail"
-                android:layout_width="@dimen/file_icon_size"
-                android:layout_height="@dimen/file_icon_size"
-                android:layout_centerInParent="true"
-                android:layout_marginLeft="@dimen/standard_half_margin"
-                android:layout_marginStart="@dimen/standard_half_margin"
-                android:contentDescription="@null"
-                android:src="@drawable/folder" />
-
-            <ImageView
-                android:id="@+id/favorite_action"
-                android:layout_width="@dimen/list_item_favorite_action_layout_width"
-                android:layout_height="@dimen/list_item_favorite_action_layout_height"
-                android:layout_alignParentEnd="true"
-                android:layout_alignParentRight="true"
-                android:layout_alignParentTop="true"
-                android:layout_marginEnd="@dimen/standard_quarter_margin"
-                android:layout_marginRight="@dimen/standard_quarter_margin"
-                android:contentDescription="@string/favorite"
-                android:src="@drawable/badge_favorite" />
-
-            <ImageView
-                android:id="@+id/keptOfflineIcon"
-                android:layout_width="@dimen/list_item_kept_offline_icon_layout_width"
-                android:layout_height="@dimen/list_item_kept_offline_icon_layout_height"
-                android:layout_alignParentBottom="true"
-                android:layout_alignParentEnd="true"
-                android:layout_alignParentRight="true"
-                android:layout_marginEnd="@dimen/list_item_kept_offline_icon_layout_right_end_margin"
-                android:layout_marginRight="@dimen/list_item_kept_offline_icon_layout_right_end_margin"
-                android:contentDescription="@string/available_offline_icon"
-                android:src="@drawable/ic_available_offline" />
-
-            <ImageView
-                android:id="@+id/localFileIndicator"
-                android:layout_width="@dimen/list_item_local_file_indicator_layout_width"
-                android:layout_height="@dimen/list_item_local_file_indicator_layout_height"
-                android:layout_alignParentBottom="true"
-                android:layout_alignParentEnd="true"
-                android:layout_alignParentRight="true"
-                android:layout_marginEnd="@dimen/standard_quarter_margin"
-                android:layout_marginRight="@dimen/standard_quarter_margin"
-                android:contentDescription="@string/downloader_download_succeeded_ticker"
-                android:scaleType="fitCenter"
-                android:src="@drawable/ic_synced" />
-
-        </RelativeLayout>
+        android:layout_weight="1"
+        android:gravity="top"
+        android:orientation="vertical"
+        android:paddingTop="@dimen/standard_padding">
+
+        <TextView
+            android:id="@+id/Filename"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center_vertical"
+            android:ellipsize="middle"
+            android:singleLine="true"
+            android:text="@string/placeholder_filename"
+            android:textColor="@color/textColor"
+            android:textSize="@dimen/two_line_primary_text_size" />
 
         <LinearLayout
-            android:layout_width="0dp"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            android:gravity="top"
-            android:orientation="vertical"
-            android:paddingTop="@dimen/standard_padding">
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal">
+
+            <TextView
+                android:id="@+id/file_size"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/placeholder_fileSize"
+                android:textColor="@color/list_item_lastmod_and_filesize_text"
+                android:textSize="@dimen/two_line_secondary_text_size" />
 
             <TextView
-                android:id="@+id/Filename"
+                android:id="@+id/file_separator"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:layout_gravity="center_vertical"
-                android:ellipsize="middle"
-                android:singleLine="true"
-                android:text="@string/placeholder_filename"
-                android:textColor="@color/textColor"
-                android:textSize="@dimen/two_line_primary_text_size" />
-
-            <LinearLayout
-                android:layout_width="match_parent"
+                android:gravity="end"
+                android:paddingEnd="@dimen/standard_quarter_padding"
+                android:paddingLeft="@dimen/zero"
+                android:paddingRight="@dimen/standard_quarter_padding"
+                android:paddingStart="@dimen/zero"
+                android:text="@string/info_separator"
+                android:textColor="@color/list_item_lastmod_and_filesize_text"
+                android:textSize="@dimen/two_line_secondary_text_size" />
+
+            <TextView
+                android:id="@+id/last_mod"
+                android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:orientation="horizontal">
-
-                <TextView
-                    android:id="@+id/file_size"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:text="@string/placeholder_fileSize"
-                    android:textColor="@color/list_item_lastmod_and_filesize_text"
-                    android:textSize="@dimen/two_line_secondary_text_size" />
-
-                <TextView
-                    android:id="@+id/file_separator"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:gravity="end"
-                    android:paddingEnd="@dimen/standard_quarter_padding"
-                    android:paddingLeft="@dimen/zero"
-                    android:paddingRight="@dimen/standard_quarter_padding"
-                    android:paddingStart="@dimen/zero"
-                    android:text="@string/info_separator"
-                    android:textColor="@color/list_item_lastmod_and_filesize_text"
-                    android:textSize="@dimen/two_line_secondary_text_size" />
-
-                <TextView
-                    android:id="@+id/last_mod"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:gravity="end"
-                    android:text="@string/placeholder_media_time"
-                    android:textColor="@color/list_item_lastmod_and_filesize_text"
-                    android:textSize="@dimen/two_line_secondary_text_size" />
-
-            </LinearLayout>
+                android:gravity="end"
+                android:text="@string/placeholder_media_time"
+                android:textColor="@color/list_item_lastmod_and_filesize_text"
+                android:textSize="@dimen/two_line_secondary_text_size" />
 
         </LinearLayout>
 
-        <RelativeLayout
+    </LinearLayout>
+
+    <RelativeLayout
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center_vertical"
+        android:paddingEnd="@dimen/zero"
+        android:paddingLeft="@dimen/standard_half_padding"
+        android:paddingRight="@dimen/zero"
+        android:paddingStart="@dimen/standard_half_padding">
+
+        <ImageView
+            android:id="@+id/sharedIcon"
             android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_gravity="center_vertical"
-            android:paddingEnd="@dimen/zero"
+            android:layout_height="match_parent"
+            android:layout_centerVertical="true"
+            android:clickable="true"
+            android:contentDescription="@string/shared_icon_share"
+            android:focusable="true"
+            android:paddingEnd="@dimen/list_item_share_right_margin"
             android:paddingLeft="@dimen/standard_half_padding"
-            android:paddingRight="@dimen/zero"
-            android:paddingStart="@dimen/standard_half_padding">
+            android:paddingRight="@dimen/list_item_share_right_margin"
+            android:paddingStart="@dimen/standard_half_padding"
+            android:src="@drawable/ic_unshared" />
 
-            <ImageView
-                android:id="@+id/sharedIcon"
-                android:layout_width="wrap_content"
-                android:layout_height="match_parent"
-                android:layout_centerVertical="true"
-                android:clickable="true"
-                android:contentDescription="@string/shared_icon_share"
-                android:focusable="true"
-                android:paddingEnd="@dimen/list_item_share_right_margin"
-                android:paddingLeft="@dimen/standard_half_padding"
-                android:paddingRight="@dimen/list_item_share_right_margin"
-                android:paddingStart="@dimen/standard_half_padding"
-                android:src="@drawable/ic_unshared" />
-
-            <ImageView
-                android:id="@+id/custom_checkbox"
-                android:layout_width="wrap_content"
-                android:layout_height="match_parent"
-                android:layout_centerVertical="true"
-                android:layout_toEndOf="@id/sharedIcon"
-                android:layout_toRightOf="@id/sharedIcon"
-                android:clickable="false"
-                android:contentDescription="@string/checkbox"
-                android:focusable="false"
-                android:paddingEnd="@dimen/alternate_padding"
-                android:paddingLeft="@dimen/standard_half_padding"
-                android:paddingRight="@dimen/alternate_padding"
-                android:paddingStart="@dimen/standard_half_padding"
-                android:src="@drawable/ic_checkbox_blank_outline" />
-
-            <ImageView
-                android:id="@+id/overflow_menu"
-                android:layout_width="wrap_content"
-                android:layout_height="match_parent"
-                android:layout_centerVertical="true"
-                android:layout_toEndOf="@id/custom_checkbox"
-                android:layout_toRightOf="@id/custom_checkbox"
-                android:clickable="true"
-                android:contentDescription="@string/overflow_menu"
-                android:focusable="true"
-                android:paddingEnd="@dimen/alternate_padding"
-                android:paddingLeft="@dimen/standard_half_padding"
-                android:paddingRight="@dimen/alternate_padding"
-                android:paddingStart="@dimen/standard_half_padding"
-                android:src="@drawable/ic_dots_vertical" />
-
-        </RelativeLayout>
+        <ImageView
+            android:id="@+id/custom_checkbox"
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:layout_centerVertical="true"
+            android:layout_toEndOf="@id/sharedIcon"
+            android:layout_toRightOf="@id/sharedIcon"
+            android:clickable="false"
+            android:contentDescription="@string/checkbox"
+            android:focusable="false"
+            android:paddingEnd="@dimen/alternate_padding"
+            android:paddingLeft="@dimen/standard_half_padding"
+            android:paddingRight="@dimen/alternate_padding"
+            android:paddingStart="@dimen/standard_half_padding"
+            android:src="@drawable/ic_checkbox_blank_outline" />
 
-    </LinearLayout>
+        <ImageView
+            android:id="@+id/overflow_menu"
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:layout_centerVertical="true"
+            android:layout_toEndOf="@id/custom_checkbox"
+            android:layout_toRightOf="@id/custom_checkbox"
+            android:clickable="true"
+            android:contentDescription="@string/overflow_menu"
+            android:focusable="true"
+            android:paddingEnd="@dimen/alternate_padding"
+            android:paddingLeft="@dimen/standard_half_padding"
+            android:paddingRight="@dimen/alternate_padding"
+            android:paddingStart="@dimen/standard_half_padding"
+            android:src="@drawable/ic_dots_vertical" />
 
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="1dp"
-        android:background="@color/list_divider_background" />
+    </RelativeLayout>
 
 </LinearLayout>

+ 4 - 4
src/main/res/layout/notification_list_item.xml

@@ -19,9 +19,9 @@
   You should have received a copy of the GNU General Public License
   along with this program. If not, see <https://www.gnu.org/licenses/>.
 -->
-
 <RelativeLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:orientation="horizontal"
@@ -54,7 +54,7 @@
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:ellipsize="end"
-            android:text="@string/placeholder_filename"
+            tools:text="@string/placeholder_filename"
             android:textAppearance="?android:attr/textAppearanceListItem"/>
 
         <TextView
@@ -62,7 +62,7 @@
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:ellipsize="end"
-            android:text="@string/placeholder_sentence"
+            tools:text="@string/placeholder_sentence"
             android:alpha="0.57"
             android:textAppearance="?android:attr/textAppearanceListItem"/>
 
@@ -82,7 +82,7 @@
             android:layout_height="wrap_content"
             android:layout_gravity="end"
             android:ellipsize="end"
-            android:text="@string/placeholder_sentence"
+            tools:text="@string/placeholder_sentence"
             android:alpha="0.5"
             android:textColor="?android:attr/textColorSecondary"/>
 

+ 6 - 3
src/main/res/layout/toolbar_user_information.xml

@@ -19,9 +19,10 @@
   License along with this program.  If not, see <http://www.gnu.org/licenses/>.
 -->
 <android.support.design.widget.AppBarLayout
-    android:id="@+id/appbar"
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:id="@+id/appbar"
     android:layout_width="match_parent"
     android:layout_height="@dimen/nav_drawer_header_height"
     android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
@@ -96,7 +97,8 @@
                         android:shadowRadius="2"
                         android:textColor="@android:color/white"
                         android:textSize="@dimen/drawer_header_text"
-                        android:textStyle="bold"/>
+                        android:textStyle="bold"
+                        tools:text="Max Mustermann"/>
 
                     <TextView
                         android:id="@+id/userinfo_username"
@@ -110,7 +112,8 @@
                         android:shadowDy="0"
                         android:shadowRadius="2"
                         android:textColor="@android:color/white"
-                        android:textSize="@dimen/drawer_header_subtext"/>
+                        android:textSize="@dimen/drawer_header_subtext"
+                        tools:text="max@127.0.0.1/nextcloud"/>
                 </LinearLayout>
 
             </RelativeLayout>

+ 21 - 29
src/main/res/layout/trashbin_item.xml

@@ -18,24 +18,27 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
  -->
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-              android:id="@+id/ListItemLayout"
-              android:layout_width="match_parent"
-              android:layout_height="@dimen/standard_list_item_size"
-              android:background="@drawable/list_selector"
-              android:descendantFocusability="blocksDescendants"
-              android:orientation="horizontal">
+    xmlns:tools="http://schemas.android.com/tools"
+    android:id="@+id/ListItemLayout"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:minHeight="@dimen/standard_list_item_size"
+    android:background="@drawable/list_selector"
+    android:descendantFocusability="blocksDescendants"
+    android:orientation="horizontal">
 
     <LinearLayout
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
+        android:layout_height="wrap_content"
         android:baselineAligned="false"
-        android:orientation="horizontal">
+        android:orientation="horizontal"
+        android:paddingTop="@dimen/standard_padding"
+        android:paddingBottom="@dimen/standard_padding">
 
         <ImageView
             android:id="@+id/thumbnail"
             android:layout_width="@dimen/file_icon_size"
             android:layout_height="@dimen/file_icon_size"
-            android:layout_gravity="center_vertical"
             android:layout_marginLeft="@dimen/standard_margin"
             android:layout_marginRight="@dimen/standard_margin"
             android:contentDescription="@null"
@@ -43,20 +46,18 @@
 
         <LinearLayout
             android:layout_width="0dp"
-            android:layout_height="match_parent"
+            android:layout_height="wrap_content"
             android:layout_weight="1"
             android:gravity="top"
-            android:orientation="vertical"
-            android:paddingTop="@dimen/standard_padding">
+            android:orientation="vertical">
 
             <TextView
                 android:id="@+id/Filename"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:layout_gravity="center_vertical"
                 android:ellipsize="middle"
                 android:singleLine="true"
-                android:text="@string/placeholder_filename"
+                tools:text="@string/placeholder_filename"
                 android:textColor="@color/textColor"
                 android:textSize="@dimen/two_line_primary_text_size"/>
 
@@ -69,7 +70,7 @@
                     android:id="@+id/fileSize"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:text="@string/placeholder_fileSize"
+                    tools:text="@string/placeholder_fileSize"
                     android:textColor="@color/list_item_lastmod_and_filesize_text"
                     android:textSize="@dimen/two_line_secondary_text_size"/>
 
@@ -77,7 +78,6 @@
                     android:id="@+id/file_separator"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:gravity="end"
                     android:paddingEnd="@dimen/standard_quarter_padding"
                     android:paddingLeft="@dimen/zero"
                     android:paddingRight="@dimen/standard_quarter_padding"
@@ -90,8 +90,7 @@
                     android:id="@+id/deletionTimestamp"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:gravity="end"
-                    android:text="@string/placeholder_media_time"
+                    tools:text="@string/placeholder_media_time"
                     android:textColor="@color/list_item_lastmod_and_filesize_text"
                     android:textSize="@dimen/two_line_secondary_text_size"/>
 
@@ -101,8 +100,7 @@
                 android:id="@+id/originalLocation"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:gravity="end"
-                android:text="@string/placeholder_filename"
+                tools:text="@string/placeholder_filename"
                 android:textColor="@color/list_item_lastmod_and_filesize_text"
                 android:textSize="@dimen/two_line_secondary_text_size"/>
 
@@ -111,7 +109,6 @@
         <RelativeLayout
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_gravity="center_vertical"
             android:paddingEnd="@dimen/zero"
             android:paddingLeft="@dimen/standard_half_padding"
             android:paddingRight="@dimen/zero"
@@ -120,7 +117,7 @@
             <ImageView
                 android:id="@+id/restore"
                 android:layout_width="wrap_content"
-                android:layout_height="match_parent"
+                android:layout_height="wrap_content"
                 android:layout_centerVertical="true"
                 android:clickable="false"
                 android:contentDescription="@string/restore_button_description"
@@ -134,7 +131,7 @@
             <ImageView
                 android:id="@+id/customCheckbox"
                 android:layout_width="wrap_content"
-                android:layout_height="match_parent"
+                android:layout_height="wrap_content"
                 android:layout_centerVertical="true"
                 android:layout_toEndOf="@id/restore"
                 android:layout_toRightOf="@id/restore"
@@ -150,7 +147,7 @@
             <ImageView
                 android:id="@+id/overflowMenu"
                 android:layout_width="wrap_content"
-                android:layout_height="match_parent"
+                android:layout_height="wrap_content"
                 android:layout_centerVertical="true"
                 android:layout_toEndOf="@id/customCheckbox"
                 android:layout_toRightOf="@id/customCheckbox"
@@ -167,9 +164,4 @@
 
     </LinearLayout>
 
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="1dp"
-        android:background="@color/list_divider_background"/>
-
 </LinearLayout>

+ 29 - 6
src/main/res/layout/user_info_details_table_item.xml

@@ -1,18 +1,40 @@
 <?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
+<!--
+  Nextcloud Android client application
+
+  Copyright (C) 2018 Andy Scherzinger
+  Copyright (C) 2018 Nextcloud
+
+  This program is free software; you can redistribute it and/or
+  modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+  License as published by the Free Software Foundation; either
+  version 3 of the License, or any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+  GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+
+  You should have received a copy of the GNU Affero General Public
+  License along with this program.  If not, see <http://www.gnu.org/licenses/>.
+-->
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="wrap_content">
 
     <ImageView
         android:id="@+id/icon"
-        android:contentDescription="@string/account_icon"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_marginBottom="@dimen/standard_margin"
+        android:layout_marginEnd="@dimen/standard_half_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:layout_marginRight="@dimen/standard_half_margin"
+        android:layout_marginStart="@dimen/standard_icon_list_horizontal_margin"
+        android:layout_marginTop="@dimen/standard_margin"
+        android:contentDescription="@string/account_icon"
+        tools:src="@drawable/ic_phone" />
 
     <TextView
         android:id="@+id/text"
@@ -23,6 +45,7 @@
         android:layout_toEndOf="@id/icon"
         android:layout_toRightOf="@id/icon"
         android:maxLines="3"
-        android:textAppearance="?android:attr/textAppearanceListItem"/>
+        android:textAppearance="?android:attr/textAppearanceListItem"
+        tools:text="+49 123 456 789 12" />
 
 </RelativeLayout>

+ 0 - 1
src/main/res/values/dims.xml

@@ -61,7 +61,6 @@
     <dimen name="alternate_half_padding">5dp</dimen>
     <dimen name="alternate_padding_right">55dp</dimen>
     <dimen name="display_text_min_height">32dp</dimen>
-    <dimen name="divider_height_independent">1dip</dimen>
     <dimen name="alternate_padding_independent">10dip</dimen>
     <dimen name="activity_row_layout_min_width_independent">196dip</dimen>
     <dimen name="user_icon_size_independent">40dip</dimen>