Loading tools/layoutlib/bridge/src/android/view/View_Delegate.java 0 → 100644 +31 −0 Original line number Diff line number Diff line /* * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.view; /** * Delegate used to provide new implementation of a select few methods of {@link View} * * Through the layoutlib_create tool, the original methods of View have been replaced * by calls to methods of the same name in this delegate class. * */ public class View_Delegate { /*package*/ static boolean isInEditMode(View thisView) { return true; } } tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java +0 −14 Original line number Diff line number Diff line Loading @@ -157,20 +157,6 @@ public final class Bridge extends LayoutBridge { }); } // Override View.isInEditMode to return true. // // This allows custom views that are drawn in the Graphical Layout Editor to adapt their // rendering for preview. Most important this let custom views know that they can't expect // the rest of their activities to be alive. OverrideMethod.setMethodListener("android.view.View#isInEditMode()Z", new MethodAdapter() { @Override public int onInvokeI(String signature, boolean isNative, Object caller) { return 1; } } ); // load the fonts. FontLoader fontLoader = FontLoader.create(fontOsLocation); if (fontLoader != null) { Loading tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java +3 −10 Original line number Diff line number Diff line Loading @@ -1111,25 +1111,20 @@ public final class BridgeContext extends Activity { } @SuppressWarnings("unused") @Override public FileInputStream openFileInput(String arg0) throws FileNotFoundException { public FileInputStream openFileInput(String arg0) throws FileNotFoundException { // TODO Auto-generated method stub return null; } @SuppressWarnings("unused") @Override public FileOutputStream openFileOutput(String arg0, int arg1) throws FileNotFoundException { public FileOutputStream openFileOutput(String arg0, int arg1) throws FileNotFoundException { // TODO Auto-generated method stub return null; } @Override public SQLiteDatabase openOrCreateDatabase(String arg0, int arg1, CursorFactory arg2) { public SQLiteDatabase openOrCreateDatabase(String arg0, int arg1, CursorFactory arg2) { // TODO Auto-generated method stub return null; } Loading Loading @@ -1217,14 +1212,12 @@ public final class BridgeContext extends Activity { } @SuppressWarnings("unused") @Override public void setWallpaper(Bitmap arg0) throws IOException { // TODO Auto-generated method stub } @SuppressWarnings("unused") @Override public void setWallpaper(InputStream arg0) throws IOException { // TODO Auto-generated method stub Loading tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeTypedArray.java +0 −2 Original line number Diff line number Diff line Loading @@ -43,10 +43,8 @@ import java.util.Map; */ public final class BridgeTypedArray extends TypedArray { @SuppressWarnings("hiding") private BridgeResources mResources; private BridgeContext mContext; @SuppressWarnings("hiding") private IResourceValue[] mData; private String[] mNames; private final boolean mPlatformFile; Loading tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindow.java +2 −1 Original line number Diff line number Diff line Loading @@ -49,7 +49,8 @@ public final class BridgeWindow implements IWindow { // pass for now. } public void dispatchTrackball(MotionEvent arg0, long arg1, boolean arg2) throws RemoteException { public void dispatchTrackball(MotionEvent arg0, long arg1, boolean arg2) throws RemoteException { // pass for now. } Loading Loading
tools/layoutlib/bridge/src/android/view/View_Delegate.java 0 → 100644 +31 −0 Original line number Diff line number Diff line /* * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.view; /** * Delegate used to provide new implementation of a select few methods of {@link View} * * Through the layoutlib_create tool, the original methods of View have been replaced * by calls to methods of the same name in this delegate class. * */ public class View_Delegate { /*package*/ static boolean isInEditMode(View thisView) { return true; } }
tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java +0 −14 Original line number Diff line number Diff line Loading @@ -157,20 +157,6 @@ public final class Bridge extends LayoutBridge { }); } // Override View.isInEditMode to return true. // // This allows custom views that are drawn in the Graphical Layout Editor to adapt their // rendering for preview. Most important this let custom views know that they can't expect // the rest of their activities to be alive. OverrideMethod.setMethodListener("android.view.View#isInEditMode()Z", new MethodAdapter() { @Override public int onInvokeI(String signature, boolean isNative, Object caller) { return 1; } } ); // load the fonts. FontLoader fontLoader = FontLoader.create(fontOsLocation); if (fontLoader != null) { Loading
tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java +3 −10 Original line number Diff line number Diff line Loading @@ -1111,25 +1111,20 @@ public final class BridgeContext extends Activity { } @SuppressWarnings("unused") @Override public FileInputStream openFileInput(String arg0) throws FileNotFoundException { public FileInputStream openFileInput(String arg0) throws FileNotFoundException { // TODO Auto-generated method stub return null; } @SuppressWarnings("unused") @Override public FileOutputStream openFileOutput(String arg0, int arg1) throws FileNotFoundException { public FileOutputStream openFileOutput(String arg0, int arg1) throws FileNotFoundException { // TODO Auto-generated method stub return null; } @Override public SQLiteDatabase openOrCreateDatabase(String arg0, int arg1, CursorFactory arg2) { public SQLiteDatabase openOrCreateDatabase(String arg0, int arg1, CursorFactory arg2) { // TODO Auto-generated method stub return null; } Loading Loading @@ -1217,14 +1212,12 @@ public final class BridgeContext extends Activity { } @SuppressWarnings("unused") @Override public void setWallpaper(Bitmap arg0) throws IOException { // TODO Auto-generated method stub } @SuppressWarnings("unused") @Override public void setWallpaper(InputStream arg0) throws IOException { // TODO Auto-generated method stub Loading
tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeTypedArray.java +0 −2 Original line number Diff line number Diff line Loading @@ -43,10 +43,8 @@ import java.util.Map; */ public final class BridgeTypedArray extends TypedArray { @SuppressWarnings("hiding") private BridgeResources mResources; private BridgeContext mContext; @SuppressWarnings("hiding") private IResourceValue[] mData; private String[] mNames; private final boolean mPlatformFile; Loading
tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindow.java +2 −1 Original line number Diff line number Diff line Loading @@ -49,7 +49,8 @@ public final class BridgeWindow implements IWindow { // pass for now. } public void dispatchTrackball(MotionEvent arg0, long arg1, boolean arg2) throws RemoteException { public void dispatchTrackball(MotionEvent arg0, long arg1, boolean arg2) throws RemoteException { // pass for now. } Loading