adding a Share button to the editor for sharing directly without saving
This commit is contained in:
parent
b2686a3097
commit
2e3a8cb658
2 changed files with 10 additions and 0 deletions
|
@ -120,6 +120,7 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
|
||||||
when (item.itemId) {
|
when (item.itemId) {
|
||||||
R.id.save_as -> saveImage()
|
R.id.save_as -> saveImage()
|
||||||
R.id.edit -> editWith()
|
R.id.edit -> editWith()
|
||||||
|
R.id.share -> shareImage()
|
||||||
else -> return super.onOptionsItemSelected(item)
|
else -> return super.onOptionsItemSelected(item)
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
|
@ -332,6 +333,10 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun shareImage() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private fun getFiltersAdapter() = bottom_actions_filter_list.adapter as? FiltersAdapter
|
private fun getFiltersAdapter() = bottom_actions_filter_list.adapter as? FiltersAdapter
|
||||||
|
|
||||||
private fun setupBottomActions() {
|
private fun setupBottomActions() {
|
||||||
|
|
|
@ -11,4 +11,9 @@
|
||||||
android:icon="@drawable/ic_edit"
|
android:icon="@drawable/ic_edit"
|
||||||
android:title="@string/edit_with"
|
android:title="@string/edit_with"
|
||||||
app:showAsAction="ifRoom"/>
|
app:showAsAction="ifRoom"/>
|
||||||
|
<item
|
||||||
|
android:id="@+id/share"
|
||||||
|
android:icon="@drawable/ic_share"
|
||||||
|
android:title="@string/share"
|
||||||
|
app:showAsAction="ifRoom"/>
|
||||||
</menu>
|
</menu>
|
||||||
|
|
Loading…
Reference in a new issue