天天看點

Android AlertDialog之七十二變

 今天我給大家弄一個百變對話框,說的比較誇張一點,呵呵,大家都了解,詳見圖:

<a target="_blank" href="http://blog.51cto.com/attachment/201103/142355304.png"></a>

<a href="http://blog.51cto.com/attachment/201103/143130186.png" target="_blank"></a>

<a target="_blank" href="http://blog.51cto.com/attachment/201103/142423298.png"></a>

<a target="_blank" href="http://blog.51cto.com/attachment/201103/142435635.png"></a>

<a target="_blank" href="http://blog.51cto.com/attachment/201103/142443206.png"></a>

<a target="_blank" href="http://blog.51cto.com/attachment/201103/142450418.png"></a>

1:我們先看一下具體的布局layout/main.xml

<a target="_blank" href="http://blog.51cto.com/attachment/201103/142528945.png"></a>

2:必須設定UI布局所對應的值values/strings.xml

<a target="_blank" href="http://blog.51cto.com/attachment/201103/142615559.png"></a>

3:具體實作的功能的核心代碼AlertDialog.java

<a target="_blank" href="http://blog.51cto.com/attachment/201103/142655960.png"></a>

今天就寫到這裡了,大家看了好玩吧,大家有時間的話也動手做一做,可以減輕壓力,請大家多多支援啊,你們的支援就是我前進的動力

本文轉自 Art_Hero 51CTO部落格,原文連結:http://blog.51cto.com/curran/510653,如需轉載請自行聯系原作者

繼續閱讀