Skip to content

Editing Photos

Gabriel Aumala edited this page Jul 21, 2016 · 1 revision

Users can send photos taken with the device's camera or stored in the gallery. They also expect expect some basic photo editing before sending. Monkey Kit UI provides an activity for editing that supports cropping and rotating. You must declare it in your manifest like this:

        <activity
            android:name="com.criptext.monkeykitui.input.photoEditor.PhotoEditorActivity"
            android:theme="@style/myCustomTheme"
            android:label="@string/mk_edit_photo"/>

The mk_edit_photo string has "Edit Photo" in multiple languages, which makes a great title for this activity, but you could use any string you want. Additionally, in your manifest you can even set your own theme. By default it looks something like this:

screenshot_2016-07-21-16-41-50

To customize the "Use" Button that commits changes to a picture and finishes the photo editing you must declare your own EditPhoto.CommitPhotoChanges style in your styles.xml. You can change the background, text and text color like this:

    <style name="EditPhoto.CommitPhotoChangesButton">
        <item name="android:text">@string/my_photo_changes_str</item>
        <item name="android:background">@drawable/my_custom_button</item>
        <item name="android:textColor">@color/my_custom_color</item>
    </style>

These are the only supported attributes, but further customizations are possible.

Clone this wiki locally