Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 49fabb9b authored by Noah Wang's avatar Noah Wang
Browse files

Accomodating multiple preview screen with ViewPager for the users to

swipe across, along with some UI refinements.

Change-Id: I9487bcce88cdab490a4b6baa752224acddc5be52
parent 4ccc2c35
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2015 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License
  -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="24dp"
        android:height="24dp"
        android:viewportWidth="24"
        android:viewportHeight="24"
        android:tint="?android:attr/colorAccent">
    <path
        android:fillColor="@android:color/white"
        android:pathData="M5 17v2h14v-2H5zm4.5-4.2h5l.9 2.2h2.1L12.75 4h-1.5L6.5 15h2.1l.9-2.2zM12 5.98L13.87 11h-3.74L12 5.98z"/>
</vector>
+25 −0
Original line number Diff line number Diff line
<!--
  ~ Copyright (C) 2015 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License
  -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="36dp"
        android:height="36dp"
        android:viewportWidth="24"
        android:viewportHeight="24"
        android:tint="?android:attr/colorAccent">
    <path
        android:fillColor="@android:color/white"
        android:pathData="M5 17v2h14v-2H5zm4.5-4.2h5l.9 2.2h2.1L12.75 4h-1.5L6.5 15h2.1l.9-2.2zM12 5.98L13.87 11h-3.74L12 5.98z"/>
</vector>
+25 −23
Original line number Diff line number Diff line
@@ -16,7 +16,8 @@

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
            android:layout_width="match_parent"
    android:layout_height="match_parent">
            android:layout_height="match_parent"
            android:fillViewport="true">

    <LinearLayout
        android:orientation="vertical"
@@ -26,33 +27,27 @@
        android:paddingStart="?android:attr/listPreferredItemPaddingStart"
        android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">

        <FrameLayout
        <android.support.v4.view.ViewPager
            android:id="@+id/preview_pager"
            android:layout_width="match_parent"
            android:layout_height="@dimen/font_size_preview_height"
            android:layout_weight="1"
            android:background="?android:attr/colorBackgroundFloating"
            android:elevation="2dp">

            <view class="com.android.settings.TouchBlockingFrameLayout"
                android:id="@+id/preview_frame"
                android:layout_width="match_parent"
                android:layout_height="match_parent" />
            android:elevation="2dp" />

        <TextView
            android:id="@+id/current_label"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal|bottom"
            android:layout_gravity="center_horizontal"
            android:padding="8dp"
                android:theme="@android:style/Theme.Material"
                android:background="?android:attr/colorBackgroundFloating"
                android:textAppearance="@android:style/TextAppearance.Material.Caption"
                android:textAllCaps="true"
            android:textAppearance="@android:style/TextAppearance.Material.Widget.TextView"
            android:elevation="2dp" />
        </FrameLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center_vertical"
            android:paddingTop="8dp">

            <ImageView
@@ -60,7 +55,7 @@
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:background="?android:attr/selectableItemBackgroundBorderless"
                android:src="@drawable/ic_remove_24dp"
                android:src="@drawable/ic_font_size_24dp"
                android:tint="?android:attr/colorControlNormal"
                android:tintMode="src_in"
                android:scaleType="center"
@@ -79,12 +74,19 @@
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:background="?android:attr/selectableItemBackgroundBorderless"
                android:src="@drawable/ic_add_24dp"
                android:src="@drawable/ic_font_size_36dp"
                android:tint="?android:attr/colorControlNormal"
                android:tintMode="src_in"
                android:scaleType="center"
                android:focusable="true"
                android:contentDescription="@string/font_size_make_larger_desc" />
        </LinearLayout>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/font_size_summary"
            android:layout_marginBottom="16dp"
            android:textAppearance="@android:style/TextAppearance.Material.Subhead" />
    </LinearLayout>
</ScrollView>
+20 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<view xmlns:android="http://schemas.android.com/apk/res/android"
    class="com.android.settings.TouchBlockingFrameLayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />
+22 −27
Original line number Diff line number Diff line
@@ -16,7 +16,8 @@

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
            android:layout_width="match_parent"
            android:layout_height="match_parent">
            android:layout_height="match_parent"
            android:fillViewport="true">

    <LinearLayout
        android:orientation="vertical"
@@ -26,40 +27,27 @@
        android:paddingStart="?android:attr/listPreferredItemPaddingStart"
        android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/screen_zoom_summary"
            android:layout_marginBottom="16dp"
            android:textAppearance="@android:style/TextAppearance.Material.Subhead" />

        <FrameLayout
        <android.support.v4.view.ViewPager
            android:id="@+id/preview_pager"
            android:layout_width="match_parent"
            android:layout_height="@dimen/screen_zoom_preview_height"
            android:layout_weight="1"
            android:background="?android:attr/colorBackgroundFloating"
            android:elevation="2dp">

            <view class="com.android.settings.TouchBlockingFrameLayout"
                android:id="@+id/preview_frame"
                android:layout_width="match_parent"
                android:layout_height="match_parent" />
            android:elevation="2dp" />

        <TextView
            android:id="@+id/current_label"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal|bottom"
            android:layout_gravity="center_horizontal"
            android:padding="8dp"
                android:theme="@android:style/Theme.Material"
                android:background="?android:attr/colorBackgroundFloating"
                android:textAppearance="@android:style/TextAppearance.Material.Caption"
                android:textAllCaps="true"
            android:textAppearance="@android:style/TextAppearance.Material.Widget.TextView"
            android:elevation="2dp" />
        </FrameLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center_vertical"
            android:paddingTop="8dp">

            <ImageView
@@ -93,5 +81,12 @@
                android:focusable="true"
                android:contentDescription="@string/screen_zoom_make_larger_desc" />
        </LinearLayout>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/screen_zoom_summary"
            android:layout_marginBottom="16dp"
            android:textAppearance="@android:style/TextAppearance.Material.Subhead" />
    </LinearLayout>
</ScrollView>
Loading