android popwindow 解决opengl层叠上面的ui被覆盖的现象

1.初始化


Context mContext = SDMusicPlayBackActivity.this;   

         LayoutInflater mLayoutInflater = (LayoutInflater) mContext   
         .getSystemService(LAYOUT_INFLATER_SERVICE);   
         mSeekView = mLayoutInflater.inflate(R.layout.pop_seek, null);   
        mSeekPopupWindow=new PopupWindow(mSeekView, 800  ,50);
             
          //create the timer    
        Timer timer = new Timer();   

        timer.schedule(new initPopupWindow(), 1000);

2. private class initPopupWindow extends TimerTask{   
            @Override  
            public void run() {   
                Message message = new Message();   
                message.what = 30;   
                mHandler.sendMessage(message);   
            }          
        }   
        public void showPopupWindow() {   
            mSeekPopupWindow.showAtLocation(findViewById(R.id.id_sd_mediaplay), Gravity.BOTTOM, 0, 100);   
        }


3.注意通过消息发送popupwindow显示的时候要根据具体时间来调节,如果时间少了还是被覆盖,时间在3D显示完成后就可以了。用计时器解决点击弹出popupwindow现象。


你可能感兴趣的:(android,UI,timer,service,layout,Class)