|
@@ -22,6 +22,7 @@
|
|
|
package com.owncloud.android.ui.adapter;
|
|
|
|
|
|
import android.content.Context;
|
|
|
+import android.support.annotation.Nullable;
|
|
|
import android.support.v7.widget.RecyclerView;
|
|
|
import android.view.LayoutInflater;
|
|
|
import android.view.View;
|
|
@@ -43,6 +44,9 @@ import java.io.File;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
|
+import butterknife.BindView;
|
|
|
+import butterknife.ButterKnife;
|
|
|
+
|
|
|
/**
|
|
|
* Adapter to display all auto-synced folders and/or instant upload media folders.
|
|
|
*/
|
|
@@ -195,28 +199,45 @@ public class SyncedFolderAdapter extends SectionedRecyclerViewAdapter<SyncedFold
|
|
|
}
|
|
|
|
|
|
static class MainViewHolder extends RecyclerView.ViewHolder {
|
|
|
- private final ImageView image;
|
|
|
- private final TextView title;
|
|
|
- private final ImageView type;
|
|
|
- private final ImageButton menuButton;
|
|
|
- private final ImageButton syncStatusButton;
|
|
|
- private final LinearLayout counterBar;
|
|
|
- private final TextView counterValue;
|
|
|
- private final ImageView thumbnailDarkener;
|
|
|
+ @Nullable
|
|
|
+ @BindView(R.id.thumbnail)
|
|
|
+ public ImageView image;
|
|
|
+
|
|
|
+ @Nullable
|
|
|
+ @BindView(R.id.title)
|
|
|
+ public TextView title;
|
|
|
+
|
|
|
+ @Nullable
|
|
|
+ @BindView(R.id.type)
|
|
|
+ public ImageView type;
|
|
|
+
|
|
|
+ @Nullable
|
|
|
+ @BindView(R.id.settingsButton)
|
|
|
+ public ImageButton menuButton;
|
|
|
+
|
|
|
+ @Nullable
|
|
|
+ @BindView(R.id.syncStatusButton)
|
|
|
+ public ImageButton syncStatusButton;
|
|
|
+
|
|
|
+ @Nullable
|
|
|
+ @BindView(R.id.counterLayout)
|
|
|
+ public LinearLayout counterBar;
|
|
|
+
|
|
|
+ @Nullable
|
|
|
+ @BindView(R.id.counter)
|
|
|
+ public TextView counterValue;
|
|
|
+
|
|
|
+ @Nullable
|
|
|
+ @BindView(R.id.thumbnailDarkener)
|
|
|
+ public ImageView thumbnailDarkener;
|
|
|
|
|
|
- private final RelativeLayout mainHeaderContainer;
|
|
|
+ @Nullable
|
|
|
+ @BindView(R.id.header_container)
|
|
|
+ public RelativeLayout mainHeaderContainer;
|
|
|
|
|
|
private MainViewHolder(View itemView) {
|
|
|
super(itemView);
|
|
|
- mainHeaderContainer = itemView.findViewById(R.id.header_container);
|
|
|
- image = itemView.findViewById(R.id.thumbnail);
|
|
|
- title = itemView.findViewById(R.id.title);
|
|
|
- type = itemView.findViewById(R.id.type);
|
|
|
- menuButton = itemView.findViewById(R.id.settingsButton);
|
|
|
- syncStatusButton = itemView.findViewById(R.id.syncStatusButton);
|
|
|
- counterBar = itemView.findViewById(R.id.counterLayout);
|
|
|
- counterValue = itemView.findViewById(R.id.counter);
|
|
|
- thumbnailDarkener = itemView.findViewById(R.id.thumbnailDarkener);
|
|
|
+ ButterKnife.bind(this, itemView);
|
|
|
}
|
|
|
}
|
|
|
|