Best code examples for Android Movie class (android.graphics.Movie)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android Movie class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Android Movie examples from Open Source projects
This code example shows how to use the following methods: draw, duration, height, setTime, width
42:	final float scale = Math.min((float)getWidth() / mMovie.width(), (float)getHeight() / mMovie.height()); 
-
45:	canvas.translate(((float)getWidth() / scale - (float)mMovie.width())/2f, 
46:	((float)getHeight() / scale - (float)mMovie.height())/2f); 
-
51:	mMovie.setTime((int)((now - movieStart) % mMovie.duration())); 
52:	mMovie.draw(canvas, 0, 0, paint); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: draw, duration, setTime
47:	int relTime = (int) ((now - movieStart) % movie.duration()); 
48:	movie.setTime(relTime); 
49:	movie.draw(canvas, 0, 0); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: draw, duration, height, setTime, width
56:	s = (float)getWidth() / (float)mMovie.width(); 
57:	if ((float)getHeight() / (float)mMovie.height() < s) 
58:	s =  (float)getHeight() / (float)mMovie.height(); 
-
69:	if (mMovie.duration() > 0) 
70:	relTime = (int)((now - mMoviestart) % mMovie.duration()); 
-
72:	mMovie.setTime(relTime); 
73:	mMovie.draw(canvas, -mMovie.width() / 2, -mMovie.height() / 2); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: draw, duration, height, setTime, width
42:	int dur = gifMovie.duration(); 
-
47:	gifMovie.setTime(relTime); 
48:	gifMovie.draw(canvas, getWidth() - gifMovie.width(), 
49:	getHeight() - gifMovie.height()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: draw, duration, height, setTime, width
52:	int dur = mMovie.duration(); 
-
57:	mMovie.setTime(relTime); 
58:	mMovie.draw(canvas, getWidth() - mMovie.width(), getHeight() - mMovie.height()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: draw, duration, setTime
33:	final int relTime = (int)((now - mMoviestart) % mMovie.duration()); 
34:	mMovie.setTime(relTime); 
35:	mMovie.draw(canvas, 10, 10); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: draw, duration, height, setTime, width
51:	int dur = movie.duration(); 
-
56:	movie.setTime(relTime); 
57:	movie.draw(canvas, getWidth() / 2 - movie.width() / 2, 
58:	getHeight() / 2 - movie.height() / 2); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: draw, duration, height, setTime, width
53:	int dur = mMovie.duration(); 
-
58:	mMovie.setTime(relTime); 
-
60:	mMovie.draw(canvas, getWidth() - mMovie.width(), 
61:	getHeight() - mMovie.height()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: draw, duration, setTime
236:	int dur = mMovie.duration(); 
-
250:	mMovie.setTime(mCurrentAnimationTime); 
-
254:	mMovie.draw(canvas, mLeft / mScale, mTop / mScale); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: draw, duration, setTime, width
62:	.duration()); 
63:	movie.setTime(relativeTime); 
64:	double scaleFactorX = (double) getWidth() / (double) movie.width(); 
-
66:	movie.draw(canvas, (float) scaleFactorX, (float) scaleFactorX); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: draw, duration, height, setTime, width
57:	int dur = mMovie.duration(); 
-
62:	mMovie.setTime(relTime); 
63:	mMovie.draw(canvas, getWidth() / 2 - mMovie.width() / 2, 
64:	getHeight() / 2 - mMovie.height() / 2); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: draw, duration, setTime
56:	int dur = mMovie.duration(); 
-
61:	mMovie.setTime(relTime); 
62:	mMovie.draw(canvas, 0, 0); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: draw, duration, setTime
142:	int dur = mMovie.duration(); 
-
147:	mMovie.setTime(relTime); 
148:	mMovie.draw(canvas, 100,320); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: draw, duration, setTime
40:	int relTime = (int)((now - moviestart) % movie.duration()) ; 
-
42:	System.out.println("time="+relTime+"\treltime="+movie.duration()); 
43:	movie.setTime(relTime); 
44:	movie.draw(canvas,00,00); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: draw, duration, setTime
38:	int relTime = (int) ((now - moviestart) % movie.duration()); 
39:	System.out.println("time=" + relTime + "\treltime=" + movie.duration()); 
40:	movie.setTime(relTime); 
41:	movie.draw(canvas, this.getWidth() / 2 - 20, this.getHeight() / 2 - 40); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: draw, duration, setTime
40:	int relTime = (int)((now - moviestart) % movie.duration()) ; 
-
42:	System.out.println("time="+relTime+"\treltime="+movie.duration()); 
43:	movie.setTime(relTime); 
44:	movie.draw(canvas,00,00); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: draw, duration, setTime
33:	int relTime = (int)((now - moviestart) % movie.duration()) ; 
-
35:	movie.setTime(relTime); 
36:	movie.draw(canvas,10,10); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: draw, duration, setTime
33:	final int relTime = (int)((now - mMoviestart) % mMovie.duration()); 
34:	mMovie.setTime(relTime); 
35:	mMovie.draw(canvas, 0, 0); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: draw, duration, setTime
40:	int relTime = (int)((now - moviestart) % movie.duration()) ; 
41:	System.out.println("time="+relTime+"\treltime="+movie.duration()); 
42:	movie.setTime(relTime); 
43:	movie.draw(canvas,this.getWidth()/2-20,this.getHeight()/2-40); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: draw, duration, setTime
35:	final int relTime = (int)((now - mMoviestart) % mMovie.duration()); 
36:	mMovie.setTime(relTime); 
37:	mMovie.draw(canvas, 10, 10); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: draw, duration, setTime
41:	if(movie.duration() != 0) { 
42:	relTime = (int) ((now - moviestart) % movie.duration()); 
43:	movie.setTime(relTime); 
44:	movie.draw(canvas, 0, 0); 
-
47:	movie.setTime(relTime); 
48:	movie.draw(canvas, 0, 0); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: draw, duration, setTime
42:	int relTime = (int) ((now - moviestart) % movie.duration()); 
43:	System.out.println("time=" + relTime + "\treltime=" + movie.duration()); 
44:	movie.setTime(relTime); 
45:	movie.draw(canvas, this.getWidth() / 2 - 20, this.getHeight() / 2 - 40); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: duration, height, width
30:	mMovieDuration = movie.duration(); 
31:	mMovieHeight = movie.height(); 
32:	mMovieWidth = movie.width(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: draw, duration, setTime
45:	int relTime = (int) ((now - moviestart) % movie.duration()); 
46:	movie.setTime(relTime); 
47:	movie.draw(canvas, 0.0F, 0.0F); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: draw, duration, setTime
34:	final int relTime = (int)((now - mMoviestart) % mMovie.duration()); 
35:	mMovie.setTime(relTime); 
36:	mMovie.draw(canvas, 10, 10); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: draw, duration, setTime
46:	relTime = (int)((now - movieStart) % movie.duration()); 
47:	movie.setTime(relTime); 
48:	movie.draw(canvas,0,0); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: draw, duration, setTime
34:	final int relTime = (int) ((now - moviestart) % movie.duration()); 
35:	movie.setTime(relTime); 
36:	movie.draw(canvas, 10, 10); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: draw, duration, setTime
50:	int relTime = (int)((now - movieStart) % mMovie.duration()) ; 
-
52:	mMovie.setTime(relTime); 
53:	mMovie.draw(canvas,0,0); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: draw, duration, setTime
35:	final int relTime = (int)((now - mMoviestart) % mMovie.duration()); 
36:	mMovie.setTime(relTime); 
37:	mMovie.draw(canvas, 10, 10); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: draw, duration, setTime
35:	final int relTime = (int)((now - mMoviestart) % mMovie.duration()); 
36:	mMovie.setTime(relTime); 
37:	mMovie.draw(canvas, 10, 10); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: draw, duration, setTime
48:	int dur = mMovie.duration(); 
-
53:	mMovie.setTime(relTime); 
54:	mMovie.draw(canvas, 0, 0); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: decodeStream, mark
165:	is = new BufferedInputStream(new FileInputStream(file), 16 * 1024); 
166:	is.mark(16 * 1024); 
-
173:	movie = Movie.decodeStream(is); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: height, width
34:	mRect = new Rect(0, 0, mMovie.width(), mMovie.height()); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: height, width
105:	int movieWidth = mMovie.width(); 
106:	int movieHeight = mMovie.height(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: height, width
100:	setMeasuredDimension(mMovie.width(), mMovie.height()); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: height, width
165:	int movieWidth = mMovie.width(); 
166:	int movieHeight = mMovie.height(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: height, width
164:	int movieWidth = mMovie.width(); 
165:	int movieHeight = mMovie.height(); 
Full Snippet Info
4
CodeRank
Related Android Movie Questions & Answers:
See Code Examples for Android Movie Methods: