From 0f07935e5165b33d512d7d594e5fec7a2f210013 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" <takaoka@google.com> Date: Mon, 22 Apr 2013 12:23:32 +0900 Subject: [PATCH] Centering setup wizard welcome video Bug: 8159728 Change-Id: Ia016c41dc39b87740ff57efe0e2fadd61f0da129 --- java/res/layout/setup_welcome_video.xml | 26 +++++++++++++++++++------ java/res/values/setup-dimens.xml | 3 +++ 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/java/res/layout/setup_welcome_video.xml b/java/res/layout/setup_welcome_video.xml index a72fbd72f5..3aa4f3ca85 100644 --- a/java/res/layout/setup_welcome_video.xml +++ b/java/res/layout/setup_welcome_video.xml @@ -19,12 +19,26 @@ --> <merge xmlns:android="http://schemas.android.com/apk/res/android"> - <VideoView - android:id="@+id/setup_welcome_video" - android:layout_margin="36dp" - android:layout_width="240dp" - android:layout_height="150dp" - android:layout_centerHorizontal="true" /> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal"> + <View + android:layout_weight="@integer/setup_welcome_video_left_padding_weight_in_screen" + android:layout_width="0dp" + android:layout_height="0dp" /> + <VideoView + android:id="@+id/setup_welcome_video" + android:layout_weight="@integer/setup_welcome_video_weight_in_screen" + android:layout_marginTop="24dp" + android:layout_marginBottom="24dp" + android:layout_width="0dp" + android:layout_height="wrap_content" /> + <View + android:layout_weight="@integer/setup_welcome_video_right_padding_weight_in_screen" + android:layout_width="0dp" + android:layout_height="0dp" /> + </LinearLayout> <com.android.inputmethod.latin.setup.SetupStartIndicatorView android:layout_width="match_parent" android:layout_height="wrap_content" /> diff --git a/java/res/values/setup-dimens.xml b/java/res/values/setup-dimens.xml index 1c6811f73c..1634777f99 100644 --- a/java/res/values/setup-dimens.xml +++ b/java/res/values/setup-dimens.xml @@ -20,4 +20,7 @@ <dimen name="setup_horizontal_padding">16dp</dimen> <integer name="setup_title_weight_in_screen">40</integer> <integer name="setup_body_weight_in_screen">60</integer> + <integer name="setup_welcome_video_weight_in_screen">80</integer> + <integer name="setup_welcome_video_left_padding_weight_in_screen">10</integer> + <integer name="setup_welcome_video_right_padding_weight_in_screen">10</integer> </resources> -- GitLab