使用styles.xml风格:
 
Style.xml代码 
<style name="FullScreenDialog" parent="android:style/Theme.Dialog"> 
    <item name="android:windowNoTitle">true</item> 
    <item name="android:windowFrame">@null</item> 
    <item name="android:windowIsFloating">true</item> 
    <item name="android:windowIsTranslucent">false</item> 
    <item name="android:background">@android:color/black</item> 
    <item name="android:windowBackground">@null</item> 
    <item name="android:backgroundDimEnabled">false</item> 
</style> 
使用AlertDialog的上层接口类:
 
Java代码 
Dialog reNameDialog = new Dialog(getContext(), R.style.FullScreenDialog); 
LayoutInflater mLayoutInflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE); 
View reNameView = mLayoutInflater.inflate(R.layout.audiorecord_rename, null); 
LayoutParams params = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); 
reNameDialog.addContentView(reNameView, params); 
reNameDialog.show(); 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-10
  • 2021-09-28
  • 2021-08-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-12
  • 2022-01-04
  • 2022-12-23
  • 2021-12-14
  • 2021-05-25
  • 2021-06-15
  • 2021-08-08
相关资源
相似解决方案