Prefix resources to avoid clashes
|
|
@ -138,7 +138,7 @@ public class Crop {
|
|||
try {
|
||||
activity.startActivityForResult(intent, REQUEST_PICK);
|
||||
} catch (ActivityNotFoundException e) {
|
||||
Toast.makeText(activity, R.string.error_pick_image, Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(activity, R.string.crop__pick_error, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ public class CropImageActivity extends MonitoredActivity {
|
|||
public void onCreate(Bundle icicle) {
|
||||
super.onCreate(icicle);
|
||||
requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
setContentView(R.layout.activity_crop);
|
||||
setContentView(R.layout.crop__activity_crop);
|
||||
initViews();
|
||||
|
||||
setupFromIntent();
|
||||
|
|
@ -143,7 +143,7 @@ public class CropImageActivity extends MonitoredActivity {
|
|||
return;
|
||||
}
|
||||
mImageView.setImageRotateBitmapResetBase(mRotateBitmap, true);
|
||||
Util.startBackgroundJob(this, null, getResources().getString(R.string.wait),
|
||||
Util.startBackgroundJob(this, null, getResources().getString(R.string.crop__wait),
|
||||
new Runnable() {
|
||||
public void run() {
|
||||
final CountDownLatch latch = new CountDownLatch(1);
|
||||
|
|
@ -285,7 +285,7 @@ public class CropImageActivity extends MonitoredActivity {
|
|||
private void saveImage(Bitmap croppedImage) {
|
||||
if (croppedImage != null) {
|
||||
final Bitmap b = croppedImage;
|
||||
Util.startBackgroundJob(this, null, getResources().getString(R.string.saving),
|
||||
Util.startBackgroundJob(this, null, getResources().getString(R.string.crop__saving),
|
||||
new Runnable() {
|
||||
public void run() {
|
||||
saveOutput(b);
|
||||
|
|
|
|||
|
|
@ -90,8 +90,8 @@ class HighlightView {
|
|||
|
||||
private void initResources() {
|
||||
android.content.res.Resources resources = mContext.getResources();
|
||||
mResizeDrawableWidth = resources.getDrawable(R.drawable.crop_width);
|
||||
mResizeDrawableHeight = resources.getDrawable(R.drawable.crop_height);
|
||||
mResizeDrawableWidth = resources.getDrawable(R.drawable.crop__handle_width);
|
||||
mResizeDrawableHeight = resources.getDrawable(R.drawable.crop__handle_height);
|
||||
}
|
||||
|
||||
protected void draw(Canvas canvas) {
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 76 B After Width: | Height: | Size: 76 B |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 76 B After Width: | Height: | Size: 76 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 83 B After Width: | Height: | Size: 83 B |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 142 B After Width: | Height: | Size: 142 B |
|
|
@ -5,13 +5,13 @@
|
|||
|
||||
<item android:state_pressed="true">
|
||||
<shape>
|
||||
<solid android:color="@color/selector_pressed" />
|
||||
<solid android:color="@color/crop__selector_pressed" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<item android:state_focused="true">
|
||||
<shape>
|
||||
<solid android:color="@color/selector_focused" />
|
||||
<solid android:color="@color/crop__selector_focused" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:src="@drawable/tile"
|
||||
android:src="@drawable/crop__tile"
|
||||
android:tileMode="repeat" />
|
||||
|
|
@ -7,13 +7,13 @@
|
|||
|
||||
<include
|
||||
android:id="@+id/done_cancel_bar"
|
||||
layout="@layout/layout_done_cancel" />
|
||||
layout="@layout/crop__layout_done_cancel" />
|
||||
|
||||
<com.soundcloud.android.crop.CropImageView
|
||||
android:id="@+id/crop_image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/texture"
|
||||
android:background="@drawable/crop__texture"
|
||||
android:layout_below="@id/done_cancel_bar" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<resources>
|
||||
|
||||
<dimen name="bar_height">40dp</dimen>
|
||||
<dimen name="crop__bar_height">40dp</dimen>
|
||||
|
||||
</resources>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<resources>
|
||||
|
||||
<dimen name="bar_height">56dp</dimen>
|
||||
<dimen name="crop__bar_height">56dp</dimen>
|
||||
|
||||
</resources>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<resources>
|
||||
|
||||
<dimen name="bar_height">56dp</dimen>
|
||||
<dimen name="crop__bar_height">56dp</dimen>
|
||||
|
||||
</resources>
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
<resources>
|
||||
|
||||
<color name="button_bar">#f3f3f3</color>
|
||||
<color name="button_text">#666666</color>
|
||||
<color name="selector_pressed">#1a000000</color>
|
||||
<color name="selector_focused">#77000000</color>
|
||||
<color name="crop__button_bar">#f3f3f3</color>
|
||||
<color name="crop__button_text">#666666</color>
|
||||
<color name="crop__selector_pressed">#1a000000</color>
|
||||
<color name="crop__selector_focused">#77000000</color>
|
||||
|
||||
</resources>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<resources>
|
||||
|
||||
<dimen name="bar_height">48dp</dimen>
|
||||
<dimen name="crop__bar_height">48dp</dimen>
|
||||
|
||||
</resources>
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<string name="saving">Saving picture…</string>
|
||||
<string name="wait">Please wait…</string>
|
||||
<string name="error_pick_image">No image sources available</string>
|
||||
<string name="crop__saving">Saving picture…</string>
|
||||
<string name="crop__wait">Please wait…</string>
|
||||
<string name="crop__pick_error">No image sources available</string>
|
||||
|
||||
<string name="done">DONE</string>
|
||||
<string name="cancel" tools:ignore="ButtonCase">CANCEL</string>
|
||||
<string name="crop__done">DONE</string>
|
||||
<string name="crop__cancel" tools:ignore="ButtonCase">CANCEL</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -2,19 +2,19 @@
|
|||
|
||||
<style name="DoneCancelBar">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">@dimen/bar_height</item>
|
||||
<item name="android:layout_height">@dimen/crop__bar_height</item>
|
||||
<item name="android:orientation">horizontal</item>
|
||||
<item name="android:divider">@drawable/divider</item>
|
||||
<item name="android:divider">@drawable/crop__divider</item>
|
||||
<item name="android:showDividers" tools:ignore="NewApi">middle</item>
|
||||
<item name="android:dividerPadding" tools:ignore="NewApi">12dp</item>
|
||||
<item name="android:background">@color/button_bar</item>
|
||||
<item name="android:background">@color/crop__button_bar</item>
|
||||
</style>
|
||||
|
||||
<style name="ActionButton">
|
||||
<item name="android:layout_width">0dp</item>
|
||||
<item name="android:layout_height">match_parent</item>
|
||||
<item name="android:layout_weight">1</item>
|
||||
<item name="android:background">@drawable/selectable_background</item>
|
||||
<item name="android:background">@drawable/crop__selectable_background</item>
|
||||
</style>
|
||||
|
||||
<style name="ActionButtonText">
|
||||
|
|
@ -24,19 +24,19 @@
|
|||
<item name="android:gravity">center_vertical</item>
|
||||
<item name="android:paddingRight">20dp</item> <!-- Offsets left drawable -->
|
||||
<item name="android:drawablePadding">8dp</item>
|
||||
<item name="android:textColor">@color/button_text</item>
|
||||
<item name="android:textColor">@color/crop__button_text</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textSize">13sp</item>
|
||||
</style>
|
||||
|
||||
<style name="ActionButtonText.Done">
|
||||
<item name="android:drawableLeft">@drawable/ic_action_done</item>
|
||||
<item name="android:text">@string/done</item>
|
||||
<item name="android:drawableLeft">@drawable/crop__ic_done</item>
|
||||
<item name="android:text">@string/crop__done</item>
|
||||
</style>
|
||||
|
||||
<style name="ActionButtonText.Cancel">
|
||||
<item name="android:drawableLeft">@drawable/ic_action_cancel</item>
|
||||
<item name="android:text">@string/cancel</item>
|
||||
<item name="android:drawableLeft">@drawable/crop__ic_cancel</item>
|
||||
<item name="android:text">@string/crop__cancel</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||