Commit 0ec230c3 by Kazuyuki Hida

スマートフォン用にレイアウト調整

parent 7eb4d96d
...@@ -11,7 +11,8 @@ ...@@ -11,7 +11,8 @@
<!-- 規約 --> <!-- 規約 -->
<ScrollView <ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="0dp"
android:layout_weight="1"
tools:ignore="UselessParent"> tools:ignore="UselessParent">
<LinearLayout <LinearLayout
......
...@@ -476,7 +476,7 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity { ...@@ -476,7 +476,7 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity {
doMoveToHome(); doMoveToHome();
} }
}; };
AgreementToTermsHelper.clearVersion(this); AgreementToTermsHelper.clearVersion(this); // for debug
AgreementToTermsHelper.confirmAgreement(this, isNormalSize(), listener); AgreementToTermsHelper.confirmAgreement(this, isNormalSize(), listener);
} }
......
...@@ -112,13 +112,15 @@ public class AgreementToTermsHelper { ...@@ -112,13 +112,15 @@ public class AgreementToTermsHelper {
try { try {
AlertDialog dialog = makeDialog(activity, termsJSON, isNomalSize, listener); AlertDialog dialog = makeDialog(activity, termsJSON, isNomalSize, listener);
dialog.show(); dialog.show();
if (! isNomalSize) {
WindowManager.LayoutParams params = dialog.getWindow().getAttributes(); WindowManager.LayoutParams params = dialog.getWindow().getAttributes();
WindowManager wm = (WindowManager)activity.getSystemService(Context.WINDOW_SERVICE); WindowManager wm = (WindowManager)activity.getSystemService(Context.WINDOW_SERVICE);
Display disp = wm.getDefaultDisplay(); Display disp = wm.getDefaultDisplay();
if (isNomalSize) {
params.width = disp.getWidth() * 49 / 50;
} else {
params.width = disp.getWidth() * 4 / 5; params.width = disp.getWidth() * 4 / 5;
dialog.getWindow().setAttributes(params);
} }
dialog.getWindow().setAttributes(params);
} catch (Exception e) { } catch (Exception e) {
listener.onError(e); listener.onError(e);
} }
......
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