1
제대로 말할 수 있는지 잘 모르겠습니다. 다른 응용 프로그램에서봤을 때, 사용자가 작업 표시 줄의 검색 버튼을 클릭하면 작업 표시 줄 아래에 대화 상자가 열리고 아래쪽에 손가락을 올려 놓아 닫을 수 있습니다.android- 작업 표시 줄 아래에서 대화 상자를 여는 방법
어떻게 이런 일을 할 수 있습니까? 이 도움이 될 것입니다
public void showMenu(){
final PopupWindow popupWindow = new PopupWindow(this);
// Create some group view to show up
GroupView view = ....
// set some pupup window properties
popupWindow.setFocusable(true);
popupWindow.setWidth(LayoutParams.WRAP_CONTENT);
popupWindow.setHeight(LayoutParams.WRAP_CONTENT);
// set your group view as a popup window content
popupWindow.setContentView(view);
// This will allow you to close window by clickin not in its area
popupWindow.setOutsideTouchable(true);
// Show the window at desired place. The first argument is a control, wich will be used to place window... defining dx and dy will shift the popup window
popupWindow.showAsDropDown(controlToShowAt, dx, dy);
}
희망 :