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

Commit a951bd29 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add support for showing debug info on documents." into nyc-andromeda-dev

parents 3f0d09fb 358c3ecf
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2013 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.
-->

<com.android.documentsui.ui.DocumentDebugInfo
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="@dimen/grid_item_margin"
    android:textAlignment="viewStart"
    android:typeface="monospace"
    android:textSize="11sp"
    android:textColor="#FF000000" />
+69 −56
Original line number Diff line number Diff line
@@ -15,14 +15,19 @@
     limitations under the License.
-->

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="@dimen/grid_item_margin"
    android:orientation="vertical"
    android:background="@color/item_doc_background"
    android:elevation="@dimen/grid_item_elevation"
    android:focusable="true">

    <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <!-- The height is 48px.
             paddingTop (9dp) + @dimen/check_icon_size (30dp) + paddingBottom (9dp) -->
        <LinearLayout
@@ -82,3 +87,11 @@
            android:duplicateParentState="true" />

    </FrameLayout>

    <FrameLayout
        android:id="@+id/debug_info"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="#FFEFEFEF" />

</LinearLayout>
 No newline at end of file
+117 −105
Original line number Diff line number Diff line
@@ -14,14 +14,19 @@
     limitations under the License.
-->

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="@dimen/grid_item_margin"
    android:orientation="vertical"
    android:background="@color/item_doc_background"
    android:elevation="@dimen/grid_item_elevation"
    android:focusable="true">

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <!-- Main item thumbnail.  Comprised of two overlapping images, the
             visibility of which is controlled by code in
             DirectoryFragment.java. -->
@@ -137,3 +142,10 @@
            android:duplicateParentState="true" />

    </RelativeLayout>

    <FrameLayout
        android:id="@+id/debug_info"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="#FFEFEFEF" />
</LinearLayout>
 No newline at end of file
+0 −3
Original line number Diff line number Diff line
@@ -27,9 +27,6 @@
    <fraction name="grid_scale_min">85%</fraction>
    <fraction name="grid_scale_max">200%</fraction>
    <dimen name="grid_width">152dp</dimen>
    <dimen name="grid_height">176dp</dimen>
    <dimen name="grid_item_width">152dp</dimen>
    <dimen name="grid_item_height">176dp</dimen>
    <dimen name="grid_section_separator_height">0dp</dimen>
    <dimen name="grid_item_margin">6dp</dimen>
    <dimen name="grid_padding_horiz">4dp</dimen>
+9 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ public final class DebugFlags {

    private static String mQvPackage;
    private static boolean sGestureScaleEnabled;
    private static boolean sDocumentDetailsEnabled;

    public static void setQuickViewer(@Nullable String qvPackage) {
        mQvPackage = qvPackage;
@@ -35,6 +36,14 @@ public final class DebugFlags {
        return mQvPackage;
    }

    public static void setDocumentDetailsEnabled(boolean enabled) {
        sDocumentDetailsEnabled = enabled;
    }

    public static boolean getDocumentDetailsEnabled() {
        return sDocumentDetailsEnabled;
    }

    public static void setGestureScaleEnabled(boolean enabled) {
        sGestureScaleEnabled = enabled;
    }
Loading