I have added a popup Selection Palette, containing "Map Pin" and "List" icons. You can minimize the popup by clicking on the section in Green on the left side bottom corner of the screen.
How can I do that-
You need to follow 4 steps-
1. Override LinearLayout
Create a Class MyLinearLayout.java which should overwrite LinearLayout
2. Drawing
You need to overwrite dispatchDraw(Canvas canvas) method. It gives control to the whole screen. Make sure you set android:layout_height="fill_parent" for the associated layout definition in XML. You can draw anything and anywhere on the canvas. dispatchDraw(Canvas canvas) gets called only after underlying views are drawn, so whatever you draw comes in the foreground.3. Event Handling
You need to overwrite dispatchTouchEvent(MotionEvent e) method. onTouchEvent(MotionEvent e) doesn't work. Make sure you don't pass click event controls when user clicks on your specific drawing region.4. Using your custom Layout on XML
You can now use your custom Layout class in Layout XML files (define your class name with package, see below example) -You can download complete source code from here.