当前位置: 首页>>代码示例>>Java>>正文


Java ViewSwitcher.setInAnimation方法代码示例

本文整理汇总了Java中android.widget.ViewSwitcher.setInAnimation方法的典型用法代码示例。如果您正苦于以下问题:Java ViewSwitcher.setInAnimation方法的具体用法?Java ViewSwitcher.setInAnimation怎么用?Java ViewSwitcher.setInAnimation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.widget.ViewSwitcher的用法示例。


在下文中一共展示了ViewSwitcher.setInAnimation方法的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.setInAnimation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。