显示自定义的对话框
来源:互联网 发布:2016淘宝top排行榜 编辑:程序博客网 时间:2024/06/05 20:10
public class DialogActivity extends Activity { @Overrideprotected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_LEFT_ICON); setContentView(R.layout.dialog_activity); getWindow().setFeatureDrawableResource(Window.FEATURE_LEFT_ICON, android.R.drawable.ic_dialog_alert); }}
dialog_activity.xml
<?xml version="1.0" encoding="utf-8"?><TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/text" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center_vertical|center_horizontal" android:text="@string/dialog_activity_text"/>
第一次看到没有layout布局的xml吧
关键在下面
<activity android:name=".app.DialogActivity" android:label="@string/activity_dialog" android:theme="@android:style/Theme.Dialog"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.SAMPLE_CODE" /> </intent-filter> </activity>
android:theme="@android:style/Theme.Dialog"
ok这么简单应该看的懂了吧 看不懂运行一下。。
- 显示自定义的对话框
- Android自定义底部显示对话框
- Toast自定义对话框居中显示
- 自定义Dialog 多种显示对话框
- 在自定义对话框中显示Gallery的效果实现
- Android 自定义弹出对话框显示不全的问题
- 自定义对话框,使弹出的对话框变为Viewpager加tab显示。
- 自定义的JS对话框
- javascript自定义的对话框
- 自定义对话框的制作
- 自定义对话框的总结
- Dialog对话框的自定义
- 安卓中 自定义的对话框
- 自定义的对话框
- 自定义布局的对话框
- android对话框的显示
- AlertDialog自定义对话框显示黑色边框
- 常见对话框与自定义的的对话框
- Magento 新闻模块开发教程 (七) 建立模块的SQL
- C 数组初始化
- C# System.UnauthorizedAccessException 此问题的解决方法
- Awesome Note Iphone上的记事本
- 我的博客开通了
- 显示自定义的对话框
- HibernateIDTest.testUpdate Unrooted Tests initializationError(org.junit.runner.manipulation.Filter)
- 在Eclipse中为新建java文件自动添加文件头
- 在analyze window中撤销已执行的sql query
- C语言学习参考(基础&进阶)
- java中final的意义
- RTP/RTCP 视频数据传输
- 关于get()和getline()
- xml SelectSingleNode 根据属性来选择节点