对话的主题活动:正负按钮 [英] Dialog themed activity : postive and negative buttons

查看:168
本文介绍了对话的主题活动:正负按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想主题活动为 AlertDialog 。我现在面临的问题是,我不能找到一个办法把我的窗口的底部,将看起来像一个积极的和消极的按钮 AlertDialog 两个按钮

I'm trying to theme an activity as an AlertDialog. The problem I'm facing is that I can't find a way to put two buttons on the bottom of my window that would look like the positive and negative buttons of an AlertDialog

我已经添加该行对我在清单活动(我用夏洛克库):

I've already added that line to my Activity in the manifest (I'm using Sherlock Library):

android:theme="@style/Theme.Sherlock.Dialog"

和活动正在酷似一个对话框,但我不能找到一个主题上的按钮进行设置。你有什么我可以做一个想法?

And the Activity is looking exactly like a Dialog, but I can't find a theme to set on the buttons. Do you have an idea of what I could do ?

推荐答案

好吧,如果你正在深化发展的HC / ICS的应用程序,无需夏洛克,答案就在这里: https://gist.github.com/2348305

Alright, if you're developping an application for HC/ICS, without Sherlock, the answer is here : https://gist.github.com/2348305

仅仅使用主题

style="?android:attr/buttonBarStyle"

有关容器,

style="?android:attr/buttonBarButtonStyle"

有关按钮

android:divider="?android:attr/dividerHorizontal"
android:showDividers="middle"

为根布局

这篇关于对话的主题活动:正负按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆