In Android Studio right click on window.png, edit 9 patch, save as window_patch.9.png. Do similar for bar.png

Reference
https://developer.android.com/tools/help/draw9patch.html