亚洲国产日韩欧美一区二区三区,精品亚洲国产成人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
文字


TextSwitcher

版本:Android 2.2 r1

?

public class TextSwitcher extends ViewSwitcher

?

java.lang.Object

???????? android.view.View

? ???? ???????? android.view.ViewGroup

??????????????????????????? android.widget.FrameLayout

???????????????????????????????????? android.widget.ViewAnimator

? ???? ?????? ??????????????????????????? android.widget.ViewSwitcher

? ???? ?????? ?????? ??????????????????????????? android.widget.TextSwitcher

?

概述

????????

???????? ViewSwitcher僅僅包含子類型TextView。TextSwitcher被用來使屏幕上的label產(chǎn)生動畫效果。每當(dāng)setText(CharSequence)被調(diào)用時,TextSwitcher使用動畫方式將當(dāng)前的文字內(nèi)容消失并顯示新的文字內(nèi)容。

?

構(gòu)造函數(shù)

???????? public TextSwitcher (Context context)

???????? 創(chuàng)建一個新的空TextSwitcher

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

context? 應(yīng)用程序上下文

?

???????? public TextSwitcher (Context context, AttributeSet attrs)

???????? 使用提供的contextattributes來創(chuàng)建一個空的TextSwitcher

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

??????????????????????????? context? 應(yīng)用程序環(huán)境

??????????????????????????? attrs?????????????????? 屬性集合

?

公共方法???????

???????? public void addView (View child, int index, ViewGroup.LayoutParams params)

???????? 根據(jù)指定的布局參數(shù)新增一個子視圖

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

??????????????????????????? child????????? 新增的子視圖

??????????????????????????? index???????? 新增子視圖的位置

??????????????????????????? params??? 新增子視圖的布局參數(shù)

???????? 拋出異常

?????????????????? IllegalArgumentException?????? 當(dāng)子視圖不是一個TextView實例時

?

???????? public void setCurrentText (CharSequence text)

???????? 設(shè)置當(dāng)前顯示的文本視圖的文字內(nèi)容。非動畫方式顯示。

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

??????????????????????????? text?????????? 需要顯示的新文本內(nèi)容

?

???????? public void setText (CharSequence text)

???????? 設(shè)置下一視圖的文本內(nèi)容并切換到下一視圖??梢詣赢嫷耐顺霎?dāng)前文本內(nèi)容,顯示下一文本內(nèi)容。

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

??????????????????????????? text?????????? 需要顯示的新文本內(nèi)容

?

示例

???????? 摘自APIDemos->View->TextSwitcher

Java:

public class TextSwitcher1 extends Activity implements ViewSwitcher.ViewFactory,

??????? View.OnClickListener {

?

??? private TextSwitcher mSwitcher;

??? private int mCounter = 0;

?

??? @Override

??? protected void onCreate(Bundle savedInstanceState) {

??????? super.onCreate(savedInstanceState);

?

??????? setContentView(R.layout.text_switcher_1);

?

??????? mSwitcher = (TextSwitcher) findViewById(R.id.switcher);

??????? mSwitcher.setFactory(this);

?

??????? Animation in = AnimationUtils.loadAnimation(this,

??????????????? android.R.anim.fade_in);

??????? Animation out = AnimationUtils.loadAnimation(this,

??????????????? android.R.anim.fade_out);

??????? mSwitcher.setInAnimation(in);

??????? mSwitcher.setOutAnimation(out);

?

? ??????Button nextButton = (Button) findViewById(R.id.next);

??????? nextButton.setOnClickListener(this);

?

??????? updateCounter();

??? }

?

??? public void onClick(View v) {

??????? mCounter++;

??????? updateCounter();

??? }

?

??? private void updateCounter() {

??????? mSwitcher.setText(String.valueOf(mCounter));

??? }

?

??? public View makeView() {

??????? TextView t = new TextView(this);

??????? t.setGravity(Gravity.TOP | Gravity.CENTER_HORIZONTAL);

??????? t.setTextSize(36);

??????? return t;

??? }

}

?

Xml:

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

??? android:layout_width="match_parent"

??? android:layout_height="match_parent"

??? android:orientation="vertical">

??? <Button android:id="@+id/next"

??????? android:layout_width="wrap_content"

??????? android:layout_height="wrap_content"

??????? android:text="@string/text_switcher_1_next_text" />

??? <TextSwitcher android:id="@+id/switcher"

??????? android:layout_width="match_parent"

??????? android:layout_height="wrap_content" />

</LinearLayout>


上一篇: 下一篇: