Android Launcher2 allapps.rs

简介: Android 3.0中有个一个 /packages/apps/Launcher2/src/com/android/launcher2/allapps.rs文件! 此文件在 /packages/apps/Launcher2/src/com/android/launcher2/AllApps3D.
Android 3.0中有个一个
/packages/apps/Launcher2/src/com/android/launcher2/allapps.rs
文件!
此文件在
/packages/apps/Launcher2/src/com/android/launcher2/AllApps3D.java
中被引用

public static class RolloRS {
 public void init(Resources res, int width, int height) {
            mRes = res;
            mWidth = width;
            mHeight = height;
            mScript = new ScriptC_allapps(sRS, mRes, R.raw.allapps);

            initProgramVertex();
            initProgramFragment();
            initProgramStore();
            initGl();
            initData();

            mScript.bind_gIcons(mAllocIcons);
            mScript.bind_gLabels(mAllocLabels);
            sRS.bindRootScript(mScript);
        }

R.raw.allapps就是对allapps.rs的引用!



    @Override
    public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
        //long startTime = SystemClock.uptimeMillis();

        super.surfaceChanged(holder, format, w, h);

        if (mSurrendered) return;

        mHaveSurface = true;

        if (sRollo == null) {
            sRollo = new RolloRS(this);
            sRollo.init(getResources(), w, h);
            if (mAllAppsList != null) {
                sRollo.setApps(mAllAppsList);
            }
            if (mShouldGainFocus) {
                gainFocus();
                mShouldGainFocus = false;
            }
        } else if (sRollo.mInitialize) {
            sRollo.initGl();
            sRollo.mInitialize = false;
        }

        initTouchState(w, h);

        sRollo.dirtyCheck();
        sRollo.resize(w, h);

        Log.d(TAG, "sc " + sRS);
        if (sRS != null) {
            mMessageProc = new AAMessage();
            sRS.setMessageHandler(mMessageProc);
        }

        //long endTime = SystemClock.uptimeMillis();
        //Log.d(TAG, "surfaceChanged took " + (endTime-startTime) + "ms");
    }


目录
相关文章
|
Android开发
Android--图片集
一. 实现效果   安卓系统中的相册集效果图,左右滑动可以查看上一张或者下一张图片       二. 布局代码     三. 自定义Adapter    package com.
754 0
|
Android开发 Java
Android--SwipeMenuListView的使用
版权声明:本文为博主原创文章,转载请标明出处。 https://blog.csdn.net/chaoyu168/article/details/79064198 一、实现效果: 二、分析 先看两个图:有一个大体的了解  这是框架中所有的类。
1135 0
|
XML Java Android开发
|
数据安全/隐私保护 Android开发
|
Android开发 数据可视化
|
物联网 Android开发
|
Android开发 数据库管理 数据库