Add custom folder icon

Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2017-05-04 00:52:16 +02:00 committed by AndyScherzinger
parent 48d66b36c9
commit 662b08a12c
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
4 changed files with 10 additions and 3 deletions

View file

@ -30,7 +30,7 @@ public class MediaFolder {
public static final Integer CUSTOM = 0; public static final Integer CUSTOM = 0;
public static final Integer IMAGE = 1; public static final Integer IMAGE = 1;
public static final Integer VIDEO = 2; public static final Integer VIDEO = 2;
public static final Integer IMAGE_VIDEO = 3; public static final Integer LEGACY = 3;
/** name of the folder. */ /** name of the folder. */
public String folderName; public String folderName;

View file

@ -91,11 +91,15 @@ public class FolderSyncAdapter extends SectionedRecyclerViewAdapter<FolderSyncAd
@Override @Override
public void onBindHeaderViewHolder(final MainViewHolder holder, final int section) { public void onBindHeaderViewHolder(final MainViewHolder holder, final int section) {
holder.title.setText(mSyncFolderItems.get(section).getFolderName()); holder.title.setText(mSyncFolderItems.get(section).getFolderName());
if (MediaFolder.VIDEO == mSyncFolderItems.get(section).getType()) { if (MediaFolder.VIDEO == mSyncFolderItems.get(section).getType()) {
holder.type.setImageResource(R.drawable.ic_video_18dp); holder.type.setImageResource(R.drawable.ic_video_18dp);
} else { } else if (MediaFolder.IMAGE == mSyncFolderItems.get(section).getType()) {
holder.type.setImageResource(R.drawable.ic_image_18dp); holder.type.setImageResource(R.drawable.ic_image_18dp);
} else {
holder.type.setImageResource(R.drawable.ic_folder_star_18dp);
} }
holder.syncStatusButton.setVisibility(View.VISIBLE); holder.syncStatusButton.setVisibility(View.VISIBLE);
holder.syncStatusButton.setTag(section); holder.syncStatusButton.setTag(section);
holder.syncStatusButton.setOnClickListener(new View.OnClickListener() { holder.syncStatusButton.setOnClickListener(new View.OnClickListener() {

View file

@ -678,6 +678,9 @@
<string name="privacy">Privacy</string> <string name="privacy">Privacy</string>
<string name="file_not_found">File not found!</string> <string name="file_not_found">File not found!</string>
<!-- Auto upload -->
<string name="autoupload_custom_folder">Setup a custom folder</string>
<string name="folder_sync_folders">Configure folders</string> <string name="folder_sync_folders">Configure folders</string>
<string name="empty" translatable="false"/> <string name="empty" translatable="false"/>