我在尋找這裏提到的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