min height fill_parent and height wrap_content in ScrollView? (or just the email app compose layout's code)

后端 未结 4 360
时光说笑
时光说笑 2021-02-01 03:57

Question If I have the following:


    

        
4条回答
  •  花落未央
    2021-02-01 04:45

    after you call

    AlertDialog dialog = builder.show();
    

    then call

    fixScrollViewHeight(scrollView);
    
    private void fixScrollViewHeight(ScrollView scrollView)
    {
        int screenHeight = activity.getWindowManager().getDefaultDisplay().getHeight();
        LayoutParams lp = scrollView.getLayoutParams();
        lp.height = screenHeight / 3;
        scrollView.setLayoutParams(lp);
    }
    

提交回复
热议问题