code
stringlengths
23
201k
docstring
stringlengths
17
96.2k
func_name
stringlengths
0
235
language
stringclasses
1 value
repo
stringlengths
8
72
path
stringlengths
11
317
url
stringlengths
57
377
license
stringclasses
7 values
private static byte[] encode3to4(byte[] source, int srcOffset, int numSigBytes, byte[] destination, int destOffset) { byte[] ALPHABET = _STANDARD_ALPHABET; int inBuff = (numSigBytes > 0 ? ((source[srcOffset] << 24) >>> 8) : 0) | (numSigBytes > 1 ? ((source[srcOffset + 1] << 24) >>> 16) :...
<p> Encodes up to three bytes of the array <var>source</var> and writes the resulting four Base64 bytes to <var>destination</var>. The source and destination arrays can be manipulated anywhere along their length by specifying <var>srcOffset</var> and <var>destOffset</var>. This method does not check to make sure your a...
encode3to4
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/Base64.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/Base64.java
Apache-2.0
public static String encode(String string) { byte[] bytes; try { bytes = string.getBytes(PREFERRED_ENCODING); } catch (UnsupportedEncodingException e) { bytes = string.getBytes(); } return encodeBytes(bytes); }
Encode string as a byte array in Base64 annotation. @param string @return The Base64-encoded data as a string
encode
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/Base64.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/Base64.java
Apache-2.0
public static String encodeBytes(byte[] source) { return encodeBytes(source, 0, source.length); }
Encodes a byte array into Base64 notation. @param source The data to convert @return The Base64-encoded data as a String @throws NullPointerException if source array is null @throws IllegalArgumentException if source array, offset, or length are invalid @since 2.0
encodeBytes
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/Base64.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/Base64.java
Apache-2.0
public static String encodeBytes(byte[] source, int off, int len) { byte[] encoded = encodeBytesToBytes(source, off, len); try { return new String(encoded, PREFERRED_ENCODING); } catch (UnsupportedEncodingException uue) { return new String(encoded); } }
Encodes a byte array into Base64 notation. @param source The data to convert @param off Offset in array where conversion should begin @param len Length of data to convert @return The Base64-encoded data as a String @throws NullPointerException if source array is null @throws Illega...
encodeBytes
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/Base64.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/Base64.java
Apache-2.0
public static byte[] encodeBytesToBytes(byte[] source, int off, int len) { if (source == null) throw new NullPointerException("Cannot serialize a null array."); if (off < 0) throw new IllegalArgumentException("Cannot have negative offset: " + off); if (len < 0) t...
Similar to {@link #encodeBytes(byte[], int, int)} but returns a byte array instead of instantiating a String. This is more efficient if you're working with I/O streams and have large data sets to encode. @param source The data to convert @param off Offset in array where conversion should begin @para...
encodeBytesToBytes
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/Base64.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/Base64.java
Apache-2.0
public synchronized byte[] getBuf(int len) { for (int i = 0; i < mBuffersBySize.size(); i++) { byte[] buf = mBuffersBySize.get(i); if (buf.length >= len) { mCurrentSize -= buf.length; mBuffersBySize.remove(i); mBuffersByLastUse.remove(buf);...
Returns a buffer from the pool if one is available in the requested size, or allocates a new one if a pooled one is not available. @param len the minimum size, in bytes, of the requested buffer. The returned buffer may be larger. @return a byte[] buffer is always returned.
getBuf
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/ByteArrayPool.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/ByteArrayPool.java
Apache-2.0
public synchronized void returnBuf(byte[] buf) { if (buf == null || buf.length > mSizeLimit) { return; } mBuffersByLastUse.add(buf); int pos = Collections.binarySearch(mBuffersBySize, buf, BUF_COMPARATOR); if (pos < 0) { pos = -pos - 1; } m...
Returns a buffer to the pool, throwing away old buffers if the pool would exceed its allotted size. @param buf the buffer to return to the pool.
returnBuf
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/ByteArrayPool.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/ByteArrayPool.java
Apache-2.0
public HttpKnife accept(String acceptMedia){ header(RequestHeader.ACCEPT, acceptMedia); return this; }
Basic Authorization @param username @param password
accept
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/HttpKnife.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/HttpKnife.java
Apache-2.0
public HttpKnife basicAuthorization(String username, String password) { header(RequestHeader.AUTHORIZATION, "Basic " + Base64.encode(username + ':' + password)); return this; }
Basic Authorization @param username @param password
basicAuthorization
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/HttpKnife.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/HttpKnife.java
Apache-2.0
public HttpKnife tokenAuthorization(String token){ if(token == null || token.isEmpty()) return this; header(RequestHeader.AUTHORIZATION, "Token " + token); return this; }
Basic Authorization @param username @param password
tokenAuthorization
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/HttpKnife.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/HttpKnife.java
Apache-2.0
public static void i(String msg) { if (isDebug) { Log.i(TAG, msg); } }
if it is essential to print bug message. I can initial this value in the launch activity
i
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/HttpLog.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/HttpLog.java
Apache-2.0
public static void d(String msg) { if (isDebug) { Log.d(TAG, msg); } }
if it is essential to print bug message. I can initial this value in the launch activity
d
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/HttpLog.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/HttpLog.java
Apache-2.0
public static void e(String msg) { if (isDebug) { Log.i(TAG, msg); } }
if it is essential to print bug message. I can initial this value in the launch activity
e
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/HttpLog.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/HttpLog.java
Apache-2.0
public static void v(String msg) { if (isDebug) { Log.i(TAG, msg); } }
if it is essential to print bug message. I can initial this value in the launch activity
v
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/HttpLog.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/HttpLog.java
Apache-2.0
public static void i(String tag,String msg) { if (isDebug) { Log.i(tag, msg); } }
if it is essential to print bug message. I can initial this value in the launch activity
i
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/HttpLog.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/HttpLog.java
Apache-2.0
public static void d(String tag,String msg) { if (isDebug) { Log.d(tag, msg); } }
if it is essential to print bug message. I can initial this value in the launch activity
d
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/HttpLog.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/HttpLog.java
Apache-2.0
public static void e(String tag,String msg) { if (isDebug) { Log.i(tag, msg); } }
if it is essential to print bug message. I can initial this value in the launch activity
e
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/HttpLog.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/HttpLog.java
Apache-2.0
public static void v(String tag, String msg) { if (isDebug) { Log.i(tag, msg); } }
if it is essential to print bug message. I can initial this value in the launch activity
v
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/HttpLog.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/HttpLog.java
Apache-2.0
@Override public void close() throws IOException { mPool.returnBuf(buf); buf = null; super.close(); }
Constructs a new {@code ByteArrayOutputStream} with a default size of {@code size} bytes. If more than {@code size} bytes are written to this instance, the underlying byte array will expand. @param size initial size for the underlying byte array. The value will be pinned to a default minimum size.
close
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/PoolingByteArrayOutputStream.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/PoolingByteArrayOutputStream.java
Apache-2.0
@Override public void finalize() { mPool.returnBuf(buf); }
Constructs a new {@code ByteArrayOutputStream} with a default size of {@code size} bytes. If more than {@code size} bytes are written to this instance, the underlying byte array will expand. @param size initial size for the underlying byte array. The value will be pinned to a default minimum size.
finalize
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/PoolingByteArrayOutputStream.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/PoolingByteArrayOutputStream.java
Apache-2.0
private void expand(int i) { /* Can the buffer handle @i more bytes, if not expand it */ if (count + i <= buf.length) { return; } byte[] newbuf = mPool.getBuf((count + i) * 2); System.arraycopy(buf, 0, newbuf, 0, count); mPool.returnBuf(buf); buf = new...
Ensures there is enough space in the buffer for the given number of additional bytes.
expand
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/PoolingByteArrayOutputStream.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/PoolingByteArrayOutputStream.java
Apache-2.0
@Override public synchronized void write(byte[] buffer, int offset, int len) { expand(len); super.write(buffer, offset, len); }
Ensures there is enough space in the buffer for the given number of additional bytes.
write
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/PoolingByteArrayOutputStream.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/PoolingByteArrayOutputStream.java
Apache-2.0
@Override public synchronized void write(int oneByte) { expand(1); super.write(oneByte); }
Ensures there is enough space in the buffer for the given number of additional bytes.
write
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/PoolingByteArrayOutputStream.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/PoolingByteArrayOutputStream.java
Apache-2.0
private Response parseContent() throws IOException{ HttpEntity entity = response.getEntity(); ByteArrayPool mPool = new ByteArrayPool(4096); PoolingByteArrayOutputStream bytes = new PoolingByteArrayOutputStream(mPool, (int) entity.getContentLength()); byte[] buffer = nul...
turn reponse content into byte array
parseContent
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/Response.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/Response.java
Apache-2.0
private Response parseHeaders() { HttpLog.v("Begin ParseHeaders"); Header[] rawHeaders = response.getAllHeaders(); headers = new TreeMap<String, String>(String.CASE_INSENSITIVE_ORDER); for (int i = 0; i < rawHeaders.length; i++) { headers.put(rawHeaders[i].getName(), rawHeade...
turn reponse content into byte array
parseHeaders
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/Response.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/Response.java
Apache-2.0
public int statusCode() { return statusCode; }
turn reponse content into byte array
statusCode
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/Response.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/Response.java
Apache-2.0
public String reasonPhrase() { return reasonPhrase; }
turn reponse content into byte array
reasonPhrase
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/Response.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/Response.java
Apache-2.0
public byte[] contentBytes() { return contentBytes; }
turn reponse content into byte array
contentBytes
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/Response.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/Response.java
Apache-2.0
public String body() { return contentString; }
turn reponse content into byte array
body
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/Response.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/Response.java
Apache-2.0
public JSONObject json() { try { return new JSONObject(contentString); } catch (JSONException e) { e.printStackTrace(); } return null; }
turn reponse content into byte array
json
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/Response.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/Response.java
Apache-2.0
public JSONArray jsonArray() { try { return new JSONArray(contentString); } catch (JSONException e) { e.printStackTrace(); } return null; }
turn reponse content into byte array
jsonArray
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/Response.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/Response.java
Apache-2.0
public Map<String, String> headers() { return headers; }
turn reponse content into byte array
headers
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/Response.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/Response.java
Apache-2.0
public String charset() { return charset; }
turn reponse content into byte array
charset
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/Response.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/Response.java
Apache-2.0
public boolean isHasParseHeader() { return hasParseHeader; }
turn reponse content into byte array
isHasParseHeader
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/Response.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/Response.java
Apache-2.0
public HttpResponse getResponse() { return response; }
turn reponse content into byte array
getResponse
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/Response.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/Response.java
Apache-2.0
public void setSuccess(boolean isSuccess) { this.requestSuccess = isSuccess; }
turn reponse content into byte array
setSuccess
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/Response.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/Response.java
Apache-2.0
public boolean isSuccess() { return this.requestSuccess; }
turn reponse content into byte array
isSuccess
java
Leaking/WeGit
httpknife/src/main/java/com/quinn/httpknife/http/Response.java
https://github.com/Leaking/WeGit/blob/master/httpknife/src/main/java/com/quinn/httpknife/http/Response.java
Apache-2.0
public void setIcon(final Icon icon) { updateIcon(icon); invalidateSelf(); }
Loads and draws given {@link Icon}. @param icon
setIcon
java
Leaking/WeGit
iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
https://github.com/Leaking/WeGit/blob/master/iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
Apache-2.0
public void setIconColor(int color) { mIconPaint.setColor(color); invalidateSelf(); }
Set a color for the {@link Icon}. @param color
setIconColor
java
Leaking/WeGit
iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
https://github.com/Leaking/WeGit/blob/master/iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
Apache-2.0
public void setIconPadding(int iconPadding) { mIconPadding = iconPadding; if (mDrawContour) { mIconPadding += mContourWidth; } invalidateSelf(); }
Set a padding for the {@link Icon}. @param iconPadding
setIconPadding
java
Leaking/WeGit
iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
https://github.com/Leaking/WeGit/blob/master/iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
Apache-2.0
public void setContour(int contourColor, int contourWidth) { setContourColor(contourColor); setContourWidth(contourWidth); invalidateSelf(); }
Set contour params for the {@link Icon}. You should call {@link #drawContour(boolean)} method to enable contour. @param contourColor @param contourWidth
setContour
java
Leaking/WeGit
iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
https://github.com/Leaking/WeGit/blob/master/iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
Apache-2.0
public void setContourColor(int contourColor) { mContourPaint.setColor(contourColor); invalidateSelf(); }
Set contour color for the {@link Icon}. You should call {@link #drawContour(boolean)} method to enable contour. @param contourColor
setContourColor
java
Leaking/WeGit
iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
https://github.com/Leaking/WeGit/blob/master/iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
Apache-2.0
public void setContourWidth(int contourWidth) { mContourWidth = contourWidth; mContourPaint.setStrokeWidth(mContourWidth); invalidateSelf(); }
Set contour width for the {@link Icon}. You should call {@link #drawContour(boolean)} method to enable contour. @param contourWidth
setContourWidth
java
Leaking/WeGit
iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
https://github.com/Leaking/WeGit/blob/master/iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
Apache-2.0
public void drawContour(boolean drawContour) { mDrawContour = drawContour; if (mDrawContour) { mIconPadding += mContourWidth; } else { mIconPadding -= mContourWidth; } invalidateSelf(); }
Enable/disable contour drawing. @param drawContour
drawContour
java
Leaking/WeGit
iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
https://github.com/Leaking/WeGit/blob/master/iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
Apache-2.0
public void setIntrinsicWidth(int intrinsicWidth) { mIntrinsicWidth = intrinsicWidth; }
Set intrinsic width, which is used by several controls. @param intrinsicWidth
setIntrinsicWidth
java
Leaking/WeGit
iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
https://github.com/Leaking/WeGit/blob/master/iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
Apache-2.0
public void setIntrinsicHeight(int intrinsicHeight) { mIntrinsicHeight = intrinsicHeight; }
Set intrinsic height, which is used by several controls. @param intrinsicHeight
setIntrinsicHeight
java
Leaking/WeGit
iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
https://github.com/Leaking/WeGit/blob/master/iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
Apache-2.0
@Override public void draw(Canvas canvas) { if (mIcon != null) { final Rect viewBounds = getBounds(); updatePaddingBounds(viewBounds); updateTextSize(viewBounds); offsetIcon(viewBounds); mPath.close(); if (mDrawContour) { ...
Set intrinsic height, which is used by several controls. @param intrinsicHeight
draw
java
Leaking/WeGit
iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
https://github.com/Leaking/WeGit/blob/master/iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
Apache-2.0
@Override public int getIntrinsicWidth() { return mIntrinsicWidth; }
Set intrinsic height, which is used by several controls. @param intrinsicHeight
getIntrinsicWidth
java
Leaking/WeGit
iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
https://github.com/Leaking/WeGit/blob/master/iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
Apache-2.0
@Override public int getIntrinsicHeight() { return mIntrinsicHeight; }
Set intrinsic height, which is used by several controls. @param intrinsicHeight
getIntrinsicHeight
java
Leaking/WeGit
iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
https://github.com/Leaking/WeGit/blob/master/iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
Apache-2.0
@Override public int getOpacity() { return PixelFormat.OPAQUE; }
Set intrinsic height, which is used by several controls. @param intrinsicHeight
getOpacity
java
Leaking/WeGit
iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
https://github.com/Leaking/WeGit/blob/master/iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
Apache-2.0
@Override public void setAlpha(int alpha) { mIconPaint.setAlpha(alpha); }
Set intrinsic height, which is used by several controls. @param intrinsicHeight
setAlpha
java
Leaking/WeGit
iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
https://github.com/Leaking/WeGit/blob/master/iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
Apache-2.0
@Override public void setColorFilter(ColorFilter cf) { mIconPaint.setColorFilter(cf); }
Set intrinsic height, which is used by several controls. @param intrinsicHeight
setColorFilter
java
Leaking/WeGit
iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
https://github.com/Leaking/WeGit/blob/master/iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
Apache-2.0
private void updateIcon(Icon icon) { mIcon = icon; mIconUtfChars = Character.toChars(icon.getIconUtfValue()); mIconPaint.setTypeface(mIcon.getIconicTypeface().getTypeface(mContext)); }
Set intrinsic height, which is used by several controls. @param intrinsicHeight
updateIcon
java
Leaking/WeGit
iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
https://github.com/Leaking/WeGit/blob/master/iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
Apache-2.0
private void updatePaddingBounds(Rect viewBounds) { if (mIconPadding >= 0 && !(mIconPadding * 2 > viewBounds.width()) && !(mIconPadding * 2 > viewBounds.height())) { mPaddingBounds.set( viewBounds.left + mIconPadding, viewBounds...
Set intrinsic height, which is used by several controls. @param intrinsicHeight
updatePaddingBounds
java
Leaking/WeGit
iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
https://github.com/Leaking/WeGit/blob/master/iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
Apache-2.0
private void updateTextSize(Rect viewBounds) { float textSize = (float) viewBounds.height() * 2; mIconPaint.setTextSize(textSize); mIconPaint.getTextPath(mIconUtfChars, 0, mIconUtfChars.length, 0, viewBounds.height(), mPath); mPath.computeBounds(mPathBounds, true); ...
Set intrinsic height, which is used by several controls. @param intrinsicHeight
updateTextSize
java
Leaking/WeGit
iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
https://github.com/Leaking/WeGit/blob/master/iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
Apache-2.0
private void offsetIcon(Rect viewBounds) { float startX = viewBounds.centerX() - (mPathBounds.width() / 2); float offsetX = startX - mPathBounds.left; float startY = viewBounds.centerY() - (mPathBounds.height() / 2); float offsetY = startY - (mPathBounds.top); mPath.offset(offs...
Set intrinsic height, which is used by several controls. @param intrinsicHeight
offsetIcon
java
Leaking/WeGit
iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
https://github.com/Leaking/WeGit/blob/master/iconlibrary/src/main/java/com/github/quinn/iconlibrary/IconicFontDrawable.java
Apache-2.0
@Override public TypefaceManager.IconicTypeface getIconicTypeface() { return TypefaceManager.IconicTypeface.ENTYPO.ENTYPO; }
A wrapper for Entypo icon font (http://www.entypo.com).
getIconicTypeface
java
Leaking/WeGit
iconlibrary/src/main/java/com/github/quinn/iconlibrary/icons/EntypoIcon.java
https://github.com/Leaking/WeGit/blob/master/iconlibrary/src/main/java/com/github/quinn/iconlibrary/icons/EntypoIcon.java
Apache-2.0
@Override public int getIconUtfValue() { return mIconUtfValue; }
A wrapper for Entypo icon font (http://www.entypo.com).
getIconUtfValue
java
Leaking/WeGit
iconlibrary/src/main/java/com/github/quinn/iconlibrary/icons/EntypoIcon.java
https://github.com/Leaking/WeGit/blob/master/iconlibrary/src/main/java/com/github/quinn/iconlibrary/icons/EntypoIcon.java
Apache-2.0
@Override public TypefaceManager.IconicTypeface getIconicTypeface() { return TypefaceManager.IconicTypeface.ENTYPO_SOCIAL; }
A wrapper for Entypo-Social icon font (http://www.entypo.com).
getIconicTypeface
java
Leaking/WeGit
iconlibrary/src/main/java/com/github/quinn/iconlibrary/icons/EntypoSocialIcon.java
https://github.com/Leaking/WeGit/blob/master/iconlibrary/src/main/java/com/github/quinn/iconlibrary/icons/EntypoSocialIcon.java
Apache-2.0
@Override public int getIconUtfValue() { return mIconUtfValue; }
A wrapper for Entypo-Social icon font (http://www.entypo.com).
getIconUtfValue
java
Leaking/WeGit
iconlibrary/src/main/java/com/github/quinn/iconlibrary/icons/EntypoSocialIcon.java
https://github.com/Leaking/WeGit/blob/master/iconlibrary/src/main/java/com/github/quinn/iconlibrary/icons/EntypoSocialIcon.java
Apache-2.0
@Override public IconicTypeface getIconicTypeface() { return IconicTypeface.FONT_AWESOME; }
A wrapper for Font Awesome icon font (http://fortawesome.github.com/Font-Awesome/).
getIconicTypeface
java
Leaking/WeGit
iconlibrary/src/main/java/com/github/quinn/iconlibrary/icons/FontAwesomeIcon.java
https://github.com/Leaking/WeGit/blob/master/iconlibrary/src/main/java/com/github/quinn/iconlibrary/icons/FontAwesomeIcon.java
Apache-2.0
@Override public int getIconUtfValue() { return mIconUtfValue; }
A wrapper for Font Awesome icon font (http://fortawesome.github.com/Font-Awesome/).
getIconUtfValue
java
Leaking/WeGit
iconlibrary/src/main/java/com/github/quinn/iconlibrary/icons/FontAwesomeIcon.java
https://github.com/Leaking/WeGit/blob/master/iconlibrary/src/main/java/com/github/quinn/iconlibrary/icons/FontAwesomeIcon.java
Apache-2.0
@Override public IconicTypeface getIconicTypeface() { return IconicTypeface.ICONIC; }
A wrapper for Iconic icon font (http://somerandomdude.com/work/iconic/).
getIconicTypeface
java
Leaking/WeGit
iconlibrary/src/main/java/com/github/quinn/iconlibrary/icons/IconicIcon.java
https://github.com/Leaking/WeGit/blob/master/iconlibrary/src/main/java/com/github/quinn/iconlibrary/icons/IconicIcon.java
Apache-2.0
@Override public int getIconUtfValue() { return mIconUtfValue; }
A wrapper for Iconic icon font (http://somerandomdude.com/work/iconic/).
getIconUtfValue
java
Leaking/WeGit
iconlibrary/src/main/java/com/github/quinn/iconlibrary/icons/IconicIcon.java
https://github.com/Leaking/WeGit/blob/master/iconlibrary/src/main/java/com/github/quinn/iconlibrary/icons/IconicIcon.java
Apache-2.0
public Typeface getTypeface(final Context context) { if (mTypeface == null) { mTypeface = createTypefaceFromResource(context, mTypefaceResourceId); } return mTypeface; }
Loads a {@link Typeface} for the given icon font. {@link Typeface} is loaded only once to avoid memory consumption. @param context @return {@link Typeface}
getTypeface
java
Leaking/WeGit
iconlibrary/src/main/java/com/github/quinn/iconlibrary/utils/TypefaceManager.java
https://github.com/Leaking/WeGit/blob/master/iconlibrary/src/main/java/com/github/quinn/iconlibrary/utils/TypefaceManager.java
Apache-2.0
private static Typeface createTypefaceFromResource(final Context context, final int resource) { Typeface typeface = null; InputStream inputStream = null; OutputStream outputStream = null; try { inputStream = context.getResources().openRawResource(resource); } catch (...
Loads a {@link Typeface} for the given icon font. {@link Typeface} is loaded only once to avoid memory consumption. @param context @return {@link Typeface}
createTypefaceFromResource
java
Leaking/WeGit
iconlibrary/src/main/java/com/github/quinn/iconlibrary/utils/TypefaceManager.java
https://github.com/Leaking/WeGit/blob/master/iconlibrary/src/main/java/com/github/quinn/iconlibrary/utils/TypefaceManager.java
Apache-2.0
private void init(Context context, AttributeSet attributeSet) { TypedArray attr = getTypedArray(context, attributeSet, R.styleable.MaterialMenuView); try { int color = attr.getColor(R.styleable.MaterialMenuView_mm_color, DEFAULT_COLOR); int scale = attr.getInteger(R.styleable.Ma...
A basic View wrapper of {@link MaterialMenuDrawable}. Used for custom view ActionBar or other layouts
init
java
Leaking/WeGit
MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
https://github.com/Leaking/WeGit/blob/master/MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
Apache-2.0
@Override public void draw(Canvas canvas) { super.draw(canvas); if (getPaddingLeft() != 0 || getPaddingTop() != 0) { int saveCount = canvas.getSaveCount(); canvas.save(); canvas.translate(getPaddingLeft(), getPaddingTop()); drawable.draw(canvas); ...
A basic View wrapper of {@link MaterialMenuDrawable}. Used for custom view ActionBar or other layouts
draw
java
Leaking/WeGit
MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
https://github.com/Leaking/WeGit/blob/master/MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
Apache-2.0
@Override public void setPadding(int left, int top, int right, int bottom) { super.setPadding(left, top, right, bottom); adjustDrawablePadding(); }
A basic View wrapper of {@link MaterialMenuDrawable}. Used for custom view ActionBar or other layouts
setPadding
java
Leaking/WeGit
MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
https://github.com/Leaking/WeGit/blob/master/MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
Apache-2.0
@Override protected boolean verifyDrawable(Drawable who) { return who == drawable || super.verifyDrawable(who); }
A basic View wrapper of {@link MaterialMenuDrawable}. Used for custom view ActionBar or other layouts
verifyDrawable
java
Leaking/WeGit
MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
https://github.com/Leaking/WeGit/blob/master/MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
Apache-2.0
@Override public void setState(IconState state) { currentState = state; drawable.setIconState(state); }
A basic View wrapper of {@link MaterialMenuDrawable}. Used for custom view ActionBar or other layouts
setState
java
Leaking/WeGit
MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
https://github.com/Leaking/WeGit/blob/master/MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
Apache-2.0
@Override public IconState getState() { return drawable.getIconState(); }
A basic View wrapper of {@link MaterialMenuDrawable}. Used for custom view ActionBar or other layouts
getState
java
Leaking/WeGit
MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
https://github.com/Leaking/WeGit/blob/master/MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
Apache-2.0
@Override public void animateState(IconState state) { currentState = state; drawable.animateIconState(state, false); }
A basic View wrapper of {@link MaterialMenuDrawable}. Used for custom view ActionBar or other layouts
animateState
java
Leaking/WeGit
MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
https://github.com/Leaking/WeGit/blob/master/MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
Apache-2.0
@Override public void animatePressedState(IconState state) { currentState = state; drawable.animateIconState(state, true); }
A basic View wrapper of {@link MaterialMenuDrawable}. Used for custom view ActionBar or other layouts
animatePressedState
java
Leaking/WeGit
MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
https://github.com/Leaking/WeGit/blob/master/MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
Apache-2.0
@Override public void setColor(int color) { drawable.setColor(color); }
A basic View wrapper of {@link MaterialMenuDrawable}. Used for custom view ActionBar or other layouts
setColor
java
Leaking/WeGit
MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
https://github.com/Leaking/WeGit/blob/master/MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
Apache-2.0
@Override public void setTransformationDuration(int duration) { drawable.setTransformationDuration(duration); }
A basic View wrapper of {@link MaterialMenuDrawable}. Used for custom view ActionBar or other layouts
setTransformationDuration
java
Leaking/WeGit
MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
https://github.com/Leaking/WeGit/blob/master/MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
Apache-2.0
@Override public void setPressedDuration(int duration) { drawable.setPressedDuration(duration); }
A basic View wrapper of {@link MaterialMenuDrawable}. Used for custom view ActionBar or other layouts
setPressedDuration
java
Leaking/WeGit
MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
https://github.com/Leaking/WeGit/blob/master/MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
Apache-2.0
@Override public void setInterpolator(Interpolator interpolator) { drawable.setInterpolator(interpolator); }
A basic View wrapper of {@link MaterialMenuDrawable}. Used for custom view ActionBar or other layouts
setInterpolator
java
Leaking/WeGit
MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
https://github.com/Leaking/WeGit/blob/master/MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
Apache-2.0
@Override public void setAnimationListener(Animator.AnimatorListener listener) { drawable.setAnimationListener(listener); }
A basic View wrapper of {@link MaterialMenuDrawable}. Used for custom view ActionBar or other layouts
setAnimationListener
java
Leaking/WeGit
MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
https://github.com/Leaking/WeGit/blob/master/MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
Apache-2.0
@Override public void setRTLEnabled(boolean rtlEnabled) { drawable.setRTLEnabled(rtlEnabled); }
A basic View wrapper of {@link MaterialMenuDrawable}. Used for custom view ActionBar or other layouts
setRTLEnabled
java
Leaking/WeGit
MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
https://github.com/Leaking/WeGit/blob/master/MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
Apache-2.0
@Override public void setTransformationOffset(MaterialMenuDrawable.AnimationState animationState, float value) { currentState = drawable.setTransformationOffset(animationState, value); }
A basic View wrapper of {@link MaterialMenuDrawable}. Used for custom view ActionBar or other layouts
setTransformationOffset
java
Leaking/WeGit
MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
https://github.com/Leaking/WeGit/blob/master/MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
Apache-2.0
@Override public MaterialMenuDrawable getDrawable() { return drawable; }
A basic View wrapper of {@link MaterialMenuDrawable}. Used for custom view ActionBar or other layouts
getDrawable
java
Leaking/WeGit
MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
https://github.com/Leaking/WeGit/blob/master/MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
Apache-2.0
@Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { int paddingX = getPaddingLeft() + getPaddingRight(); int paddingY = getPaddingTop() + getPaddingBottom(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { widthMeasureSpec = MeasureSpe...
A basic View wrapper of {@link MaterialMenuDrawable}. Used for custom view ActionBar or other layouts
onMeasure
java
Leaking/WeGit
MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
https://github.com/Leaking/WeGit/blob/master/MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
Apache-2.0
@Override protected void onSizeChanged(int w, int h, int oldw, int oldh) { super.onSizeChanged(w, h, oldw, oldh); adjustDrawablePadding(); }
A basic View wrapper of {@link MaterialMenuDrawable}. Used for custom view ActionBar or other layouts
onSizeChanged
java
Leaking/WeGit
MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
https://github.com/Leaking/WeGit/blob/master/MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
Apache-2.0
@Override public Parcelable onSaveInstanceState() { Parcelable superState = super.onSaveInstanceState(); SavedState savedState = new SavedState(superState); savedState.state = currentState; return savedState; }
A basic View wrapper of {@link MaterialMenuDrawable}. Used for custom view ActionBar or other layouts
onSaveInstanceState
java
Leaking/WeGit
MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
https://github.com/Leaking/WeGit/blob/master/MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
Apache-2.0
@Override public void onRestoreInstanceState(Parcelable state) { SavedState savedState = (SavedState) state; super.onRestoreInstanceState(savedState.getSuperState()); setState(savedState.state); }
A basic View wrapper of {@link MaterialMenuDrawable}. Used for custom view ActionBar or other layouts
onRestoreInstanceState
java
Leaking/WeGit
MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
https://github.com/Leaking/WeGit/blob/master/MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
Apache-2.0
private void adjustDrawablePadding() { if (drawable != null) { drawable.setBounds( 0, 0, drawable.getIntrinsicWidth() + getPaddingLeft() + getPaddingRight(), drawable.getIntrinsicHeight() + getPaddingTop() + getPaddingBottom() ); } ...
A basic View wrapper of {@link MaterialMenuDrawable}. Used for custom view ActionBar or other layouts
adjustDrawablePadding
java
Leaking/WeGit
MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
https://github.com/Leaking/WeGit/blob/master/MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
Apache-2.0
private TypedArray getTypedArray(Context context, AttributeSet attributeSet, int[] attr) { return context.obtainStyledAttributes(attributeSet, attr, 0, 0); }
A basic View wrapper of {@link MaterialMenuDrawable}. Used for custom view ActionBar or other layouts
getTypedArray
java
Leaking/WeGit
MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
https://github.com/Leaking/WeGit/blob/master/MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
Apache-2.0
@Override public void writeToParcel(Parcel out, int flags) { super.writeToParcel(out, flags); out.writeString(state.name()); }
A basic View wrapper of {@link MaterialMenuDrawable}. Used for custom view ActionBar or other layouts
writeToParcel
java
Leaking/WeGit
MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
https://github.com/Leaking/WeGit/blob/master/MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
Apache-2.0
@Override public SavedState createFromParcel(Parcel in) { return new SavedState(in); }
A basic View wrapper of {@link MaterialMenuDrawable}. Used for custom view ActionBar or other layouts
createFromParcel
java
Leaking/WeGit
MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
https://github.com/Leaking/WeGit/blob/master/MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
Apache-2.0
@Override public SavedState[] newArray(int size) { return new SavedState[size]; }
A basic View wrapper of {@link MaterialMenuDrawable}. Used for custom view ActionBar or other layouts
newArray
java
Leaking/WeGit
MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
https://github.com/Leaking/WeGit/blob/master/MaterialSearch/src/main/java/com/balysv/materialmenu/ps/MaterialMenuView.java
Apache-2.0
@Override public void onClick(View v) { if (searchOpen) { toggleSearch(); } else { if (menuListener != null) menuListener.onMenuClick(); } }
Create a searchbox with params and a style @param context Context @param attrs Attributes @param defStyle Style
onClick
java
Leaking/WeGit
MaterialSearch/src/main/java/com/quinny898/library/persistentsearch/SearchBox.java
https://github.com/Leaking/WeGit/blob/master/MaterialSearch/src/main/java/com/quinny898/library/persistentsearch/SearchBox.java
Apache-2.0
@Override public void onClick(View v) { toggleSearch(); }
Create a searchbox with params and a style @param context Context @param attrs Attributes @param defStyle Style
onClick
java
Leaking/WeGit
MaterialSearch/src/main/java/com/quinny898/library/persistentsearch/SearchBox.java
https://github.com/Leaking/WeGit/blob/master/MaterialSearch/src/main/java/com/quinny898/library/persistentsearch/SearchBox.java
Apache-2.0
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { if (actionId == EditorInfo.IME_ACTION_SEARCH) { search(getSearchText()); return true; } return false; }
Create a searchbox with params and a style @param context Context @param attrs Attributes @param defStyle Style
onEditorAction
java
Leaking/WeGit
MaterialSearch/src/main/java/com/quinny898/library/persistentsearch/SearchBox.java
https://github.com/Leaking/WeGit/blob/master/MaterialSearch/src/main/java/com/quinny898/library/persistentsearch/SearchBox.java
Apache-2.0
public boolean onKey(View v, int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_ENTER) { if (TextUtils.isEmpty(getSearchText())) { toggleSearch(); } else { search(getSearchText()); } return true; } return false; }
Create a searchbox with params and a style @param context Context @param attrs Attributes @param defStyle Style
onKey
java
Leaking/WeGit
MaterialSearch/src/main/java/com/quinny898/library/persistentsearch/SearchBox.java
https://github.com/Leaking/WeGit/blob/master/MaterialSearch/src/main/java/com/quinny898/library/persistentsearch/SearchBox.java
Apache-2.0
@Override public void onClick(View v) { if (voiceRecognitionListener != null) { voiceRecognitionListener.onClick(); } else { micClick(); } }
Create a searchbox with params and a style @param context Context @param attrs Attributes @param defStyle Style
onClick
java
Leaking/WeGit
MaterialSearch/src/main/java/com/quinny898/library/persistentsearch/SearchBox.java
https://github.com/Leaking/WeGit/blob/master/MaterialSearch/src/main/java/com/quinny898/library/persistentsearch/SearchBox.java
Apache-2.0
@Override public void onClick(View v) { popupMenu.show(); }
Create a searchbox with params and a style @param context Context @param attrs Attributes @param defStyle Style
onClick
java
Leaking/WeGit
MaterialSearch/src/main/java/com/quinny898/library/persistentsearch/SearchBox.java
https://github.com/Leaking/WeGit/blob/master/MaterialSearch/src/main/java/com/quinny898/library/persistentsearch/SearchBox.java
Apache-2.0
@Override public void afterTextChanged(Editable s) { if (s.length() > 0) { micStateChanged(false); mic.setImageDrawable(getContext().getResources().getDrawable( R.drawable.ic_clear)); updateResults(); } else { micStateChanged(true); mic.setImageDrawable(getContext().getResourc...
Create a searchbox with params and a style @param context Context @param attrs Attributes @param defStyle Style
afterTextChanged
java
Leaking/WeGit
MaterialSearch/src/main/java/com/quinny898/library/persistentsearch/SearchBox.java
https://github.com/Leaking/WeGit/blob/master/MaterialSearch/src/main/java/com/quinny898/library/persistentsearch/SearchBox.java
Apache-2.0
@Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { }
Create a searchbox with params and a style @param context Context @param attrs Attributes @param defStyle Style
beforeTextChanged
java
Leaking/WeGit
MaterialSearch/src/main/java/com/quinny898/library/persistentsearch/SearchBox.java
https://github.com/Leaking/WeGit/blob/master/MaterialSearch/src/main/java/com/quinny898/library/persistentsearch/SearchBox.java
Apache-2.0
@Override public void onTextChanged(CharSequence s, int start, int before, int count) { }
Create a searchbox with params and a style @param context Context @param attrs Attributes @param defStyle Style
onTextChanged
java
Leaking/WeGit
MaterialSearch/src/main/java/com/quinny898/library/persistentsearch/SearchBox.java
https://github.com/Leaking/WeGit/blob/master/MaterialSearch/src/main/java/com/quinny898/library/persistentsearch/SearchBox.java
Apache-2.0