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


Java LayoutTransition.enableTransitionType方法代码示例

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


在下文中一共展示了LayoutTransition.enableTransitionType方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: enableLayoutTransitions

import android.animation.LayoutTransition; //导入方法依赖的package包/类
private void enableLayoutTransitions() {
    LayoutTransition transition = getLayoutTransition();
    transition.enableTransitionType(LayoutTransition.APPEARING);
    transition.enableTransitionType(LayoutTransition.DISAPPEARING);
    transition.enableTransitionType(LayoutTransition.CHANGE_APPEARING);
    transition.enableTransitionType(LayoutTransition.CHANGE_DISAPPEARING);
}
 
开发者ID:RunasSudo,项目名称:FLauncher,代码行数:8,代码来源:PageIndicator.java

示例2: setupLayoutTransition

import android.animation.LayoutTransition; //导入方法依赖的package包/类
private void setupLayoutTransition() {
    // We want to show layout transitions when pages are deleted, to close the gap.
    mLayoutTransition = new LayoutTransition();
    mLayoutTransition.enableTransitionType(LayoutTransition.DISAPPEARING);
    mLayoutTransition.enableTransitionType(LayoutTransition.CHANGE_DISAPPEARING);
    mLayoutTransition.disableTransitionType(LayoutTransition.APPEARING);
    mLayoutTransition.disableTransitionType(LayoutTransition.CHANGE_APPEARING);
    setLayoutTransition(mLayoutTransition);
}
 
开发者ID:RunasSudo,项目名称:FLauncher,代码行数:10,代码来源:Workspace.java

示例3: init

import android.animation.LayoutTransition; //导入方法依赖的package包/类
private void init() {
    setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            mPresenter.toggleIsExtended();
        }
    });

    //TODO-beauty: Fix AbilityCard animation so that the image on the card doesn't just jump
    // but animates smoothly like the rest of the card

    LayoutTransition transition = new LayoutTransition();
    transition.enableTransitionType(LayoutTransition.CHANGING);
    transition.setDuration(300);
    setLayoutTransition(transition);

    inflate(getContext(), R.layout.item_ability_info, this);
}
 
开发者ID:dbdkmezz,项目名称:true-sight-dota,代码行数:19,代码来源:AbilityCardView.java

示例4: onViewCreated

import android.animation.LayoutTransition; //导入方法依赖的package包/类
@SuppressLint("NewApi") @Override
public void onViewCreated(View view, Bundle savedInstanceState) {
  super.onViewCreated(view, savedInstanceState);

  pin = new StringBuffer();
  ;

  if (Build.VERSION.SDK_INT >= 16) {
    int startDelay = 0;
    LayoutTransition transition = new LayoutTransition();
    transition.enableTransitionType(LayoutTransition.CHANGING);
    transition.setStartDelay(LayoutTransition.APPEARING, startDelay);
    transition.setStartDelay(LayoutTransition.CHANGE_APPEARING, startDelay);
    rootLayout.setLayoutTransition(transition);
  }

  if (loadingAnimator != null) {
    loadingAnimator.cancel();
  }
}
 
开发者ID:sockeqwe,项目名称:SecureBitcoinWallet,代码行数:21,代码来源:LockFragment.java

示例5: getDefaultTransition

import android.animation.LayoutTransition; //导入方法依赖的package包/类
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);
    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;
}
 
开发者ID:breadwallet,项目名称:breadwallet-android,代码行数:20,代码来源:BRAnimator.java

示例6: setLayoutTransition

import android.animation.LayoutTransition; //导入方法依赖的package包/类
private void setLayoutTransition(ViewGroup viewGroup) {
    if (Build.VERSION.SDK_INT >= 16) {
        // 14+ will crash when we remove child, because we cannot disable APPEARING & DISAPPEARING
        // it's a big joke
        // TODO: work around it
        LayoutTransition lt = new LayoutTransition();
        if (Build.VERSION.SDK_INT >= 16) {
            lt.disableTransitionType(LayoutTransition.APPEARING);
            lt.enableTransitionType(LayoutTransition.CHANGING);
            lt.disableTransitionType(LayoutTransition.DISAPPEARING);
            lt.enableTransitionType(LayoutTransition.CHANGE_APPEARING);
            lt.enableTransitionType(LayoutTransition.CHANGE_DISAPPEARING);
        }
        viewGroup.setLayoutTransition(lt);
    }
}
 
开发者ID:kunka,项目名称:DragAndDropBTWLayouts,代码行数:17,代码来源:DraggableLinearLayoutTouchListener.java

示例7: ActionView

import android.animation.LayoutTransition; //导入方法依赖的package包/类
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public ActionView(JOneTouchActivity activity, ServerService serverService,
		MyTerminal myTerminal, MyAuthentication myAuthentication,
		ActionService actionService) {
	
	this.activity = activity;
	this.serverService = serverService;
	this.myTerminal = myTerminal;
	this.myAuthentication = myAuthentication;
	this.actionService = actionService;
	
	this.mainView = (LinearLayout) activity.getLayoutInflater().inflate(R.layout.action_view_layout, null);
	// FIXME : LayoutTransition is available from HONEYCOMB but the LayoutTransition.CHANGING is available only from JELLY_BEAN
	if (APIUtils.ifAvailableAPI(Build.VERSION_CODES.JELLY_BEAN)) {
		LayoutTransition layoutTransition = new LayoutTransition();
		layoutTransition.enableTransitionType(LayoutTransition.CHANGING);
		this.mainView.setLayoutTransition(layoutTransition);
	}
}
 
开发者ID:joakim-ribier,项目名称:JOneTouch,代码行数:20,代码来源:ActionView.java

示例8: hideSearch

import android.animation.LayoutTransition; //导入方法依赖的package包/类
private void hideSearch(){
	//set transiontn
	LayoutTransition l = new LayoutTransition();
	l.enableTransitionType(LayoutTransition.DISAPPEARING);
	RelativeLayout rl = (RelativeLayout)getView().findViewById(R.id.rl_vendorlist);
	rl.setLayoutTransition(l);
	//animate
	mActvSearch.setVisibility(View.GONE);
	//set text to ""
	mActvSearch.setText("");

	InputMethodManager imm = (InputMethodManager)getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
	imm.hideSoftInputFromWindow(mActvSearch.getWindowToken(), 0);

	mSearchWasVisible = false;
}
 
开发者ID:nibdev,项目名称:otrta,代码行数:17,代码来源:FragmentVendorGrid.java

示例9: FunControl

import android.animation.LayoutTransition; //导入方法依赖的package包/类
public FunControl(Builder builder){
    this.funny = builder.funny;
    this.funnyButton = builder.funnyButton;
    this.funnyContainer = builder.viewGroup;
    this.gravityToExpand = builder.gravityToExpand;
    this.widthToExpand = builder.width;

    LayoutTransition layoutTransition = funny.getLayoutTransition();
    layoutTransition.setDuration(builder.animationDuration);
    layoutTransition.enableTransitionType(LayoutTransition.CHANGING);
}
 
开发者ID:PHELAT,项目名称:Fun,代码行数:12,代码来源:FunControl.java

示例10: onViewCreated

import android.animation.LayoutTransition; //导入方法依赖的package包/类
@Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
  super.onViewCreated(view, savedInstanceState);
  loginButton.setMode(ActionProcessButton.Mode.ENDLESS);

  int startDelay = getResources().getInteger(android.R.integer.config_mediumAnimTime) + 100;
  LayoutTransition transition = new LayoutTransition();
  transition.enableTransitionType(LayoutTransition.CHANGING);
  transition.setStartDelay(LayoutTransition.APPEARING, startDelay);
  transition.setStartDelay(LayoutTransition.CHANGE_APPEARING, startDelay);
  loginForm.setLayoutTransition(transition);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:12,代码来源:LoginFragment.java

示例11: init

import android.animation.LayoutTransition; //导入方法依赖的package包/类
private void init() {

    View.inflate(getContext(), R.layout.view_label_layout, this);

    LayoutTransition transition = new LayoutTransition();
    transition.enableTransitionType(LayoutTransition.CHANGING);
    this.setLayoutTransition(transition);

    adapter = new LabelAdapter(getContext());
    popUpWindow = new ListPopupWindow(getContext());
    popUpWindow.setAnchorView(this);
    popUpWindow.setAdapter(adapter);
    popUpWindow.setWidth(DimensUtils.dpToPx(getContext(), 140));
    popUpWindow.setOnDismissListener(new PopupWindow.OnDismissListener() {
      @Override public void onDismiss() {
        showLabel();
      }
    });
    popUpWindow.setOnItemClickListener(new AdapterView.OnItemClickListener() {
      @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
        Label label = (Label) adapter.getItem(position);
        if (!label.getName().equals(mail.getLabel())) {
          presenter.setLabel(mail, label.getName());
          popUpWindow.dismiss();
        }
      }
    });

    setOnClickListener(new OnClickListener() {
      @Override public void onClick(View v) {
        loadData(false);
      }
    });
  }
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:35,代码来源:LabelLayout.java

示例12: setUpLayoutTransition

import android.animation.LayoutTransition; //导入方法依赖的package包/类
private void setUpLayoutTransition() {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
        RelativeLayout searchRoot = (RelativeLayout) findViewById(R.id.search_root);
        LayoutTransition layoutTransition = new LayoutTransition();
        layoutTransition.setDuration(DURATION_LAYOUT_TRANSITION);
        if (Build.VERSION.SDK_INT > Build.VERSION_CODES.JELLY_BEAN) {
            // layoutTransition.enableTransitionType(LayoutTransition.CHANGING);
            layoutTransition.enableTransitionType(LayoutTransition.CHANGE_DISAPPEARING);
            layoutTransition.setStartDelay(LayoutTransition.CHANGING, 0);
        }
        layoutTransition.setStartDelay(LayoutTransition.CHANGE_DISAPPEARING, 0);
        mSearchCardView.setLayoutTransition(layoutTransition);
    }
}
 
开发者ID:aliumujib,项目名称:Nibo,代码行数:15,代码来源:NiboPlacesAutoCompleteSearchView.java

示例13: onCreateView

import android.animation.LayoutTransition; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
        Bundle savedInstanceState) {
    View view = super.onCreateView(inflater, container, savedInstanceState);
    mChannelDataManager = new ChannelDataManager(getActivity());
    mChannelDataManager.checkDataVersion(getActivity());
    mAdapter = new ChannelAdapter();
    mProgressBar = (ProgressBar) view.findViewById(R.id.tune_progress);
    mScanningMessage = (TextView) view.findViewById(R.id.tune_description);
    ListView channelList = (ListView) view.findViewById(R.id.channel_list);
    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);
    mChannelHolder = view.findViewById(R.id.channel_holder);
    mCancelButton = (Button) view.findViewById(R.id.tune_cancel);
    mCancelButton.setOnClickListener(new OnClickListener() {
        @Override
        public void onClick(View v) {
            finishScan(false);
        }
    });
    Bundle args = getArguments();
    // TODO: Handle the case when the fragment is restored.
    startScan(args == null ? 0 : args.getInt(EXTRA_FOR_CHANNEL_SCAN_FILE, 0));
    TextView scanTitleView = (TextView) view.findViewById(R.id.tune_title);
    if (TunerInputInfoUtils.isBuiltInTuner(getActivity())){
        scanTitleView.setText(R.string.bt_channel_scan);
    } else {
        scanTitleView.setText(R.string.ut_channel_scan);
    }
    return view;
}
 
开发者ID:trevd,项目名称:android_packages_apps_tv,代码行数:36,代码来源:ScanFragment.java

示例14: onCreate

import android.animation.LayoutTransition; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_set_alarm_clock);
    setTheme(R.style.DialogTheme);

    scrollView = (LinearLayout) findViewById(R.id.scroll_view);
    // https://www.youtube.com/watch?v=55wLsaWpQ4g
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
        LayoutTransition layoutTransition = scrollView.getLayoutTransition();
        layoutTransition.enableTransitionType(LayoutTransition.CHANGING);
    }
}
 
开发者ID:firebirdberlin,项目名称:nightdream,代码行数:14,代码来源:SetAlarmClockActivity.java

示例15: initProgressBar

import android.animation.LayoutTransition; //导入方法依赖的package包/类
private void initProgressBar() {
    bar = (CircularProgressBar) findViewById(R.id.progress_bar_circular);
    float progressBarStrokeWidth = getResources()
            .getDimensionPixelSize(R.dimen.progressbar_stroke_width);
    bar.setIndeterminateDrawable(new CircularProgressDrawable.Builder(this)
            .color(ContextCompat.getColor(this, R.color.color_primary_default))
            .style(CircularProgressDrawable.STYLE_ROUNDED)
            .strokeWidth(progressBarStrokeWidth)
            .rotationSpeed(1f)
            .sweepSpeed(1f)
            .build());
    onPostAnimationListener = new OnPostAnimationListener();

    /* adding transition animations to root layout */
    if (isGreaterThanOrJellyBean()) {
        layoutTransition = new LayoutTransition();
        layoutTransition.enableTransitionType(LayoutTransition.CHANGING);
        layoutTransition.addTransitionListener(onPostAnimationListener);

        RelativeLayout loginLayoutContent = (RelativeLayout) findViewById(
                org.hisp.dhis.client.sdk.ui.R.id.layout_content);
        loginLayoutContent.setLayoutTransition(layoutTransition);
    } else {
        layoutTransitionSlideIn = AnimationUtils.loadAnimation(this,
                org.hisp.dhis.client.sdk.ui.R.anim.in_up);
        layoutTransitionSlideOut = AnimationUtils.loadAnimation(this,
                org.hisp.dhis.client.sdk.ui.R.anim.out_down);

        layoutTransitionSlideIn.setAnimationListener(onPostAnimationListener);
        layoutTransitionSlideOut.setAnimationListener(onPostAnimationListener);
    }
}
 
开发者ID:EyeSeeTea,项目名称:pictureapp,代码行数:33,代码来源:LoginActivity.java


注:本文中的android.animation.LayoutTransition.enableTransitionType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。