當前位置: 首頁>>代碼示例>>Java>>正文


Java ViewSwitcher.setOutAnimation方法代碼示例

本文整理匯總了Java中android.widget.ViewSwitcher.setOutAnimation方法的典型用法代碼示例。如果您正苦於以下問題:Java ViewSwitcher.setOutAnimation方法的具體用法?Java ViewSwitcher.setOutAnimation怎麽用?Java ViewSwitcher.setOutAnimation使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.widget.ViewSwitcher的用法示例。


在下文中一共展示了ViewSwitcher.setOutAnimation方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: PinView

import android.widget.ViewSwitcher; //導入方法依賴的package包/類
public PinView(Context context, PinListener listener, String pin, int layoutId) {
       this.context = context;
	this.listener = listener;
	this.confirmPin = pin == null;
	this.pin1 = pin;
	LayoutInflater layoutInflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
	v = layoutInflater.inflate(layoutId, null);
	for (int id : buttons) {
		v.findViewById(id).setOnClickListener(this);
	}
	result = (TextView)v.findViewById(R.id.result1);		
	switcher = (ViewSwitcher)v.findViewById(R.id.switcher);  
	switcher.setInAnimation(inFromRightAnimation());
	switcher.setOutAnimation(outToLeftAnimation());		
	try {
		digest = MessageDigest.getInstance("SHA-1");
	} catch (NoSuchAlgorithmException e) {
		throw new RuntimeException(e);
	}
       this.vibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);
}
 
開發者ID:tiberiusteng,項目名稱:financisto1-holo,代碼行數:22,代碼來源:PinView.java

示例2: AbsImageListViewItem

import android.widget.ViewSwitcher; //導入方法依賴的package包/類
public AbsImageListViewItem(Context context, int layoutID, int imageviewID, int switcherID, ScrollSpeedAdapter adapter) {
    super(context);

    LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    inflater.inflate(layoutID, this, true);

    mImageView = (ImageView) findViewById(imageviewID);
    mSwitcher = (ViewSwitcher) findViewById(switcherID);

    mHolder = new AsyncLoader.CoverViewHolder();
    mHolder.coverLoadable = this;
    mHolder.mAdapter = adapter;
    mHolder.imageDimension = new Pair<>(0,0);

    mCoverDone = false;
    if ( null != mImageView && null != mSwitcher) {
        mSwitcher.setOutAnimation(null);
        mSwitcher.setInAnimation(null);
        mImageView.setImageDrawable(null);
        mSwitcher.setDisplayedChild(0);
        mSwitcher.setOutAnimation(AnimationUtils.loadAnimation(getContext(), android.R.anim.fade_out));
        mSwitcher.setInAnimation(AnimationUtils.loadAnimation(getContext(), android.R.anim.fade_in));
    }
}
 
開發者ID:gateship-one,項目名稱:malp,代碼行數:25,代碼來源:AbsImageListViewItem.java

示例3: updateAnimation

import android.widget.ViewSwitcher; //導入方法依賴的package包/類
private void updateAnimation() {
    View view = getView();
    if (view == null) {
        return;
    }

    ViewSwitcher viewSwitcher = (ViewSwitcher) view;
    if (viewSwitcher.getInAnimation() != mInAnimation || mInAnimation == null) {
        if (mInAnimation == null) {
            mInAnimation = AnimationFactory.pushDownIn();
        }
        if (viewSwitcher instanceof TextSwitcher) {
            mInAnimation.setAnimationListener(mTextViewInAnimationListener);
        }
        mInAnimation.setDuration(mInDuration);
        viewSwitcher.setInAnimation(mInAnimation);
    }
    if (viewSwitcher.getOutAnimation() != mOutAnimation || mOutAnimation == null) {
        if (mOutAnimation == null) {
            mOutAnimation = AnimationFactory.pushDownOut();
        }
        mOutAnimation.setDuration(mOutDuration);
        viewSwitcher.setOutAnimation(mOutAnimation);
    }
}
 
開發者ID:lamydev,項目名稱:Android-Notification,代碼行數:26,代碼來源:ViewSwitcherWrapper.java

示例4: getView

import android.widget.ViewSwitcher; //導入方法依賴的package包/類
public View getView(LayoutInflater inflater, Setting setting, View convertView, Context context) {
	
	// reuse if view already created
	//if (mView != null) return mView;

	// re-create view every time to disable unwanted animation every time window is opened
	mSliderRenderer = null;
	mBaseRenderer = null;
	mChildView = -1;
	
	mInflater = inflater;
	mContext = context;
	mSetting = (RangeSetting) setting;
	RangeSetting rangeSetting = (RangeSetting) setting;
	
	LinearLayout view = /*mView =*/ (LinearLayout) inflater.inflate(R.layout.row_switchable_slider_view, null);
	
	ViewSwitcher switcher = mSwitcher = (ViewSwitcher) view.findViewById(R.id.switcher);
	switcher.setOutAnimation(AnimationUtils.loadAnimation(mContext, R.anim.slide_out_down));
	switcher.setInAnimation(AnimationUtils.loadAnimation(mContext, R.anim.slide_in_up));
	switcher.setAnimateFirstView(false);
	
	ToggleButton toggle = mToggle = (ToggleButton) view.findViewById(R.id.toggle);
	toggle.setOnClickListener(this);
	
	// initialize currently active view
	updateView(rangeSetting, toggle);
	
	return view;
}
 
開發者ID:sdrausty,項目名稱:buildAPKsApps,代碼行數:31,代碼來源:SwitchableSliderRenderer.java

示例5: onCreate

import android.widget.ViewSwitcher; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    applyTheme();

    if (getSupportActionBar() != null)
        getSupportActionBar().setElevation(0);

    setContentView(R.layout.style_horizontal_tabs);

    init();

    mTabs = (HorizontalScrollView) findViewById(R.id.steps);
    mStepTabs = (LinearLayout) mTabs.findViewById(R.id.stepTabs);
    mSwitch = (ViewSwitcher) findViewById(R.id.stepSwitcher);
    mError = (TextView) findViewById(R.id.stepError);
    mPreviousButton = (TextView) findViewById(R.id.stepPrev);

    mContinue = (Button) findViewById(R.id.continueButton);
    mContinue.setTextColor(primaryColor);
    mContinue.setOnClickListener(this);

    mSwitch.setDisplayedChild(0);
    mSwitch.setInAnimation(TabStepper.this, R.anim.in_from_bottom);
    mSwitch.setOutAnimation(TabStepper.this, R.anim.out_to_bottom);

    mLinearity = new LinearityChecker(mSteps.total());

    if (!showPrevButton)
        mPreviousButton.setVisibility(View.GONE);

    mPreviousButton.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            onPrevious();
        }
    });

    onUpdate();
}
 
開發者ID:fcannizzaro,項目名稱:material-stepper,代碼行數:41,代碼來源:TabStepper.java

示例6: switchWithoutAnimation

import android.widget.ViewSwitcher; //導入方法依賴的package包/類
private void switchWithoutAnimation(ViewSwitcher switcher) {
    if (switcher.getDisplayedChild() != 0) {
        Animation in = switcher.getInAnimation();
        Animation out = switcher.getOutAnimation();

        switcher.setInAnimation(null);
        switcher.setOutAnimation(null);

        switcher.setDisplayedChild(0);
        switcher.setInAnimation(in);
        switcher.setOutAnimation(out);
    };
}
 
開發者ID:twotoasters,項目名稱:SectionCursorAdapter,代碼行數:14,代碼來源:ToastersAdapter.java

示例7: recycleViewSwitcher

import android.widget.ViewSwitcher; //導入方法依賴的package包/類
private void recycleViewSwitcher(ViewSwitcher viewSwitcher) {
    //disable animation for immediately and undetectable switching to zero child:
    viewSwitcher.clearAnimation();
    viewSwitcher.setInAnimation(null);
    viewSwitcher.setOutAnimation(null);
    viewSwitcher.setDisplayedChild(0);
}
 
開發者ID:RandoApp,項目名稱:Rando-android,代碼行數:8,代碼來源:RandoListAdapter.java


注:本文中的android.widget.ViewSwitcher.setOutAnimation方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。