Эх сурвалжийг харах

add facebook shimmer effect

Signed-off-by: Abdourahamane Boinaidi <abdourahamane.boinaidi@infomaniak.com>
Abdourahamane Boinaidi 5 жил өмнө
parent
commit
9dacc8bf4b

+ 3 - 0
build.gradle

@@ -341,6 +341,9 @@ dependencies {
     ktlint "com.pinterest:ktlint:0.36.0"
     implementation 'org.conscrypt:conscrypt-android:2.4.0'
 
+    // Shimmer animation
+    implementation 'com.facebook.shimmer:shimmer:0.5.0'
+
     // dependencies for markdown rendering
     implementation "io.noties.markwon:core:$markwonVersion"
     implementation "io.noties.markwon:ext-strikethrough:$markwonVersion"

+ 13 - 0
src/main/java/com/owncloud/android/datamodel/ThumbnailsCacheManager.java

@@ -428,6 +428,7 @@ public final class ThumbnailsCacheManager {
         private FileDataStorageManager mStorageManager;
         private GetMethod getMethod;
         private boolean roundedCorners = false;
+        private Listener mListener;
 
         public ThumbnailGenerationTask(ImageView imageView, FileDataStorageManager storageManager, Account account)
                 throws IllegalArgumentException {
@@ -545,11 +546,19 @@ public final class ThumbnailsCacheManager {
                 }
             }
 
+            if (mListener !=null){
+                mListener.onSuccess();
+            }
+
             if (mAsyncTasks != null) {
                 mAsyncTasks.remove(this);
             }
         }
 
+        public void setListener(Listener listener){
+            mListener = listener;
+        }
+
         private Bitmap doThumbnailFromOCFileInBackground() {
             Bitmap thumbnail;
             ServerFileInterface file = (ServerFileInterface) mFile;
@@ -696,6 +705,10 @@ public final class ThumbnailsCacheManager {
             return thumbnail;
         }
 
+        public interface Listener{
+            void onSuccess();
+        }
+
     }
 
     public static class MediaThumbnailGenerationTask extends AsyncTask<Object, Void, Bitmap> {

+ 40 - 1
src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.java

@@ -30,6 +30,7 @@ import android.content.ContentValues;
 import android.content.Context;
 import android.content.res.Resources;
 import android.graphics.Bitmap;
+import android.graphics.Color;
 import android.graphics.LinearGradient;
 import android.graphics.PorterDuff;
 import android.graphics.Shader;
@@ -49,6 +50,7 @@ import android.widget.TextView;
 
 import com.bumptech.glide.Glide;
 import com.bumptech.glide.request.target.BitmapImageViewTarget;
+import com.facebook.shimmer.ShimmerFrameLayout;
 import com.nextcloud.client.account.User;
 import com.nextcloud.client.account.UserAccountManager;
 import com.nextcloud.client.preferences.AppPreferences;
@@ -358,7 +360,8 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
                          mStorageManager,
                          asyncTasks,
                          gridView,
-                         activity);
+                         activity,
+                         gridViewHolder.shimmerFrameLayout);
 
             if (highlightedItem != null && file.getFileId() == highlightedItem.getFileId()) {
                 gridViewHolder.itemLayout.setBackgroundColor(activity.getResources()
@@ -601,11 +604,28 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
                                     List<ThumbnailsCacheManager.ThumbnailGenerationTask> asyncTasks,
                                     boolean gridView,
                                     Context context) {
+        setThumbnail(file, thumbnailView, user, storageManager, asyncTasks, gridView, context, null);
+    }
+
+    public static void setThumbnail(OCFile file,
+                                    ImageView thumbnailView,
+                                    User user,
+                                    FileDataStorageManager storageManager,
+                                    List<ThumbnailsCacheManager.ThumbnailGenerationTask> asyncTasks,
+                                    boolean gridView,
+                                    Context context,
+                                    ShimmerFrameLayout shimmerFrameLayout) {
+        if (shimmerFrameLayout != null){
+            shimmerFrameLayout.startShimmer();
+        }
+
+        boolean stopShimmer = false;
         if (file.isFolder()) {
             thumbnailView.setImageDrawable(MimeTypeUtil
                                                .getFolderTypeIcon(file.isSharedWithMe() || file.isSharedWithSharee(),
                                                                   file.isSharedViaLink(), file.isEncrypted(),
                                                                   file.getMountType(), context));
+            stopShimmer = true;
         } else {
             if (file.getRemoteId() != null && file.isPreviewAvailable()) {
                 // Thumbnail in cache?
@@ -624,6 +644,7 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
                             BitmapUtils.setRoundedBitmap(thumbnail, thumbnailView);
                         }
                     }
+                    stopShimmer = true;
                 } else {
                     // generate new thumbnail
                     if (ThumbnailsCacheManager.cancelPotentialThumbnailWork(file, thumbnailView)) {
@@ -645,7 +666,16 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
                             final ThumbnailsCacheManager.AsyncThumbnailDrawable asyncDrawable =
                                 new ThumbnailsCacheManager.AsyncThumbnailDrawable(context.getResources(),
                                                                                   thumbnail, task);
+
+                            task.setListener(() -> {
+                                if (shimmerFrameLayout != null) {
+                                    shimmerFrameLayout.hideShimmer();
+                                    thumbnailView.setBackground(null);
+                                }
+                            });
+
                             thumbnailView.setImageDrawable(asyncDrawable);
+                            thumbnailView.setBackgroundColor(Color.GRAY);
                             asyncTasks.add(task);
                             task.execute(new ThumbnailsCacheManager.ThumbnailGenerationTaskObject(file,
                                                                                                   file.getRemoteId()));
@@ -663,8 +693,14 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
                                                                             file.getFileName(),
                                                                             user.toPlatformAccount(),
                                                                             context));
+                stopShimmer = true;
             }
         }
+
+        if (stopShimmer && shimmerFrameLayout != null){
+            shimmerFrameLayout.hideShimmer();
+            thumbnailView.setBackground(null);
+        }
     }
 
     private String getFooterText() {
@@ -1184,6 +1220,9 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
         @BindView(R.id.thumbnail)
         public ImageView thumbnail;
 
+        @BindView(R.id.shimmer_view_container)
+        public ShimmerFrameLayout shimmerFrameLayout;
+
         @BindView(R.id.favorite_action)
         public ImageView favorite;
 

+ 8 - 5
src/main/res/layout/grid_image.xml

@@ -16,6 +16,7 @@
 
 -->
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
     android:id="@+id/ListItemLayout"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
@@ -25,18 +26,20 @@
     android:gravity="center_horizontal"
     android:orientation="vertical">
 
-    <FrameLayout
+    <com.facebook.shimmer.ShimmerFrameLayout
+        android:id="@+id/shimmer_view_container"
         android:layout_width="match_parent"
-        android:layout_height="wrap_content">
+        android:layout_height="wrap_content"
+        app:shimmer_auto_start="false">
 
         <ImageView
             android:id="@+id/thumbnail"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
+            android:contentDescription="@null"
             android:padding="@dimen/standard_eigth_padding"
             android:scaleType="centerCrop"
-            android:src="@drawable/folder"
-            android:contentDescription="@null"/>
+            android:src="@drawable/folder" />
 
 
         <ImageView
@@ -91,6 +94,6 @@
             android:layout_marginRight="@dimen/standard_quarter_margin"
             android:contentDescription="@string/checkbox"
             android:src="@android:drawable/checkbox_off_background" />
-    </FrameLayout>
+    </com.facebook.shimmer.ShimmerFrameLayout>
 
 </LinearLayout>

+ 5 - 2
src/main/res/layout/grid_item.xml

@@ -16,6 +16,7 @@
 
 -->
 <com.owncloud.android.ui.SquareLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
     android:id="@+id/ListItemLayout"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
@@ -24,9 +25,11 @@
     android:gravity="center"
     android:orientation="vertical">
 
-    <FrameLayout
+    <com.facebook.shimmer.ShimmerFrameLayout
+        android:id="@+id/shimmer_view_container"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
+        app:shimmer_auto_start="false"
         android:layout_gravity="center_horizontal">
 
         <ImageView
@@ -90,7 +93,7 @@
             android:src="@android:drawable/checkbox_off_background"
             android:contentDescription="@string/checkbox"/>
 
-    </FrameLayout>
+    </com.facebook.shimmer.ShimmerFrameLayout>
 
     <TextView
         android:id="@+id/Filename"

+ 43 - 36
src/main/res/layout/grid_sync_item.xml

@@ -18,8 +18,8 @@
   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/>.
 -->
-<FrameLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
     android:id="@+id/grid_item_container"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
@@ -27,46 +27,53 @@
     android:background="@drawable/list_selector"
     android:gravity="center_horizontal">
 
-    <ImageView
-        android:id="@+id/thumbnail"
+    <com.facebook.shimmer.ShimmerFrameLayout
+        android:id="@+id/shimmer_view_container"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:scaleType="centerCrop"
-        android:src="@drawable/folder"/>
+        app:shimmer_auto_start="false">
 
-    <ImageView
-        android:id="@+id/thumbnailDarkener"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:background="#99000000"
-        android:scaleType="centerCrop"
-        android:contentDescription="@null"/>
+        <ImageView
+            android:id="@+id/thumbnail"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:scaleType="centerCrop"
+            android:src="@drawable/folder" />
 
-    <LinearLayout
-        android:id="@+id/counterLayout"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_gravity="center_vertical|center_horizontal"
-        android:gravity="center_horizontal"
-        android:orientation="horizontal">
+        <ImageView
+            android:id="@+id/thumbnailDarkener"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:background="#99000000"
+            android:contentDescription="@null"
+            android:scaleType="centerCrop" />
 
-        <TextView
-            android:id="@+id/next"
+        <LinearLayout
+            android:id="@+id/counterLayout"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:text="@string/synced_folders_plus"
-            android:textColor="#ffffff"
-            android:textSize="@dimen/grid_sync_item_layout_next_text_size"
-            android:textStyle="bold"/>
+            android:layout_gravity="center_vertical|center_horizontal"
+            android:gravity="center_horizontal"
+            android:orientation="horizontal">
 
-        <TextView
-            android:id="@+id/counter"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:src="@android:drawable/checkbox_off_background"
-            android:text="@string/placeholder_fileSize"
-            android:textColor="#ffffff"
-            android:textSize="@dimen/grid_sync_item_layout_counter_text_size"
-            android:textStyle="bold"/>
-    </LinearLayout>
+            <TextView
+                android:id="@+id/next"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/synced_folders_plus"
+                android:textColor="#ffffff"
+                android:textSize="@dimen/grid_sync_item_layout_next_text_size"
+                android:textStyle="bold" />
+
+            <TextView
+                android:id="@+id/counter"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:src="@android:drawable/checkbox_off_background"
+                android:text="@string/placeholder_fileSize"
+                android:textColor="#ffffff"
+                android:textSize="@dimen/grid_sync_item_layout_counter_text_size"
+                android:textStyle="bold" />
+        </LinearLayout>
+    </com.facebook.shimmer.ShimmerFrameLayout>
 </FrameLayout>

+ 181 - 168
src/main/res/layout/list_item.xml

@@ -17,180 +17,193 @@
   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:foreground="?android:attr/selectableItemBackground"
-              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: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_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_alignParentTop="true"
-            android:layout_marginEnd="@dimen/standard_quarter_margin"
-            android:contentDescription="@string/favorite"
-            android:src="@drawable/favorite"/>
-
-        <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_marginEnd="@dimen/standard_quarter_margin"
-            android:contentDescription="@string/downloader_download_succeeded_ticker"
-            android:scaleType="fitCenter"
-            android:src="@drawable/ic_synced" />
-
-    </RelativeLayout>
-
-    <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">
-
-        <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/text_color"
-            android:textSize="@dimen/two_line_primary_text_size"/>
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    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:foreground="?android:attr/selectableItemBackground"
+    android:baselineAligned="false"
+    android:orientation="horizontal">
+
+    <com.facebook.shimmer.ShimmerFrameLayout
+        android:id="@+id/shimmer_view_container"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        app:shimmer_auto_start="false">
 
         <LinearLayout
             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/file_separator"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:gravity="end"
+            android:orientation="horizontal"
+            android:baselineAligned="false">
+            <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: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: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_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_alignParentTop="true"
+                    android:layout_marginEnd="@dimen/standard_quarter_margin"
+                    android:contentDescription="@string/favorite"
+                    android:src="@drawable/favorite"/>
+
+                <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_marginEnd="@dimen/standard_quarter_margin"
+                    android:contentDescription="@string/downloader_download_succeeded_ticker"
+                    android:scaleType="fitCenter"
+                    android:src="@drawable/ic_synced" />
+
+            </RelativeLayout>
+
+            <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">
+
+                <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/text_color"
+                    android:textSize="@dimen/two_line_primary_text_size"/>
+
+                <LinearLayout
+                    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/file_separator"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:gravity="end"
+                        android:paddingEnd="@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>
+
+            </LinearLayout>
+
+            <RelativeLayout
                 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"/>
-
+                android:layout_height="match_parent"
+                android:layout_gravity="center_vertical"
+                android:paddingEnd="@dimen/zero"
+                android:paddingStart="@dimen/standard_half_padding">
+
+                <ImageView
+                    android:id="@+id/unreadComments"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:layout_centerVertical="true"
+                    android:clickable="true"
+                    android:contentDescription="@string/unread_comments"
+                    android:focusable="true"
+                    android:paddingEnd="@dimen/list_item_share_right_margin"
+                    android:paddingStart="@dimen/standard_half_padding"
+                    android:src="@drawable/ic_comment"
+                    android:visibility="gone"/>
+
+                <ImageView
+                    android:id="@+id/sharedIcon"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:layout_centerVertical="true"
+                    android:layout_toEndOf="@id/unreadComments"
+                    android:clickable="true"
+                    android:contentDescription="@string/shared_icon_share"
+                    android:focusable="true"
+                    android:paddingEnd="@dimen/list_item_share_right_margin"
+                    android:paddingStart="@dimen/standard_half_padding"
+                    android:src="@drawable/ic_unshared"/>
+
+                <RelativeLayout
+                    android:id="@+id/sharedAvatars"
+                    android:layout_width="100dp"
+                    android:layout_height="@dimen/file_icon_size"
+                    android:layout_centerVertical="true"
+                    android:layout_alignEnd="@id/sharedIcon"
+                    android:layout_toEndOf="@id/sharedIcon"
+                    android:contentDescription="@string/shared_avatar_desc"
+                    android:visibility="visible"/>
+
+                <ImageView
+                    android:id="@+id/custom_checkbox"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:layout_centerVertical="true"
+                    android:layout_toEndOf="@id/sharedAvatars"
+                    android:clickable="false"
+                    android:contentDescription="@string/checkbox"
+                    android:focusable="false"
+                    android:paddingEnd="@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:clickable="true"
+                    android:contentDescription="@string/overflow_menu"
+                    android:focusable="true"
+                    android:paddingEnd="@dimen/alternate_padding"
+                    android:paddingStart="@dimen/standard_half_padding"
+                    android:src="@drawable/ic_dots_vertical"/>
+
+            </RelativeLayout>
         </LinearLayout>
-
-    </LinearLayout>
-
-    <RelativeLayout
-        android:layout_width="wrap_content"
-        android:layout_height="match_parent"
-        android:layout_gravity="center_vertical"
-        android:paddingEnd="@dimen/zero"
-        android:paddingStart="@dimen/standard_half_padding">
-
-        <ImageView
-            android:id="@+id/unreadComments"
-            android:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            android:layout_centerVertical="true"
-            android:clickable="true"
-            android:contentDescription="@string/unread_comments"
-            android:focusable="true"
-            android:paddingEnd="@dimen/list_item_share_right_margin"
-            android:paddingStart="@dimen/standard_half_padding"
-            android:src="@drawable/ic_comment"
-            android:visibility="gone"/>
-
-        <ImageView
-            android:id="@+id/sharedIcon"
-            android:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            android:layout_centerVertical="true"
-            android:layout_toEndOf="@id/unreadComments"
-            android:clickable="true"
-            android:contentDescription="@string/shared_icon_share"
-            android:focusable="true"
-            android:paddingEnd="@dimen/list_item_share_right_margin"
-            android:paddingStart="@dimen/standard_half_padding"
-            android:src="@drawable/ic_unshared"/>
-
-        <RelativeLayout
-            android:id="@+id/sharedAvatars"
-            android:layout_width="100dp"
-            android:layout_height="@dimen/file_icon_size"
-            android:layout_centerVertical="true"
-            android:layout_alignEnd="@id/sharedIcon"
-            android:layout_toEndOf="@id/sharedIcon"
-            android:contentDescription="@string/shared_avatar_desc"
-            android:visibility="visible"/>
-
-        <ImageView
-            android:id="@+id/custom_checkbox"
-            android:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            android:layout_centerVertical="true"
-            android:layout_toEndOf="@id/sharedAvatars"
-            android:clickable="false"
-            android:contentDescription="@string/checkbox"
-            android:focusable="false"
-            android:paddingEnd="@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:clickable="true"
-            android:contentDescription="@string/overflow_menu"
-            android:focusable="true"
-            android:paddingEnd="@dimen/alternate_padding"
-            android:paddingStart="@dimen/standard_half_padding"
-            android:src="@drawable/ic_dots_vertical"/>
-
-    </RelativeLayout>
-
+    </com.facebook.shimmer.ShimmerFrameLayout>
 </LinearLayout>