Android Borderless Dialog

后端 未结 8 1813
囚心锁ツ
囚心锁ツ 2020-12-02 14:29

I have created an AlertDialog using AlertDialog.Builder, but the Dialog border takes up too much space on the screen. How do I remove the border? I have tried using another

8条回答
  •  醉梦人生
    2020-12-02 15:29

    if you have 2 border you need to use a ContextThemeWrapper, which it will show only one border as you would like :)

    ContextThemeWrapper wrapper = new ContextThemeWrapper(this, android.R.style.Theme_Holo);
    final LayoutInflater inflater = (LayoutInflater) wrapper.getSystemService(LAYOUT_INFLATER_SERVICE);
    AlertDialog.Builder builder = new AlertDialog.Builder(wrapper);
    

提交回复
热议问题