if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { Window window = getWindow(); Slide slide = new Slide(); slide.setInterpolator(new LinearInterpolator()); slide.setSlideEdge(Gravity.LEFT); slide.excludeTarget(android.R.id.statusBarBackground, true); slide.excludeTarget(android.R.id.navigationBarBackground, true); window.setExitTransition(slide); // The Transition to use to move Views out of the scene when calling a new Activity. window.setReenterTransition(slide); // The Transition to use to move Views into the scene when reentering from a previously-started Activity. window.setBackgroundDrawable(new ColorDrawable(Color.BLACK)); }
/** * Write the contents of the record back, so it can be written * to disk */ public void writeOut(OutputStream out) throws IOException { writeOut(_header[0],_header[1],_type,_children,out); }
if(Build.VERSION.SDK_INT >= 21){ Slide slide = new Slide(); slide.setDuration(1000); getWindow().setEnterTransition(slide); }
private void setupWindowAnimations() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { Slide slideTransition = new Slide(); slideTransition.setSlideEdge(Gravity.LEFT); slideTransition.setInterpolator(new DecelerateInterpolator()); slideTransition.setDuration(460); Slide slideRightTransition = new Slide(); slideRightTransition.setSlideEdge(Gravity.RIGHT); slideRightTransition.setDuration(getResources().getInteger(R.integer.anim_duration_long)); getWindow().setReenterTransition(slideRightTransition); getWindow().setExitTransition(slideTransition); getWindow().setEnterTransition(slideTransition); getWindow().setSharedElementEnterTransition(new ChangeBounds().setDuration(450)); getWindow().setSharedElementReturnTransition(null); ViewCompat.setTransitionName(title, ab_title); ViewCompat.setTransitionName(menu1, fab_anim); } }
/** * Whether this slide follows master sheet background * * @return <code>true</code> if the slide follows master background, * <code>false</code> otherwise */ @Override public boolean getFollowMasterBackground(){ SlideAtom sa = getSlideRecord().getSlideAtom(); return sa.getFollowMasterBackground(); }
if(latestRecords[i] instanceof Slide) { Slide s = (Slide)latestRecords[i]; SlideAtom sa = s.getSlideAtom(); System.out.println("Found the latest version of a slide record:"); System.out.println("\tCore ID is " + s.getSheetId()); System.out.println("\t(Core Records count is " + i + ")"); System.out.println("\tDisk Position is " + s.getLastOnDiskOffset()); System.out.println("\tMaster ID is " + sa.getMasterID()); System.out.println("\tNotes ID is " + sa.getNotesID());
new Handler().post(new Runnable() { @Override public void run() { page.setEnterTransition(new Slide()); getFragmentManager() .beginTransaction() .replace(R.id.root_layout, page, "current") .commit(); } });
slideRecord.setSheetId(psrId); slideRecord.setLastOnDiskOffset(slideOffset); ptr.addSlideLookup(sp.getRefID(), slideOffset); logger.log(POILogger.INFO, "New slide ended up at " + slideOffset);
@Override public void setHidden(boolean hidden) { org.apache.poi.hslf.record.Slide cont = getSlideRecord(); SSSlideInfoAtom slideInfo = (SSSlideInfoAtom)cont.findFirstOfType(RecordTypes.SSSlideInfoAtom.typeID); if (slideInfo == null) { slideInfo = new SSSlideInfoAtom(); cont.addChildAfter(slideInfo, cont.findFirstOfType(RecordTypes.SlideAtom.typeID)); } slideInfo.setEffectTransitionFlagByBit(SSSlideInfoAtom.HIDDEN_BIT, hidden); }
int psrId = addPersistentObject(slideRecord); sp.setRefID(psrId); slideRecord.setSheetId(psrId);
@Override public boolean isHidden() { SSSlideInfoAtom slideInfo = (SSSlideInfoAtom)getSlideRecord().findFirstOfType(RecordTypes.SSSlideInfoAtom.typeID); return (slideInfo != null) && slideInfo.getEffectTransitionFlagByBit(SSSlideInfoAtom.HIDDEN_BIT); }
/** * Sets whether this slide draws master color scheme * * @param flag <code>true</code> if the slide draws master color scheme, * <code>false</code> otherwise */ public void setFollowMasterScheme(boolean flag){ SlideAtom sa = getSlideRecord().getSlideAtom(); sa.setFollowMasterScheme(flag); }
if(latestRecords[i] instanceof Slide) { Slide s = (Slide)latestRecords[i]; SlideAtom sa = s.getSlideAtom(); System.out.println("Found the latest version of a slide record:"); System.out.println("\tCore ID is " + s.getSheetId()); System.out.println("\t(Core Records count is " + i + ")"); System.out.println("\tDisk Position is " + s.getLastOnDiskOffset()); System.out.println("\tMaster ID is " + sa.getMasterID()); System.out.println("\tNotes ID is " + sa.getNotesID());
public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); addSlideTransitions(); setContentView(R.layout.activity_main); } @TargetApi(Build.VERSION_CODES.LOLLIPOP) protected void addSlideTransitions() { getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS); Slide slide = new Slide(); slide.setDuration(1000); getWindow().setEnterTransition(slide); getWindow().setExitTransition(slide); } }
@Override public String getSlideName() { final CString name = (CString)getSlideRecord().findFirstOfType(RecordTypes.CString.typeID); return name != null ? name.getText() : "Slide"+getSlideNumber(); }
/** * Whether this slide draws master sheet objects * * @return <code>true</code> if the slide draws master sheet objects, * <code>false</code> otherwise */ public boolean getFollowMasterObjects(){ SlideAtom sa = getSlideRecord().getSlideAtom(); return sa.getFollowMasterObjects(); }
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { Window window = getWindow(); Slide slide = new Slide(); slide.setInterpolator(new LinearInterpolator()); slide.setSlideEdge(Gravity.RIGHT); slide.excludeTarget(android.R.id.statusBarBackground, true); slide.excludeTarget(android.R.id.navigationBarBackground, true); window.setEnterTransition(slide); // The Transition to use to move Views into the initial Scene. window.setReturnTransition(slide); // The Transition to use to move Views out of the Scene when the Window is preparing to close. window.setBackgroundDrawable(new ColorDrawable(Color.BLACK)); }
getWindow().requestFeature(Window.FEATURE_ACTIVITY_TRANSITIONS); window.setEnterTransition(new Slide());
/** * Write the contents of the record back, so it can be written * to disk */ public void writeOut(OutputStream out) throws IOException { writeOut(_header[0],_header[1],_type,_children,out); }