zoukankan      html  css  js  c++  java
  • Android Dialog

    1. Android提供了对话框支持,包括如下类别:
      • AlertDialog:功能最丰富,应用最广泛的对话框
      • ProgressDialog:进度条对话框
      • DataPickerDialog:日期选择对话框
      • TimePickerDialog:事件选择对话框

    2. 自定义Dialog
      //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的上层接口类:
       
      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();
  • 相关阅读:
    五子棋项目
    判断是否是素数
    双链表
    九九乘法表
    栈和队列
    c排序
    蓝桥杯 接水问题 模拟
    蓝桥杯 调和数列问题
    蓝桥杯 Hanoi问题 递归
    蓝桥杯 排列问题
  • 原文地址:https://www.cnblogs.com/phenixyu/p/3969100.html
Copyright © 2011-2022 走看看