Commit 0ec230c3 by Kazuyuki Hida

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

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