从Web服务获取数据并将其绑定到表布局中,并在对话框中显示该表布局

时间:2014-03-11 11:07:25

标签: android grid tablelayout

我从Web服务获取数据并将其绑定到自定义表格布局。现在我想在对话框中显示自定义布局。有没有办法实现这一目标?

先谢谢..

1 个答案:

答案 0 :(得分:0)

txt_PendingVoid.setOnClickListener(new View.OnClickListener(){

    @Override
    public void onClick(View v) {
        // TODO Auto-generated method stub

        /*
         * AlertDialog.Builder alertDialog = new AlertDialog.Builder(
         * Dashboard.this);
         * 
         * alertDialog.setTitle("Merchant Staff Void Report");
         * 
         * View view = getLayoutInflater() .inflate(R.layout.lay_grid,
         * null); alertDialog.setView(view);
         */

        AlertDialog.Builder alertDialog = new AlertDialog.Builder(con);

        alertDialog.setTitle("Merchant Staff Void Report");
        GetVoidReport objvoidreport = new GetVoidReport();
        objvoidreport.CollectVoidReport(con, UserId);
        View view = getLayoutInflater()
                .inflate(R.layout.lay_grid, null);
        alertDialog.setView(view);

        alertDialog.show();

        // alertDialog.show();

    }
});