亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

ディレクトリ 検索
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
テキスト


CompoundButton

翻譯署名:德羅德

譯者博客:sparkrico.javaeye.com

版本:Android 2.2 r1

?

public abstract class CompoundButton extends Button implements Checkable

?

java.lang.Object

android.view.View

? ???? ???????? android.widget.TextView

? ???? ?????? ???????? android.widget.Button

? ???? ?????? ?????? ???????? android.widget.CompoundButton

?

間接子類

???????? CheckBox, RadioButton, ToggleButton

?

概述

???????? 一個(gè)帶有選中/未選中狀態(tài)的按鈕。當(dāng)按鈕按下或點(diǎn)中時(shí)自動(dòng)改變狀態(tài)。

?

公共方法

???????? public boolean dispatchPopulateAccessibilityEvent (AccessibilityEvent event)

???????? 在子視圖的構(gòu)建時(shí)分派一個(gè)輔助事件。(譯者注:通過源碼可以看出,視圖構(gòu)建時(shí)設(shè)置其選中狀態(tài)。)

?????????????????? 參數(shù)

??????????????????????????? event ????? 事件

?????????????????? 返回值

??????????????????????????? 如果事件全部完成返回True

?

???????? public boolean isChecked ()

???????? (譯者注:是否選中)

?

???????? public void onRestoreInstanceState (Parcelable state)

???????? 允許視圖重新應(yīng)用以前通過onSaveInstanceState()生成代表內(nèi)部的狀態(tài)。這個(gè)函數(shù)決不調(diào)用一個(gè)空的狀態(tài)。

?????????????????? 參數(shù)

??????????????????????????? state ????? 返回以前調(diào)用onSaveInstanceState()保存下來的狀態(tài)。

?

???????? public Parcelable onSaveInstanceState ()

???????? 允許視圖生成一個(gè)代表內(nèi)部的狀態(tài),以后可用于創(chuàng)建一個(gè)與之相同的新的實(shí)例。這種狀態(tài)應(yīng)該只包含非持久或以后不能夠重建的信息。例如,你決不存儲(chǔ)你當(dāng)前在屏幕上的位置,因?yàn)檫@會(huì)在視圖的層面上重新計(jì)算放置一個(gè)新的實(shí)例。

???????? 你可以存儲(chǔ)到這里的一些例子:一個(gè)文本框中當(dāng)前光標(biāo)的位置(但通常不是文字本身,文字通常保存在內(nèi)容提供者(content provider)或其他持久的儲(chǔ)存中),一個(gè)列表視圖中的當(dāng)前選中項(xiàng)。

?????????????????? 返回值

??????????????????????????? 返回一個(gè)包含視圖當(dāng)前狀態(tài)的Parcelable對(duì)象,或沒有什么狀態(tài)保存時(shí)返回null。默認(rèn)實(shí)現(xiàn)返回null

?

???????? public boolean performClick ()

???????? 如果視圖定義了OnClickListener監(jiān)聽器,調(diào)用此方法來執(zhí)行。

?????????????????? 返回值

??????????????????????????? 定義了的OnClickListener被調(diào)用返回True,否則返回False

?

???????? public void setButtonDrawable (Drawable d)

???????? 給按鈕背景設(shè)置一個(gè)可繪制對(duì)象(如:圖像)

?????????????????? 參數(shù)

??????????????????????????? d ???? 用作背景的可繪制對(duì)象(如:圖像)

?

???????? public void setButtonDrawable (int resid)

???????? 通過資源Id給按鈕背景設(shè)置一個(gè)圖像

???????? ???????? 參數(shù)

??????????????????????????? resid ?????? 作為背景圖像的資源id

?

???????? public void setChecked (boolean checked)

???????? 改變按鈕的選中狀態(tài)

???????? ???????? 參數(shù)

?????????????????? ???????? checked true選中,false非選中

?

???????? public void setOnCheckedChangeListener (CompoundButton.OnCheckedChangeListener listener)

???????? 注冊(cè)一個(gè)在按鈕狀態(tài)發(fā)生改變時(shí)執(zhí)行的回調(diào)函數(shù)

?????????????????? 參數(shù)

??????????????????????????? listener ? 當(dāng)選中狀態(tài)改變時(shí)調(diào)用的函數(shù)

?

???????? public void toggle ()

???????? 改變選中狀態(tài)為當(dāng)前狀態(tài)的逆狀態(tài)

?

受保護(hù)方法

???????? protected void drawableStateChanged ()

???????? 在視圖狀態(tài)的變化影響到所顯示可繪制的狀態(tài)時(shí)調(diào)用這個(gè)方法。

確保在重載時(shí)中調(diào)用父類方法

?

???????? protected int[] onCreateDrawableState (int extraSpace)

???????? 為當(dāng)前視圖生成新的可繪圖區(qū)狀態(tài)。這個(gè)方式當(dāng)緩存的圖像繪圖區(qū)狀態(tài)確定失效時(shí)通過視圖系統(tǒng)調(diào)用。你可以使用getDrawableState()方法重新取得當(dāng)前的狀態(tài)。

?????????????????? 參數(shù)

??????????????????????????? extraSpace ???? 如果為非零,這是你應(yīng)該返回的數(shù)組在你可以存放你的狀態(tài)的額外條目的數(shù)量。

?????????????????? 返回值

??????????????????????????? 返回一個(gè)記錄著視圖中當(dāng)前繪圖區(qū)狀態(tài)的數(shù)組

?

???????? protected void onDraw (Canvas canvas)

???????? 實(shí)現(xiàn)你自己的繪制。

?????????????????? 參數(shù)

??????????????????????????? canvas ?? 在畫布上繪制背景

?

???????? protected boolean verifyDrawable (Drawable who)

???????? 如果你的視圖子類顯示他自己的可視化對(duì)象,他將要重寫此方法并且為了顯示可繪制返回true。此操作允許進(jìn)行繪制時(shí)有動(dòng)畫效果。

  確認(rèn)當(dāng)重寫從方法時(shí),需調(diào)用父類相應(yīng)方法。

?????????????????? 參數(shù)

??????????????????????????? who ??????? 需判斷的可繪制對(duì)象(Drawable)。如果是你要顯示的對(duì)象,返回True,否則返回調(diào)用父類的結(jié)果。

?????????????????? 返回值

??????????????????????????? boolean 如果可繪制對(duì)象(Drawable)已經(jīng)在視圖中顯示,返回True否則返回false。并且此處不允許使用動(dòng)畫。


前の記事: 次の記事: