Hi,
I don't know how I can show an image with a text as Dialog or something like this.
I can just show Text.
Please help


cgreen wrote:i've no idea about including an image, but this is the first step for a dialog-popup:Using java Syntax Highlighting
private void showDialog(String title, String text) { final Dialog dia = new Dialog(this); dia.setContentView(R.layout.msgdialog); dia.setTitle(title); Button okbutton = (Button) dia.findViewById(R.id.okbutton); TextView textField = (TextView) dia.findViewById(R.id.msg); textField.setTextSize(12f); textField.setBackgroundColor(Color.BLACK); textField.setTextColor(Color.WHITE); textField.setText(text); okbutton.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { dia.dismiss(); } }); dia.show(); }Parsed in 0.032 seconds, using GeSHi 1.0.8.4
maybe this helps creating a dialog with text.
i guess an image could be reference with the R.drawable.IMAGENAME, but i didn't try to display any yet.



Return to View, Layout & Resource Problems
Users browsing this forum: Exabot [Bot] and 7 guests