Commit 82a59ce3 by Lee Jaebin

図面タイプでフォームのサイズ修正(タブレット)

parent 96a04baf
......@@ -52,7 +52,7 @@ public class OperationTaskLayout extends RelativeLayout {
private static final int CODE_WIDTH = 46;
private static final int CODE_HEIGHT = 26;
public static final int HALF_WIDTH = 340;
public static final int HALF_WIDTH = 400;
public static final int COLOR_ORANGE = Color.rgb(255, 119, 0);
public static final int COLOR_BLUE = Color.rgb(27, 27, 210);
......@@ -99,7 +99,14 @@ public class OperationTaskLayout extends RelativeLayout {
mWebView.loadUrl(linkUrl);
RelativeLayout.LayoutParams params = createParam(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
RelativeLayout.LayoutParams params;
if (isNormalSize) {
params = createParam(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
} else {
DisplayMetrics displayMetrics = getResources().getDisplayMetrics();
int halfWidth = (int) (displayMetrics.density * OperationTaskLayout.HALF_WIDTH);
params = createParam(halfWidth, ViewGroup.LayoutParams.WRAP_CONTENT);
}
params.addRule(RelativeLayout.ALIGN_PARENT_TOP);
params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
addView(mWebView, params);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment