我想在对话框中更改标题的字体和颜色,我想更改字体、大小和颜色,我该怎么办?
这是我的代码,
ivworknggroup.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                // TODO Auto-generated method stub
                final Dialog dialog = new Dialog(Ourwork.this);
                dialog.setContentView(R.layout.nggroup);
                dialog.setTitle("N.G.GROUP");
                TextView tvnggroup1 = (TextView) dialog.findViewById(R.id.tvnggroup1);
                TextView tvnggroup2 =(TextView)dialog.findViewById(R.id.tvnggroup2);
                Typeface typeFace1 =  Typeface.createFromAsset(getAssets(),"fonts/antennalight.ttf");
                tvnggroup1.setTypeface(typeFace1);
                Typeface typeFace =  Typeface.createFromAsset(getAssets(),"fonts/antennabold.ttf");
                tvnggroup2.setTypeface(typeFace);
                tvnggroup2.setOnClickListener(new OnClickListener() {
                    @Override
                    public void onClick(View arg0) {
                        // TODO Auto-generated method stub
                        Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.nggroupindia.com/"));
                        startActivity(browserIntent);
                    }
                });
                dialog.show();
            }
        });有人能帮我吗?谢谢你。
发布于 2014-02-13 15:40:12
你应该使用自定义视图作为你的对话框的标题,也许这个链接可以帮助你how to include custom title view with in AlertDialog in android?
https://stackoverflow.com/questions/21747915
复制相似问题