How to show one layout on top of the other programmatically in my case?

前端 未结 3 1210
清酒与你
清酒与你 2020-11-28 19:53

My main layout main.xml simply contains two LinearLayouts:

  • The 1st LinearLayout hosts a VideoView and a Button
3条回答
  •  爱一瞬间的悲伤
    2020-11-28 20:37

    The answer, given by Alexandru is working quite nice. As he said, it is important that this "accessor"-view is added as the last element. Here is some code which did the trick for me:

            ...
    
            ...
    
                
    
            
    
        
    
    
    
    
    
    
    
    
    

    in Java:

    final MaterialDialog materialDialog = (MaterialDialog) dialogInterface;
    
    FrameLayout frameLayout = (FrameLayout) materialDialog
            .findViewById(R.id.icon_frame_container);
    
    frameLayout.setOnTouchListener(
            new OnSwipeTouchListener(ShowCardActivity.this) {
    

提交回复
热议问题