android:title="@string/aspect1to1_effect"/>
<item
android:id="@+id/crop_menu_4to6"
+ android:visible="false"
android:title="@string/aspect4to6_effect"/>
<item
+ android:id="@+id/crop_menu_4to3"
+ android:title="@string/aspect4to3_effect"/>
+ <item
+ android:id="@+id/crop_menu_3to4"
+ android:title="@string/aspect3to4_effect"/>
+ <item
android:id="@+id/crop_menu_5to7"
android:title="@string/aspect5to7_effect"/>
<item
+ android:id="@+id/crop_menu_7to5"
+ android:title="@string/aspect7to5_effect"/>
+ <item
android:id="@+id/crop_menu_9to16"
+ android:visible="false"
android:title="@string/aspect9to16_effect"/>
<item
android:id="@+id/crop_menu_none"
android:title="@string/aspectOriginal_effect"/>
</group>
-</menu>
\ No newline at end of file
+</menu>
<string name="aspect">Aspect</string>
<!-- Label for the aspect 1:1 effect [CHAR LIMIT=15] -->
<string name="aspect1to1_effect">1:1</string>
+ <!-- Label for the aspect 4:3 effect [CHAR LIMIT=15] -->
+ <string name="aspect4to3_effect">4:3</string>
+ <!-- Label for the aspect 3:4 effect [CHAR LIMIT=15] -->
+ <string name="aspect3to4_effect">3:4</string>
<!-- Label for the aspect 4:7 effect [CHAR LIMIT=15] -->
<string name="aspect4to6_effect">4:6</string>
- <!-- Label for the aspect 1:1 effect [CHAR LIMIT=15] -->
+ <!-- Label for the aspect 5:7 effect [CHAR LIMIT=15] -->
<string name="aspect5to7_effect">5:7</string>
+ <!-- Label for the aspect 7:5 effect [CHAR LIMIT=15] -->
+ <string name="aspect7to5_effect">7:5</string>
<!-- Label for the aspect 1:1 effect [CHAR LIMIT=15] -->
<string name="aspect9to16_effect">16:9</string>
<!-- Label for the aspect None effect [CHAR LIMIT=15] -->
imageCrop.apply(1, 1);
break;
}
- case R.id.crop_menu_4to6: {
- button.setText(mContext.getString(R.string.aspect4to6_effect));
- imageCrop.apply(6, 4);
+ case R.id.crop_menu_4to3: {
+ button.setText(mContext.getString(R.string.aspect4to3_effect));
+ imageCrop.apply(4, 3);
+ break;
+ }
+ case R.id.crop_menu_3to4: {
+ button.setText(mContext.getString(R.string.aspect3to4_effect));
+ imageCrop.apply(3, 4);
break;
}
case R.id.crop_menu_5to7: {
button.setText(mContext.getString(R.string.aspect5to7_effect));
- imageCrop.apply(7, 5);
+ imageCrop.apply(5, 7);
break;
}
- case R.id.crop_menu_9to16: {
- button.setText(mContext.getString(R.string.aspect9to16_effect));
- imageCrop.apply(16, 9);
+ case R.id.crop_menu_7to5: {
+ button.setText(mContext.getString(R.string.aspect7to5_effect));
+ imageCrop.apply(7, 5);
break;
}
case R.id.crop_menu_none: {
float deltaY = dY / scale;
int select = movingEdges;
if (mFixAspectRatio && (select != MOVE_BLOCK)) {
+
+ // TODO: add in orientation change for fixed aspect
+ /*if (select == TOP_LEFT || select == TOP_RIGHT ||
+ select == BOTTOM_LEFT || select == BOTTOM_RIGHT){
+ RectF blank = new RectF();
+ if(switchCropBounds(select, blank)){
+ setCropBounds(blank);
+ return;
+ }
+ }*/
if (select == MOVE_LEFT) {
select |= MOVE_TOP;
}
if (select == MOVE_BOTTOM) {
select |= MOVE_RIGHT;
}
- RectF blank = new RectF();
- if(switchCropBounds(select, blank)){
- setCropBounds(blank);
- return;
- }
}
if (select == MOVE_BLOCK) {