Skip to content

Commit

Permalink
Rename package
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelbcr committed Nov 22, 2016
1 parent a4640c1 commit e632d00
Show file tree
Hide file tree
Showing 54 changed files with 199 additions and 203 deletions.
3 changes: 0 additions & 3 deletions .idea/copyright/profiles_settings.xml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2016 Fuck Boilerplate
Copyright 2016 Miguel Garcia

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Every feature RxPaparazzo exposes can be accessed from both, an `activity` or a

**Limitation:**: Your fragments need to extend from `android.support.v4.app.Fragment` instead of `android.app.Fragment`, otherwise they won't be notified.

The generic type of the `observable` returned by RxPaparazzo when subscribing to any of its features is always an instance of [Response](https://github.com/FuckBoilerplate/RxPaparazzo/blob/master/rx_paparazzo/src/main/java/com/fuck_boilerplate/rx_paparazzo/entities/Response.java) class.
The generic type of the `observable` returned by RxPaparazzo when subscribing to any of its features is always an instance of [Response](https://github.com/miguelbcr/RxPaparazzo/blob/master/rx_paparazzo/src/main/java/com/miguelbcr/ui/rx_paparazzo2/entities/Response.java) class.

This instance holds a reference to the current Activity/Fragment, accessible calling `targetUI()` method. Because the original one may be recreated it would be unsafe calling it. Instead, you must call any method/variable of your Activity/Fragment from this instance encapsulated in the `response` instance.

Expand Down Expand Up @@ -129,14 +129,14 @@ The `response` instance holds a reference to the paths where the images were per
When asking RxPaparazzo for an image -whether it was retrieved using the built-in camera or via gallery, it's possible to apply some configurations to the action.

### Size options
[Size](https://github.com/FuckBoilerplate/RxPaparazzo/blob/master/rx_paparazzo/src/main/java/com/fuck_boilerplate/rx_paparazzo/entities/size/Size.java) values can be used to set the size of the image to retrieve. There are 4 options:
[Size](https://github.com/miguelbcr/RxPaparazzo/blob/master/rx_paparazzo/src/main/java/com/miguelbcr/ui/rx_paparazzo2/entities/size/Size.java) values can be used to set the size of the image to retrieve. There are 4 options:

* [SmallSize](https://github.com/FuckBoilerplate/RxPaparazzo/blob/master/rx_paparazzo/src/main/java/com/fuck_boilerplate/rx_paparazzo/entities/size/SmallSize.java): 1/8 aprox. of the screen resolution
* [ScreenSize](https://github.com/FuckBoilerplate/RxPaparazzo/blob/master/rx_paparazzo/src/main/java/com/fuck_boilerplate/rx_paparazzo/entities/size/ScreenSize.java): The size image matches aprox. the screen resolution.
* [OriginalSize](https://github.com/FuckBoilerplate/RxPaparazzo/blob/master/rx_paparazzo/src/main/java/com/fuck_boilerplate/rx_paparazzo/entities/size/OriginalSize.java): The original size of the image.
* [CustomMaxSize](https://github.com/FuckBoilerplate/RxPaparazzo/blob/master/rx_paparazzo/src/main/java/com/fuck_boilerplate/rx_paparazzo/entities/size/CustomMaxSize.java): Yot can specify max size you want and image will be scaled proportionally.
* [SmallSize](https://github.com/miguelbcr/RxPaparazzo/blob/master/rx_paparazzo/src/main/java/com/miguelbcr/ui/rx_paparazzo2/entities/size/SmallSize.java): 1/8 aprox. of the screen resolution
* [ScreenSize](https://github.com/miguelbcr/RxPaparazzo/blob/master/rx_paparazzo/src/main/java/com/miguelbcr/ui/rx_paparazzo2/entities/size/ScreenSize.java): The size image matches aprox. the screen resolution.
* [OriginalSize](https://github.com/miguelbcr/RxPaparazzo/blob/master/rx_paparazzo/src/main/java/com/miguelbcr/ui/rx_paparazzo2/entities/size/OriginalSize.java): The original size of the image.
* [CustomMaxSize](https://github.com/miguelbcr/RxPaparazzo/blob/master/rx_paparazzo/src/main/java/com/miguelbcr/ui/rx_paparazzo2/entities/size/CustomMaxSize.java): Yot can specify max size you want and image will be scaled proportionally.

[ScreenSize](https://github.com/FuckBoilerplate/RxPaparazzo/blob/master/rx_paparazzo/src/main/java/com/fuck_boilerplate/rx_paparazzo/entities/size/ScreenSize.java) value will be set as default.
[ScreenSize](https://github.com/miguelbcr/RxPaparazzo/blob/master/rx_paparazzo/src/main/java/com/miguelbcr/ui/rx_paparazzo2/entities/size/ScreenSize.java) value will be set as default.

```java
RxPaparazzo.takeImages(activityOrFragment)
Expand All @@ -154,7 +154,7 @@ RxPaparazzo.takeImages(activityOrFragment)

By calling `crop()` method when building the observable instance, all they images retrieved will be able to be cropped, regardless if the images were retrieved using the built-in camera or gallery, even if multiple images were requested in a single call using `takeImages()` approach.
Because uCrop Yalantis library exposes some configuration in order to customize the crop screen, RxPaparazzo exposes an overloaded method of `crop(UCrop.Options)` which allow to pass an instance of [UCrop.Options](https://github.com/Yalantis/uCrop/blob/master/ucrop/src/main/java/com/yalantis/ucrop/UCrop.java#L211).
If you need to configure the aspect ratio, the max result size or using the source image aspect ratio, you must pass an instance of [Options](https://github.com/FuckBoilerplate/RxPaparazzo/blob/master/rx_paparazzo/src/main/java/com/fuck_boilerplate/rx_paparazzo/entities/Options.java) class, which extends from `UCrop.Options` and adds the three missing properties.
If you need to configure the aspect ratio, the max result size or using the source image aspect ratio, you must pass an instance of [Options](https://github.com/miguelbcr/RxPaparazzo/blob/master/rx_paparazzo/src/main/java/com/miguelbcr/ui/rx_paparazzo2/entities/Options.java) class, which extends from `UCrop.Options` and adds the three missing properties.

```java
UCrop.Options options = new UCrop.Options();
Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ android {
buildToolsVersion "24.0.1"

defaultConfig {
applicationId "com.fuck_boilerplate.rx_paparazzo.sample"
applicationId "com.miguelbcr.ui.rx_paparazzo2.sample"
minSdkVersion 16
targetSdkVersion 24
versionCode 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fuck_boilerplate.rx_paparazzo.sample;
package com.miguelbcr.ui.rx_paparazzo2.sample;

import android.app.Activity;
import android.content.Context;
Expand All @@ -17,15 +17,15 @@
import android.view.View;
import android.view.WindowManager;
import android.widget.ImageView;
import com.fuck_boilerplate.rx_paparazzo.entities.Config;
import com.fuck_boilerplate.rx_paparazzo.entities.TargetUi;
import com.fuck_boilerplate.rx_paparazzo.entities.size.Size;
import com.fuck_boilerplate.rx_paparazzo.interactors.DownloadImage;
import com.fuck_boilerplate.rx_paparazzo.interactors.GetDimens;
import com.fuck_boilerplate.rx_paparazzo.interactors.GetPath;
import com.fuck_boilerplate.rx_paparazzo.interactors.ImageUtils;
import com.fuck_boilerplate.rx_paparazzo.sample.activities.StartActivity;
import com.fuck_boilerplate.rx_paparazzo.sample.activities.Testable;
import com.miguelbcr.ui.rx_paparazzo2.entities.Config;
import com.miguelbcr.ui.rx_paparazzo2.entities.TargetUi;
import com.miguelbcr.ui.rx_paparazzo2.entities.size.Size;
import com.miguelbcr.ui.rx_paparazzo2.interactors.DownloadImage;
import com.miguelbcr.ui.rx_paparazzo2.interactors.GetDimens;
import com.miguelbcr.ui.rx_paparazzo2.interactors.GetPath;
import com.miguelbcr.ui.rx_paparazzo2.interactors.ImageUtils;
import com.miguelbcr.ui.rx_paparazzo2.sample.activities.StartActivity;
import com.miguelbcr.ui.rx_paparazzo2.sample.activities.Testable;
import java.io.File;
import java.util.List;
import org.hamcrest.Description;
Expand All @@ -41,7 +41,7 @@
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static com.fuck_boilerplate.rx_paparazzo.sample.recyclerview.RecyclerViewUtils.withRecyclerView;
import static com.miguelbcr.ui.rx_paparazzo2.sample.recyclerview.RecyclerViewUtils.withRecyclerView;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.lessThan;
import static org.hamcrest.core.CombinableMatcher.both;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fuck_boilerplate.rx_paparazzo.sample.recyclerview;
package com.miguelbcr.ui.rx_paparazzo2.sample.recyclerview;

import android.content.res.Resources;
import android.support.v7.widget.RecyclerView;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fuck_boilerplate.rx_paparazzo.sample.recyclerview;
package com.miguelbcr.ui.rx_paparazzo2.sample.recyclerview;

public class RecyclerViewUtils {

Expand Down
10 changes: 5 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.fuck_boilerplate.rx_paparazzo.sample">
package="com.miguelbcr.ui.rx_paparazzo2.sample">

<uses-permission android:name="android.permission.CAMERA"/>

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:name="com.fuck_boilerplate.rx_paparazzo.sample.SampleApplication"
android:name="com.miguelbcr.ui.rx_paparazzo2.sample.SampleApplication"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme.NoActionBar">

<activity android:name="com.fuck_boilerplate.rx_paparazzo.sample.activities.StartActivity"
<activity android:name="com.miguelbcr.ui.rx_paparazzo2.sample.activities.StartActivity"
android:configChanges="orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<activity android:name="com.fuck_boilerplate.rx_paparazzo.sample.activities.SampleActivity"/>
<activity android:name="com.miguelbcr.ui.rx_paparazzo2.sample.activities.SampleActivity"/>

<activity android:name="com.fuck_boilerplate.rx_paparazzo.sample.activities.HostActivitySampleFragment"/>
<activity android:name="com.miguelbcr.ui.rx_paparazzo2.sample.activities.HostActivitySampleFragment"/>

</application>

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016 FuckBoilerplate
* Copyright 2016 Miguel Garcia
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,7 +14,7 @@
* limitations under the License.
*/

package com.fuck_boilerplate.rx_paparazzo.sample;
package com.miguelbcr.ui.rx_paparazzo2.sample;

import android.app.Activity;
import android.app.Application;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.fuck_boilerplate.rx_paparazzo.sample;
package com.miguelbcr.ui.rx_paparazzo2.sample;

import android.app.Activity;
import android.app.Application;
import android.support.annotation.Nullable;

import com.fuck_boilerplate.rx_paparazzo.RxPaparazzo;
import com.miguelbcr.ui.rx_paparazzo2.RxPaparazzo;

/**
* Created by miguel on 16/03/2016.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fuck_boilerplate.rx_paparazzo.sample;
package com.miguelbcr.ui.rx_paparazzo2.sample;


public class SampleHelper {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.fuck_boilerplate.rx_paparazzo.sample.activities;
package com.miguelbcr.ui.rx_paparazzo2.sample.activities;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.fuck_boilerplate.rx_paparazzo.entities.size.Size;
import com.fuck_boilerplate.rx_paparazzo.sample.R;
import com.fuck_boilerplate.rx_paparazzo.sample.fragments.SampleFragment;
import com.miguelbcr.ui.rx_paparazzo2.entities.size.Size;
import com.miguelbcr.ui.rx_paparazzo2.sample.R;
import com.miguelbcr.ui.rx_paparazzo2.sample.fragments.SampleFragment;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fuck_boilerplate.rx_paparazzo.sample.activities;
package com.miguelbcr.ui.rx_paparazzo2.sample.activities;

import android.content.res.Configuration;
import android.os.Bundle;
Expand All @@ -11,13 +11,13 @@
import android.widget.ImageView;
import android.widget.Toast;

import com.fuck_boilerplate.rx_paparazzo.RxPaparazzo;
import com.fuck_boilerplate.rx_paparazzo.entities.size.CustomMaxSize;
import com.fuck_boilerplate.rx_paparazzo.entities.size.OriginalSize;
import com.fuck_boilerplate.rx_paparazzo.entities.size.Size;
import com.fuck_boilerplate.rx_paparazzo.entities.size.SmallSize;
import com.fuck_boilerplate.rx_paparazzo.sample.R;
import com.fuck_boilerplate.rx_paparazzo.sample.adapters.ImagesAdapter;
import com.miguelbcr.ui.rx_paparazzo2.RxPaparazzo;
import com.miguelbcr.ui.rx_paparazzo2.entities.size.CustomMaxSize;
import com.miguelbcr.ui.rx_paparazzo2.entities.size.OriginalSize;
import com.miguelbcr.ui.rx_paparazzo2.entities.size.Size;
import com.miguelbcr.ui.rx_paparazzo2.entities.size.SmallSize;
import com.miguelbcr.ui.rx_paparazzo2.sample.R;
import com.miguelbcr.ui.rx_paparazzo2.sample.adapters.ImagesAdapter;
import com.squareup.picasso.Picasso;
import com.yalantis.ucrop.UCrop;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.fuck_boilerplate.rx_paparazzo.sample.activities;
package com.miguelbcr.ui.rx_paparazzo2.sample.activities;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.fuck_boilerplate.rx_paparazzo.sample.R;
import com.miguelbcr.ui.rx_paparazzo2.sample.R;

public class StartActivity extends AppCompatActivity {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.miguelbcr.ui.rx_paparazzo2.sample.activities;


import com.miguelbcr.ui.rx_paparazzo2.entities.size.Size;

import java.util.List;

public interface Testable<T> {
List<String> getFilePaths();

Size getSize();
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.fuck_boilerplate.rx_paparazzo.sample.adapters;
package com.miguelbcr.ui.rx_paparazzo2.sample.adapters;

import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import com.fuck_boilerplate.rx_paparazzo.sample.R;
import com.miguelbcr.ui.rx_paparazzo2.sample.R;
import com.squareup.picasso.Picasso;

import java.io.File;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fuck_boilerplate.rx_paparazzo.sample.fragments;
package com.miguelbcr.ui.rx_paparazzo2.sample.fragments;

import android.app.Activity;
import android.os.Bundle;
Expand All @@ -12,14 +12,14 @@
import android.widget.ImageView;
import android.widget.Toast;

import com.fuck_boilerplate.rx_paparazzo.RxPaparazzo;
import com.fuck_boilerplate.rx_paparazzo.entities.Options;
import com.fuck_boilerplate.rx_paparazzo.entities.size.OriginalSize;
import com.fuck_boilerplate.rx_paparazzo.entities.size.Size;
import com.fuck_boilerplate.rx_paparazzo.entities.size.SmallSize;
import com.fuck_boilerplate.rx_paparazzo.sample.R;
import com.fuck_boilerplate.rx_paparazzo.sample.activities.Testable;
import com.fuck_boilerplate.rx_paparazzo.sample.adapters.ImagesAdapter;
import com.miguelbcr.ui.rx_paparazzo2.RxPaparazzo;
import com.miguelbcr.ui.rx_paparazzo2.entities.Options;
import com.miguelbcr.ui.rx_paparazzo2.entities.size.OriginalSize;
import com.miguelbcr.ui.rx_paparazzo2.entities.size.Size;
import com.miguelbcr.ui.rx_paparazzo2.entities.size.SmallSize;
import com.miguelbcr.ui.rx_paparazzo2.sample.R;
import com.miguelbcr.ui.rx_paparazzo2.sample.activities.Testable;
import com.miguelbcr.ui.rx_paparazzo2.sample.adapters.ImagesAdapter;
import com.squareup.picasso.Picasso;
import com.yalantis.ucrop.UCrop;

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/host_activity_sample_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
android:id="@+id/sample_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.fuck_boilerplate.rx_paparazzo.sample.fragments.SampleFragment"
class="com.miguelbcr.ui.rx_paparazzo2.sample.fragments.SampleFragment"
tools:layout="@layout/sample_layout" />

</LinearLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<resources>
<string name="app_name">RxPaparazzo</string>
<string name="app_name">RxPaparazzo-2</string>
<string name="action_settings">Settings</string>
<string name="user_canceled">User canceled action</string>
<string name="user_did_not_grant_permissions">User has not accepted permissions</string>
Expand Down
2 changes: 1 addition & 1 deletion rx_paparazzo/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'

group='com.github.FuckBoilerplate'
group='com.github.miguelbcr'

buildscript {
repositories {
Expand Down
2 changes: 1 addition & 1 deletion rx_paparazzo/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.fuck_boilerplate.rx_paparazzo.library">
package="com.miguelbcr.ui.rx_paparazzo2.library">

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016 FuckBoilerplate
* Copyright 2016 Miguel Garcia
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,17 +14,17 @@
* limitations under the License.
*/

package com.fuck_boilerplate.rx_paparazzo;
package com.miguelbcr.ui.rx_paparazzo2;

import android.app.Activity;
import android.app.Application;
import android.support.v4.app.Fragment;

import com.fuck_boilerplate.rx_paparazzo.entities.Config;
import com.fuck_boilerplate.rx_paparazzo.entities.Response;
import com.fuck_boilerplate.rx_paparazzo.entities.size.Size;
import com.fuck_boilerplate.rx_paparazzo.internal.di.ApplicationComponent;
import com.fuck_boilerplate.rx_paparazzo.internal.di.ApplicationModule;
import com.miguelbcr.ui.rx_paparazzo2.entities.Config;
import com.miguelbcr.ui.rx_paparazzo2.entities.Response;
import com.miguelbcr.ui.rx_paparazzo2.entities.size.Size;
import com.miguelbcr.ui.rx_paparazzo2.internal.di.ApplicationComponent;
import com.miguelbcr.ui.rx_paparazzo2.internal.di.ApplicationModule;
import com.yalantis.ucrop.UCrop;

import io.reactivex.Observable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016 FuckBoilerplate
* Copyright 2016 Miguel Garcia
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,10 +14,10 @@
* limitations under the License.
*/

package com.fuck_boilerplate.rx_paparazzo.entities;
package com.miguelbcr.ui.rx_paparazzo2.entities;

import com.fuck_boilerplate.rx_paparazzo.entities.size.ScreenSize;
import com.fuck_boilerplate.rx_paparazzo.entities.size.Size;
import com.miguelbcr.ui.rx_paparazzo2.entities.size.ScreenSize;
import com.miguelbcr.ui.rx_paparazzo2.entities.size.Size;
import com.yalantis.ucrop.UCrop;

public class Config {
Expand Down
Loading

0 comments on commit e632d00

Please sign in to comment.