launcher.xml文件里面有引用了一些自定义View。具体在哪里实施呢?我们根据xml布局文件必须要知道以下的自定义View。
public abstract class BaseRecyclerView extends RecyclerView
public abstract class ButtonDropTarget extends TextView
public abstract class PagedView extends ViewGroup
public abstract class PageIndicator extends FrameLayout
public abstract class BaseContainerView extends FrameLayout
public class InsettableFrameLayout extends FrameLayout
public class Hotseat extends FrameLayout
public class AllAppsRecyclerViewContainerView extends FrameLayout
public class LauncherRootView extends InsettableFrameLayout
public class DragLayer extends InsettableFrameLayout
public class Workspace extends PagedView
public class DropTargetBar extends LinearLayout
public class DeleteDropTarget extends ButtonDropTarget
public class ExtendedEditText extends EditText
public class UninstallDropTarget extends ButtonDropTarget
public class InfoDropTarget extends UninstallDropTarget
public class PageIndicatorCaretLandscape extends PageIndicator
public class WidgetsContainerView extends BaseContainerView
public class AllAppsContainerView extends BaseContainerView
public class WidgetsRecyclerView extends BaseRecyclerView
public class AllAppsRecyclerView extends BaseRecyclerView
public class CellLayout extends ViewGroup
这里简单说明一下: 有五个类是继承了 FrameLayout 帧布局。也就是说,这些类是在帧布局的基础上再分化出来的。
在 FrameLayout 家族树形的结构如下:共计10个类
FrameLayout ---> PageIndicator ---> PageIndicatorCaretLandscape
FrameLayout ---> BaseContainerView ---> WidgetsContainerView
FrameLayout ---> BaseContainerView ---> AllAppsContainerView
FrameLayout ---> InsettableFrameLayout ---> LauncherRootView
FrameLayout ---> InsettableFrameLayout ---> DragLayer
FrameLayout ---> AllAppsRecyclerViewContainerView
FrameLayout ---> Hotseat
RecyclerView 家族树形结构如下:共计3个类
RecyclerView ---> BaseRecyclerView ---> WidgetsRecyclerView
RecyclerView ---> BaseRecyclerView ---> AllAppsRecyclerView
TextView 家族树形结构如下:共计4个类
TextView ---> ButtonDropTarget ---> DeleteDropTarget
TextView ---> ButtonDropTarget ---> UninstallDropTarget
TextView ---> ButtonDropTarget ---> UninstallDropTarget ---> InfoDropTarget
ViewGroup 树形结构:
ViewGroup ---> PagedView ---> Workspace
ViewGroup ---> CellLayout
EditText 树形结构:
EditText ---> ExtendedEditText
LinearLayout 树形结构:
LinearLayout ---> DropTargetBar