开发者

Custom layout in android

i've developed an android messaging 开发者_开发问答app but, i would like to change the whole layout. It even includes a alert dialog which also i want to change.. help please..


Your layout is generally in an xml file, e.g., main.xml, called with something like setContentView(R.layout.main). The main.xml file is usually in /res/layouts, and can be edited directly, independent of the Java code.


you can define custom layout in xml files and call the layout inflator service to inflate that xml file. If you want to customize alertdialog, then do the following make a customized xml file and declare a view.set the setContentView method and use that xml file. Then inflate the layout using the LAYOUT_INFLATER_SERVICE, thenthere is a method Alertdialog.setview(view)..use that view in it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜