Press back to hide post window in android

in android, when users editing a post and click back, they may want to hide the edit window. not go back to last page and keep the edit button. Could we do something to handle back event and contract the window rather than go back?

since google chrome don’t have back button in UI. it’s ok to handle all history back event in android.