I have to make custom (I can set my layout.xml) floating window where I can control Xco and Yco.
With Toast (in timer) I can achieve this but I have to avoid unnecessary timer.
I come across some library say, SuperToolTip (we can't control X and Y; rather we placed against some drawable) StandOut (here we can control Xco and Yco but it uses Services for just a simple thing)
Please help me.
EDITED
final Dialog dialog = new Dialog(MainActivity.this, android.R.style.Theme_Translucent_NoTitleBar);
Window window = dialog.getWindow();
WindowManager.LayoutParams wlp = window.getAttributes();
wlp.x = 0;
wlp.y = 200;
wlp.width = 800;
wlp.height= 400;
window.setAttributes(wlp);
dialog.setTitle(null);
View view = getLayoutInflater().inflate(R.layout.layout_audio_recording_hint, null);
dialog.setContentView(view);
dialog.setCancelable(false);
ImageButton imgBtnCloseDialog = (ImageButton)view.findViewById(R.id.imgBtnCloseDialog);
imgBtnCloseDialog.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
dialog.cancel();
}
});
ImageButton imgBtnAudio = (ImageButton) findViewById(R.id.imgBtnAudio);
imgBtnAudio.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
dialog.show();
}
});