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