Methods Summary |
---|
public static com.android.mms.layout.LayoutManager | getInstance()
if (sInstance == null) {
throw new IllegalStateException("Uninitialized.");
}
return sInstance;
|
public int | getLayoutHeight()
return mLayoutParams.getHeight();
|
public LayoutParameters | getLayoutParameters()
return mLayoutParams;
|
private static LayoutParameters | getLayoutParameters(int displayType)
switch (displayType) {
case LayoutParameters.HVGA_LANDSCAPE:
return new HVGALayoutParameters(LayoutParameters.HVGA_LANDSCAPE);
case LayoutParameters.HVGA_PORTRAIT:
return new HVGALayoutParameters(LayoutParameters.HVGA_PORTRAIT);
}
throw new IllegalArgumentException(
"Unsupported display type: " + displayType);
|
public int | getLayoutType()
return mLayoutParams.getType();
|
public int | getLayoutWidth()
return mLayoutParams.getWidth();
|
public static void | init(android.content.Context context)
if (LOCAL_LOGV) {
Log.v(TAG, "DefaultLayoutManager.init()");
}
if (sInstance != null) {
Log.w(TAG, "Already initialized.");
}
sInstance = new LayoutManager(context);
|
private void | initLayoutParameters(android.content.res.Configuration configuration)
mLayoutParams = getLayoutParameters(
configuration.orientation == Configuration.ORIENTATION_PORTRAIT
? LayoutParameters.HVGA_PORTRAIT
: LayoutParameters.HVGA_LANDSCAPE);
if (LOCAL_LOGV) {
Log.v(TAG, "LayoutParameters: " + mLayoutParams.getTypeDescription()
+ ": " + mLayoutParams.getWidth() + "x" + mLayoutParams.getHeight());
}
|
public void | onConfigurationChanged(android.content.res.Configuration newConfig)
if (LOCAL_LOGV) {
Log.v(TAG, "-> LayoutManager.onConfigurationChanged().");
}
initLayoutParameters(newConfig);
|