我在寻找这里提到的RippleDrawable的源代码https://developer.android.com/preview/material/animations.html#touchRippleDrawable的源代码在哪里? (Android L)
实际上,它必须退出,因为它在Android L中用于涟漪动画。
但是,也许这是我的错,我没能找到它...
感谢您的帮助。
这是我发现解压android.jar
: - (((
public class RippleDrawable extends LayerDrawable
{
public RippleDrawable(Drawable content, Drawable mask)
{
super((Drawable[])null); throw new RuntimeException("Stub!"); }
public void setAlpha(int alpha) { throw new RuntimeException("Stub!"); }
public void setColorFilter(ColorFilter cf) { throw new RuntimeException("Stub!"); }
public int getOpacity() { throw new RuntimeException("Stub!"); }
protected boolean onStateChange(int[] stateSet) { throw new RuntimeException("Stub!"); }
protected void onBoundsChange(Rect bounds) { throw new RuntimeException("Stub!"); }
public boolean setVisible(boolean visible, boolean restart) { throw new RuntimeException("Stub!"); }
public boolean isStateful() { throw new RuntimeException("Stub!"); }
public void setColor(ColorStateList color) { throw new RuntimeException("Stub!"); }
public void inflate(Resources r, XmlPullParser parser, AttributeSet attrs, Resources.Theme theme) throws XmlPullParserException, IOException { throw new RuntimeException("Stub!"); }
public boolean setDrawableByLayerId(int id, Drawable drawable) { throw new RuntimeException("Stub!"); }
public void setPaddingMode(int mode) { throw new RuntimeException("Stub!"); }
public void applyTheme(Resources.Theme t) { throw new RuntimeException("Stub!"); }
public boolean canApplyTheme() { throw new RuntimeException("Stub!"); }
public void setHotspot(float x, float y) { throw new RuntimeException("Stub!"); }
public void setHotspotBounds(int left, int top, int right, int bottom) { throw new RuntimeException("Stub!"); }
public void draw(Canvas canvas) { throw new RuntimeException("Stub!"); }
public Rect getDirtyBounds() { throw new RuntimeException("Stub!"); }
public Drawable.ConstantState getConstantState() { throw new RuntimeException("Stub!"); }
}
您是否已经通过Android SDK Manager下载了Android L源代码,在您的PC上拉链(例如7-zip)Android L目录,然后在压缩文件中搜索RippleDrawable类?只是想知道... – ChuongPham 2014-09-27 14:33:27
@ChuongPham我做到了,请参阅我的编辑 – 2014-09-27 14:42:30
好吧,现在就清除它。是的,'RippleDrawable'类被导出到'android.jar',但在Android L的源代码中没有相应的文档。但是,当我搜索[RippleDrawable](http://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#q=RippleDrawable)时,没有任何迹象表明这个类的用法。我猜Google要么错过了某些东西,要么因为Android L仍然处于预览模式,他们没有提供正式的文档 - 在源代码和/或在线http://developer.android.com/。 – ChuongPham 2014-09-27 14:59:22