本文整理汇总了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);
}
}
示例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;
}
}
}
示例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;
}
示例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");
}
}
示例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);
}