-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy pathBaseResolutionPolicy.java
More file actions
51 lines (40 loc) · 1.85 KB
/
BaseResolutionPolicy.java
File metadata and controls
51 lines (40 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package org.anddev.andengine.engine.options.resolutionpolicy;
import android.view.View.MeasureSpec;
/**
* (c) 2010 Nicolas Gramlich
* (c) 2011 Zynga Inc.
*
* @author Nicolas Gramlich
* @since 22:46:43 - 06.10.2010
*/
public abstract class BaseResolutionPolicy implements IResolutionPolicy {
// ===========================================================
// Constants
// ===========================================================
// ===========================================================
// Fields
// ===========================================================
// ===========================================================
// Constructors
// ===========================================================
private BaseResolutionPolicy() {}
// ===========================================================
// Getter & Setter
// ===========================================================
// ===========================================================
// Methods for/from SuperClass/Interfaces
// ===========================================================
protected static void throwOnNotMeasureSpecEXACTLY(final int pWidthMeasureSpec, final int pHeightMeasureSpec) {
final int specWidthMode = MeasureSpec.getMode(pWidthMeasureSpec);
final int specHeightMode = MeasureSpec.getMode(pHeightMeasureSpec);
if (specWidthMode != MeasureSpec.EXACTLY || specHeightMode != MeasureSpec.EXACTLY) {
throw new IllegalStateException("This IResolutionPolicy requires MeasureSpec.EXACTLY ! That means ");
}
}
// ===========================================================
// Methods
// ===========================================================
// ===========================================================
// Inner and Anonymous Classes
// ===========================================================
}