summaryrefslogtreecommitdiffstats
path: root/RemoteFolder/src/com/android/launcher3/RemoteFolderManager.java
blob: b3a147c199220e66bad0ae45bb4bd108e9b9141d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
package com.android.launcher3;

import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.view.View;
import android.view.ViewGroup;

import java.util.ArrayList;

/**
 * Manages adding and removing the remote folder from the workspace.
 */
public class RemoteFolderManager {

    public RemoteFolderManager(final Launcher launcher) { }

    /**
     * Create a remote folder view.
     * @param icon folder icon view on the workspace.
     * @return a view for the remote folder.
     */
    public Folder createRemoteFolder(final FolderIcon icon, ViewGroup root) { return null; }

    /**
     * Get a drawable for the supplied item in the folder icon preview.
     * @param items list of views in the folder.
     * @param position index of icon to retreive.
     * @return an icon to draw in the folder preview.
     */
    public Drawable getFolderIconDrawable(final ArrayList<View> items,
                                          final int position) { return null; }

    /**
     * Called when Launcher finishes binding items from the model.
     */
    public void bindFinished() { }

    /**
     * Called when the setting for remote folder is updated.
     * @param newValue the new setting for remote folder
     */
    public void onSettingChanged(final boolean newValue) { }

    /**
     * Called when the remote folder is dropped into the delete area on the workspace.
     */
    public void onFolderDeleted() { }

    /**
     * Called when the app drawer is opened.
     */
    public void onAppDrawerOpened() { }

    /**
     * Called when new apps are added to launcher.
     * @param apps list of added apps.
     */
    public void onBindAddApps(ArrayList<AppInfo> apps) { }

    /**
     * Called when launcher loads apps and applies them to the drawer.
     */
    public void onSetApps() { }

    /**
     * Called when the info icon is clicked
     */
    public void onInfoIconClicked() { }

    /**
     * Change the appearance of FolderIcon for our RemoteFolder by adding a badge
     * @param icon the FolderIcon to update
     * @return a FolderIcon with an added ImageView
     */
    public static FolderIcon addBadgeToFolderIcon(FolderIcon icon) {
        return icon;
    }

    /**
     * Called when the view holder is created for the remote header.
     * @param holder remote view holder.
     */
    public void onCreateViewHolder(final AppDrawerListAdapter.ViewHolder holder) { }
    /**
     * Called when the view holder is bound for the remote header.
     * @param holder remote view holder.
     * @param indexedInfo header info.
     */
    public void onBindViewHolder(final AppDrawerListAdapter.ViewHolder holder,
                                 final AppDrawerListAdapter.AppItemIndexedInfo indexedInfo) { }

    /**
     * Get the String to be used for the RemoteFolder name and its corresponding Settings option
     * @return the name RemoteFolder and its Setting option should use
     */
    public static String getFeatureTitle(Resources res) { return null; }
}