當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。