Available Methods
- setBounds ( )
- draw ( )
- getIntrinsicWidth ( )
- getIntrinsicHeight ( )
- setColorFilter ( )
- setState ( )
- isStateful ( )
- setCallback ( )
- mutate ( )
- getBounds ( )
- getOpacity ( )
- setAlpha ( )
- getPadding ( )
- ConstantState ( )
- createFromStream ( )
- setTint ( )
- getMinimumHeight ( )
- setDither ( )
- getConstantState ( )
- setVisible ( )
- copyBounds ( )
- clearColorFilter ( )
- setLevel ( )
- getMinimumWidth ( )
- invalidateSelf ( )
- setTintList ( )
- getCurrent ( )
- jumpToCurrentState ( )
- Callback ( )
- setFilterBitmap ( )
- createFromPath ( )
- setHotspotBounds ( )
- setLayoutDirection ( )
- setTintMode ( )
- isAutoMirrored ( )
- getLevel ( )
- getAlpha ( )
- resolveOpacity ( )
- createFromResourceStream ( )
- equals ( )
- parseTintMode ( )
Related Classes
- java.io.File
- android.os.Bundle
- android.content.Context
- android.view.View
- android.util.Log
- android.widget.TextView
- android.content.Intent
- android.view.ViewGroup
- android.app.Activity
- android.view.LayoutInflater
- android.os.Build
- android.widget.Toast
- android.util.AttributeSet
- android.widget.ImageView
- android.graphics.Color
- android.net.Uri
- android.graphics.Canvas
- android.view.MenuItem
- android.graphics.Bitmap
- android.text.TextUtils
- android.graphics.Paint
- android.widget.LinearLayout
- android.content.pm.PackageManager
- android.content.res.TypedArray
- android.support.annotation.Nullable
Java Code Examples for android.graphics.drawable.Drawable#getLevel()
The following examples show how to use
android.graphics.drawable.Drawable#getLevel() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FixedTabIndicator.java From DropDownMenu with Apache License 2.0 | 5 votes |
private void switchTab(int pos) { TextView tv = getChildAtCurPos(pos); Drawable drawable = tv.getCompoundDrawables()[2]; int level = drawable.getLevel(); if (mOnItemClickListener != null) { mOnItemClickListener.onItemClick(tv, pos, level == 1); } if (mLastIndicatorPosition == pos) { // 点击同一个条目时 tv.setTextColor(level == 0 ? mTabSelectedColor : mTabDefaultColor); drawable.setLevel(1 - level); return; } mCurrentIndicatorPosition = pos; resetPos(mLastIndicatorPosition); //highLightPos(pos); tv.setTextColor(mTabSelectedColor); tv.getCompoundDrawables()[2].setLevel(1); mLastIndicatorPosition = pos; }
Example 2
Source File: DrawerView.java From material-drawer with MIT License | 4 votes |
@Override public Integer get(Drawable object) { return object.getLevel(); }