On Android, Is it possible to show a table of data in a dialog box?
I need to sh开发者_高级运维ow a "grid" or "table" of data in a pop-up dialog box on Android.
Basically, a column listed down the left with rows of names, for example, then multiple columns to the right of the names with values in columns.
Is this possible?
Yes. You can use any xml layout as the contents of a dialog box, and you can use TableLayout to lay out your table/grid.
Creating a custom dialog
TableLayout example
You can also create an Activity
and set the theme to Dialog like this:
android:theme="@android:style/Theme.Dialog"
精彩评论