allow using custom aspect ratio at wallpapers

This commit is contained in:
tibbi 2022-06-19 15:41:22 +02:00
parent df37488c86
commit e121a9b72b
2 changed files with 5 additions and 0 deletions

View file

@ -60,6 +60,7 @@ class SetWallpaperActivity : SimpleActivity(), CropImageView.OnCropImageComplete
override fun onOptionsItemSelected(item: MenuItem): Boolean { override fun onOptionsItemSelected(item: MenuItem): Boolean {
when (item.itemId) { when (item.itemId) {
R.id.save -> confirmWallpaper() R.id.save -> confirmWallpaper()
R.id.allow_changing_aspect_ratio -> crop_image_view.clearAspectRatio()
else -> return super.onOptionsItemSelected(item) else -> return super.onOptionsItemSelected(item)
} }
return true return true

View file

@ -6,4 +6,8 @@
android:icon="@drawable/ic_check_vector" android:icon="@drawable/ic_check_vector"
android:title="@string/save" android:title="@string/save"
app:showAsAction="ifRoom" /> app:showAsAction="ifRoom" />
<item
android:id="@+id/allow_changing_aspect_ratio"
android:title="@string/allow_changing_aspect_ratio"
app:showAsAction="never" />
</menu> </menu>