I would like to display a single button on the top of another application. Skype for example.
I tried making an activity having a RelativeLayout and inside it i put a Button. But I couldn't make it in a way that the RelativeLayout is not touchable while the Button is Touchable. So i'm thinking of a way to do that by displaying only the Button when Skype is opened. So i'll be able to use skype and the button together in the same time.
The things i've tried using are :
getWindow().addFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);
but that made the whole Window
not touchable ( including the Button
inside the RelativeLayout
)
I was thinking if there is some method like :
(RelativeLayout)findViewById(R.id.relativeLayout1).makeNotTouchable() (Button)findViewById(R.id.button1).makeTouchable();
Please note that the above methods don't exist i'm just trying to make it clearer for you to understand what I would like to achieve.
Please note also that making the activity Translucent prevents the user from passing the touch events to the activity just behind it. It can display the activity behind it but we cannot pass the touch events through it.