Android 3.0中有个一个
此文件在
/packages/apps/Launcher2/src/com/android/launcher2/AllApps3D.java
中被引用
R.raw.allapps就是对allapps.rs的引用!
/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"); }