direktori cari
android Manifest Manifest.permission Manifest.permission_group android.accessibilityservice AccessibilityService android.accounts Account android.app NotificationManager android.bluetooth BluetoothAdapter BluetoothClass BluetoothClass.Device BluetoothClass.Device.Major BluetoothClass.Service BluetoothDevice BluetoothServerSocket BluetoothSocket android.content SharedPreferences android.database.sqlite SQLiteCursorDriver SQLiteOpenHelper android.graphics Bitmap android.location LocationListener Geocoder GpsStatus GpsStatus.Listener GpsStatus.NmeaListener GpsSatellite android.media AudioFormat AsyncPlayer AudioRecord AudioRecord.OnRecordPositionUpdateListener ThumbnailUtils AudioManager android.net TrafficStats MailTo LocalSocket android.os AsyncTask AsyncTask.Status CountDownTimer Message MessageQueue HandlerThread android.text Html android.util JsonWriter android.view ContextMenu ContextMenu.ContextMenuInfo Display ViewManager View ViewStub ViewTreeObserver ViewParent WindowManager GestureDetector Gravity MenuInflater ScaleGestureDetector SoundEffectConstants android.view.inputmethod InputConnection InputMethod InputMethodSession BaseInputConnection InputMethodManager android.widget AbsListView AbsListView.LayoutParams AbsListView.OnScrollListener AbsListView.RecyclerListener AbsoluteLayout AbsoluteLayout.LayoutParams AbsSeekBar AbsSpinner AdapterView AdapterView.AdapterContextMenuInfo AdapterView.OnItemLongClickListener AdapterView.OnItemSelectedListener AdapterView.OnItemClickListener AnalogClock BaseAdapter BaseExpandableListAdapter Button CheckBox CheckedTextView Checkable Chronometer Chronometer.OnChronometerTickListener CompoundButton CompoundButton.OnCheckedChangeListener CursorAdapter CursorTreeAdapter DatePicker DatePicker.OnDateChangedListener DialerFilter DigitalClock EditText Filter Filter.FilterListener Filter.FilterResults ExpandableListAdapter ExpandableListView.OnChildClickListener ExpandableListView.OnGroupClickListener ExpandableListView.OnGroupCollapseListener ExpandableListView.OnGroupExpandListener Filterable Gallery Gallery.LayoutParams GridView GridLayout GridLayout.Alignment RadioGroup ImageView ImageView.ScaleType HorizontalScrollView ImageButton ImageSwitcher FilterQueryProvider ListAdapter ListView MediaController MultiAutoCompleteTextView MultiAutoCompleteTextView.CommaTokenizer MultiAutoCompleteTextView.Tokenizer QuickContactBadge RadioButton RatingBar RatingBar.OnRatingBarChangeListener RelativeLayout RemoteViews ResourceCursorAdapter ResourceCursorTreeAdapter Scroller ScrollView SearchView SearchView.OnCloseListener SearchView.OnQueryTextListener SearchView.OnSuggestionListener SeekBar SeekBar.OnSeekBarChangeListener SimpleAdapter SimpleAdapter.ViewBinder SimpleCursorAdapter SimpleCursorAdapter.CursorToStringConverter SimpleCursorAdapter.ViewBinder SimpleCursorTreeAdapter SimpleCursorTreeAdapter.ViewBinder SimpleExpandableListAdapter SlidingDrawer SlidingDrawer.OnDrawerCloseListener SlidingDrawer.OnDrawerOpenListener SlidingDrawer.OnDrawerScrollListener Spinner SpinnerAdapter WrapperListAdapter TabHost TabHost.TabSpec TextView TimePicker TimePicker.OnTimeChangedListener Toast TableLayout TableLayout.LayoutParams TableRow TableRow.LayoutParams TabWidget TextSwitcher ToggleButton TwoLineListItem VideoView ViewAnimator ViewFlipper ViewSwitcher ViewSwitcher.ViewFactory ZoomButtonsController ZoomButtonsController.OnZoomListener ZoomButton ZoomControls dalvik.system DexFile
watak


AbsSeekBar

版本:Android 2.2 r1

 

public abstract class AbsSeekBar extends ProgressBar

 

java.lang.Object

         android.view.View

                android.widget.ProgressBar

                            android.widget.AbsSeekBar

 

概述

        

         此类为抽象类。供拖动条SeekBar和评分条RatingBar继承。

 

公共方法       

         public int getKeyProgressIncrement ()

返回方向键改变后的进度值

默认情况下此值是根据最大值而得出的。

返回值

当用户按下方向键后减少或增加之后的进度值。这个进度值是正数。

 

public int getThumbOffset ()

参见

setThumbOffset(int)

 

public boolean onKeyDown (int keyCode, KeyEvent event)

默认实现KeyEvent.Callback.onKeyMultiple():如果视图已启用并且可点击,当KEYCODE_DPAD_CENTER或者KEYCODE_ENTER被释放时,执行按下(Down)此视图的操作。

参数

keyCode   KeyEvent中用于表示按键被按下的识别码

event        按键操作中定义的KeyEvent对象

返回值

假如你已经处理了当前事件,返回true。假如你想继续让下一个事件接收者(receiver)处理,则返回false

 

public boolean onTouchEvent (MotionEvent event)

实现这个方法来处理触摸屏幕引发的事件。

参数

event        动作事件

返回值

如果事件已经处理返回True,否则返回false

 

public void setKeyProgressIncrement (int increment)

设置使用方向键更改进度时每次的增加值(注:设置此值后,使用按键修改进度值时,每次增加或减少increment大小的幅度)

参数

increment       The amount to increment or decrement when the user presses the arrow keys.

increment         当用户按下指示键时增加或减少的值

 

public synchronized void setMax (int max)

设置进度条的范围,从0max

参数

max           进度条的最大值

 

public void setThumb (Drawable thumb)

设置可绘制对象thumbSeekBar中显示的进度表的结束位置的图案(注:例如下图)

 

如果thumb是一个有效的可绘制对象(例如不是null值),那么需要设置thumb的偏移量为他的一半宽度(参见setThumbOffset(int)

参数

thumb   可绘制对象

 

public void setThumbOffset (int thumbOffset)

设置thumb的偏移量允许thumb扩展超出轨道的范围

参数

thumbOffset    以像素为单位的偏移量

                                     (注:例如下图,两图同样取SeekBar的最大值)

默认Offsetthumb的一半时:

setThumbOffset(0)时:

 

受保护方法

         protected boolean verifyDrawable (Drawable who)

如果你的视图子类显示他自己的可视化对象,他将要重写此方法并且为了显示可绘制返回true。此操作允许进行绘制时有动画效果。

确认当重写从方法时,需调用父类相应方法。(注:即记得调用super.verifyDrawable(who)

参数

who           需判断的可绘制对象(Drawable)。如果是你要显示的对象,返回True,否则返回调用父类的结果。         

返回值

如果可绘制对象(Drawable)已经在视图中显示,返回True否则返回false。并且此处不允许使用动画。


Artikel sebelumnya: Artikel seterusnya: