[RK3288][Android7.1.2] Launcher3 源码阅读之step6:根据布局文件找到对应的自定义View

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


这样,我们就会知道大致这些自定义View的祖宗都是些什么了。这会很好帮助我们分析这些自定义View。
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值