List of usage examples for android.animation LayoutTransition enableTransitionType
public void enableTransitionType(int transitionType)
From source file:com.google.android.media.tv.companionlibrary.ChannelSetupFragment.java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(getLayoutResourceId(), container, false); // Make sure this view is focused view.requestFocus();/*from w w w. j a va 2 s . c o m*/ mProgressBar = (ProgressBar) view.findViewById(R.id.tune_progress); mScanningMessage = (TextView) view.findViewById(R.id.tune_description); mTitle = (TextView) view.findViewById(R.id.tune_title); mBadge = (ImageView) view.findViewById(R.id.tune_icon); mChannelHolder = view.findViewById(R.id.channel_holder); mCancelButton = (Button) view.findViewById(R.id.tune_cancel); ListView channelList = (ListView) view.findViewById(R.id.channel_list); mAdapter = new ChannelAdapter(); channelList.setAdapter(mAdapter); channelList.setOnItemClickListener(null); ViewGroup progressHolder = (ViewGroup) view.findViewById(R.id.progress_holder); LayoutTransition transition = new LayoutTransition(); transition.enableTransitionType(LayoutTransition.CHANGING); progressHolder.setLayoutTransition(transition); mCancelButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { finishScan(false); } }); LocalBroadcastManager.getInstance(getActivity()).registerReceiver(mSyncStatusChangedReceiver, new IntentFilter(EpgSyncJobService.ACTION_SYNC_STATUS_CHANGED)); mChannelScanLayout = view; setChannelListVisibility(false); setBackgroundColor(getResources().getColor(android.R.color.holo_blue_dark)); return view; }
From source file:io.digibyte.tools.animation.BRAnimator.java
public static LayoutTransition getDefaultTransition() { LayoutTransition itemLayoutTransition = new LayoutTransition(); itemLayoutTransition.setStartDelay(LayoutTransition.APPEARING, 0); itemLayoutTransition.setStartDelay(LayoutTransition.DISAPPEARING, 0); itemLayoutTransition.setStartDelay(LayoutTransition.CHANGE_APPEARING, 0); itemLayoutTransition.setStartDelay(LayoutTransition.CHANGE_DISAPPEARING, 0); itemLayoutTransition.setStartDelay(LayoutTransition.CHANGING, 0); itemLayoutTransition.setDuration(100); itemLayoutTransition.setInterpolator(LayoutTransition.CHANGING, new OvershootInterpolator(2f)); Animator scaleUp = ObjectAnimator.ofPropertyValuesHolder((Object) null, PropertyValuesHolder.ofFloat(View.SCALE_X, 1, 1), PropertyValuesHolder.ofFloat(View.SCALE_Y, 0, 1)); scaleUp.setDuration(50);//from ww w . ja v a 2 s . c o m scaleUp.setStartDelay(50); Animator scaleDown = ObjectAnimator.ofPropertyValuesHolder((Object) null, PropertyValuesHolder.ofFloat(View.SCALE_X, 1, 1), PropertyValuesHolder.ofFloat(View.SCALE_Y, 1, 0)); scaleDown.setDuration(2); itemLayoutTransition.setAnimator(LayoutTransition.APPEARING, scaleUp); itemLayoutTransition.setAnimator(LayoutTransition.DISAPPEARING, null); itemLayoutTransition.enableTransitionType(LayoutTransition.CHANGING); return itemLayoutTransition; }
From source file:com.ywesee.amiko.MainActivity.java
@TargetApi(16) void setLayoutTransition() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { LayoutTransition lt = new LayoutTransition(); lt.enableTransitionType(LayoutTransition.CHANGING); lt.setDuration(LayoutTransition.APPEARING, 100 /*500*/); lt.setDuration(LayoutTransition.DISAPPEARING, 100); mViewHolder.setLayoutTransition(lt); }//w w w . j av a 2 s. co m }