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


Java Slide类代码示例

本文整理汇总了Java中com.transitionseverywhere.Slide的典型用法代码示例。如果您正苦于以下问题:Java Slide类的具体用法?Java Slide怎么用?Java Slide使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: setAliasAndAddress

import com.transitionseverywhere.Slide; //导入依赖的package包/类
private void setAliasAndAddress(String alias, String address) {
    //Save alias and address
    mPlace.setAlias(alias);
    mPlace.setAddress(address);

    if(!mAliasAddressAlreadySet) {
        TransitionManager.beginDelayedTransition(mMapContainer, new Slide(Gravity.BOTTOM));
        mAlias.setText(alias);
        mAddress.setText(address);
        mAliasAddressContainer.setVisibility(View.VISIBLE);
        mAliasAddressAlreadySet = true;

    } else {
        //TransitionManager.beginDelayedTransition(mMapContainer, new ChangeText().setChangeBehavior(ChangeText.CHANGE_BEHAVIOR_OUT_IN));
        mAlias.setText(alias);
        mAddress.setText(address);
    }
}
 
开发者ID:abicelis,项目名称:Remindy,代码行数:19,代码来源:PlaceActivity.java

示例2: onCheckedChanged

import com.transitionseverywhere.Slide; //导入依赖的package包/类
@Override
public void onCheckedChanged(final RadioGroup group, int checkedId) {
    switch (checkedId) {
        case R.id.select_scene_1: {
            // You can start an automatic transition with TransitionManager.go().
            TransitionManager.go(mScene1);
            break;
        }
        case R.id.select_scene_2: {
            TransitionSet set = new TransitionSet();
            Slide slide = new Slide(Gravity.LEFT);
            slide.addTarget(R.id.transition_title);
            set.addTransition(slide);
            set.addTransition(new ChangeBounds());
            set.setOrdering(TransitionSet.ORDERING_TOGETHER);
            set.setDuration(350);
            TransitionManager.go(mScene2, set);
            break;
        }
        case R.id.select_scene_3: {
            // You can also start a transition with a custom TransitionManager.
            mTransitionManagerForScene3.transitionTo(mScene3);
            break;
        }
    }
}
 
开发者ID:andkulikov,项目名称:Transitions-Everywhere,代码行数:27,代码来源:ScenesSample.java

示例3: onCreateView

import com.transitionseverywhere.Slide; //导入依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.fragment_slide, container, false);

    final ViewGroup transitionsContainer = (ViewGroup) view.findViewById(R.id.transitions_container);
    final TextView text = (TextView) transitionsContainer.findViewById(R.id.text);

    transitionsContainer.findViewById(R.id.button).setOnClickListener(new VisibleToggleClickListener() {
        @Override
        protected void changeVisibility(boolean visible) {
            TransitionManager.beginDelayedTransition(transitionsContainer, new Slide(Gravity.RIGHT));
            text.setVisibility(visible ? View.VISIBLE : View.GONE);
        }
    });

    return view;
}
 
开发者ID:andkulikov,项目名称:Transitions-Everywhere,代码行数:19,代码来源:SlideSample.java

示例4: setUpMap

import com.transitionseverywhere.Slide; //导入依赖的package包/类
@SuppressWarnings({"MissingPermission"})
private void setUpMap() {
    mMap.setMyLocationEnabled(true);
   // mMap.setPadding(0, ConversionUtil.dpToPx(68, getResources()), 0, 0);
    mMap.getUiSettings().setMyLocationButtonEnabled(false);
    mMap.getUiSettings().setCompassEnabled(false);

    if(mPlaceToEdit == null) {
        moveCameraToLastKnownLocation();        //If creating a new place, go to user current location
        mRadius.setProgress(1);
        mRadiusDisplay.setText("100 m");
        //SnackbarUtil.showSnackbar(mMapContainer, SnackbarUtil.SnackbarType.NOTICE, R.string.activity_place_snackbar_help, SnackbarUtil.SnackbarDuration.SHORT, null);

    } else {
        drawMarkerWithCircle(new LatLng(mPlace.getLatitude(), mPlace.getLongitude()), mPlace.getRadius());        //If editing a place, go to that place and add a marker, circle

        Location loc = new Location(LocationManager.GPS_PROVIDER);
        loc.setLatitude(mPlace.getLatitude());
        loc.setLongitude(mPlace.getLongitude());
        moveCameraToLocation(loc);

        TransitionManager.beginDelayedTransition(mMapContainer, new Slide(Gravity.BOTTOM));
        mAlias.setText(mPlace.getAlias());
        mAddress.setText(mPlace.getAddress());
        mAliasAddressContainer.setVisibility(View.VISIBLE);
        mAliasAddressAlreadySet = true;

        mRadius.setProgress(mPlace.getRadius()/100 -1 );
        mRadiusDisplay.setText(String.valueOf(mPlace.getRadius()) + " m");

    }
}
 
开发者ID:abicelis,项目名称:Remindy,代码行数:33,代码来源:PlaceActivity.java

示例5: setEnterSearchAnimation

import com.transitionseverywhere.Slide; //导入依赖的package包/类
private void setEnterSearchAnimation() {
    TransitionSet transitionSet = new TransitionSet();
    if (mClearableEditText != null) {
        transitionSet.addTransition(
                new Slide(Gravity.TOP).addTarget(mClearableEditText).setDuration(150));
    }
    if (mCloseSearchButton != null) {
        transitionSet.addTransition(new Fade(Fade.IN).addTarget(mCloseSearchButton));
    }
    if (mLeftButton != null) {
        transitionSet.addTransition(new Fade(Fade.OUT).addTarget(mLeftButton));
    }
    if (mLeftImageButton != null) {
        transitionSet.addTransition(new Fade(Fade.OUT).addTarget(mLeftImageButton));
    }
    if (mTitleTextView != null) {
        transitionSet.addTransition(new Fade(Fade.OUT).addTarget(mTitleTextView).setDuration(
                150));
    }
    if (mRightButton != null) {
        transitionSet.addTransition(new Fade(Fade.OUT).addTarget(mRightButton));
    }
    if (mRightImageButton != null) {
        transitionSet.addTransition(new Fade(Fade.OUT).addTarget(mRightImageButton));
    }

    TransitionManager.beginDelayedTransition(this, transitionSet);
}
 
开发者ID:Piasy,项目名称:HandyWidgets,代码行数:29,代码来源:CenterTitleSideButtonBar.java


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