package jp.agentec.abook.abv.ui.home.activity;

import android.os.Bundle;
import android.util.DisplayMetrics;
import android.view.WindowManager;

//Dialog画面表示用
public class ChangePasswordActivityDialog extends ChangePasswordActivity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		DisplayMetrics metrics = getResources().getDisplayMetrics();
		int dialogWidth;

		if (metrics.widthPixels > metrics.heightPixels) {
			dialogWidth = (int) (metrics.heightPixels * 0.9);
		} else {
			dialogWidth = (int) (metrics.widthPixels * 0.9);
		}

		WindowManager.LayoutParams lp = getWindow().getAttributes();
		lp.width = dialogWidth;
		lp.height = dialogWidth;
		getWindow().setAttributes(lp);
	}
}
