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

Commit 6fe165b7 authored by Ruben Brunk's avatar Ruben Brunk
Browse files

Moving crop to a separate activity. Refactoring.

Bug: 8526929

Change-Id: I8acf6d46de069dd84c31afea6b4a7ae8e1c2fcce
parent 7ce32619
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -247,6 +247,13 @@
                <category android:name="android.intent.category.DEFAULT" />
                <data android:mimeType="image/*" />
            </intent-filter>
        </activity>

        <activity
            android:name="com.android.gallery3d.filtershow.crop.CropActivity"
            android:label="@string/crop"
            android:theme="@style/Theme.FilterShow"
            android:configChanges="keyboardHidden|orientation|screenSize">
           <intent-filter android:label="@string/crop_label">
                <action android:name="com.android.camera.action.CROP" />
                <data android:scheme="http" />
+55 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2012 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.
-->

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/mainView"
    android:background="@drawable/filtershow_tiled_background">

    <LinearLayout
        android:id="@+id/mainPanel"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:orientation="vertical" >

        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1" >

            <com.android.gallery3d.filtershow.crop.CropView
                android:id="@+id/cropView"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />

            <ProgressBar
                android:id="@+id/loading"
                style="@android:style/Widget.Holo.ProgressBar.Large"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:indeterminate="true"
                android:indeterminateOnly="true"
                android:background="@color/background_screen" />

        </FrameLayout>

    </LinearLayout>

</FrameLayout>
+1 −1
Original line number Diff line number Diff line
@@ -64,8 +64,8 @@ import com.android.gallery3d.common.ApiHelper;
import com.android.gallery3d.exif.ExifInterface;
import com.android.gallery3d.exif.ExifTag;
import com.android.gallery3d.exif.Rational;
import com.android.gallery3d.filtershow.CropExtras;
import com.android.gallery3d.filtershow.FilterShowActivity;
import com.android.gallery3d.filtershow.crop.CropExtras;
import com.android.gallery3d.util.UsageStatistics;

import java.io.File;
+1 −1
Original line number Diff line number Diff line
@@ -39,8 +39,8 @@ import com.android.gallery3d.data.MediaItem;
import com.android.gallery3d.data.MediaObject;
import com.android.gallery3d.data.MediaSet;
import com.android.gallery3d.data.Path;
import com.android.gallery3d.filtershow.CropExtras;
import com.android.gallery3d.filtershow.FilterShowActivity;
import com.android.gallery3d.filtershow.crop.CropExtras;
import com.android.gallery3d.glrenderer.FadeTexture;
import com.android.gallery3d.glrenderer.GLCanvas;
import com.android.gallery3d.ui.ActionModeHandler;
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ import android.view.Display;

import com.android.gallery3d.common.ApiHelper;
import com.android.gallery3d.filtershow.FilterShowActivity;
import com.android.gallery3d.filtershow.CropExtras;
import com.android.gallery3d.filtershow.crop.CropExtras;

/**
 * Wallpaper picker for the gallery application. This just redirects to the
Loading