<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TextView
android:id="@+id/textmsg"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="@string/hello" />
</LinearLayout>
</ScrollView>
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TextView
android:id="@+id/textmsg"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="@string/hello" />
</LinearLayout>
</ScrollView>
LayoutInflater inflater= LayoutInflater.from(this);
View view=inflater.inflate(R.layout.yourxmlfile, null);
TextView textview=(TextView)view.findViewById(R.id.textmsg);
textview.setText("Your really long message.");
final AlertDialog alertDialog = new AlertDialog.Builder(ctx).create();
alertDialog.setTitle("Title");
alertDialog.setView(view);
alertDialog.setButton("OK", new DialogInterface.OnClickListener()
{
public void onClick(DialogInterface dialog, int which)
{
alertDialog.dismiss();
}
});
alertDialog.show();
View view=inflater.inflate(R.layout.yourxmlfile, null);
TextView textview=(TextView)view.findViewById(R.id.textmsg);
textview.setText("Your really long message.");
final AlertDialog alertDialog = new AlertDialog.Builder(ctx).create();
alertDialog.setTitle("Title");
alertDialog.setView(view);
alertDialog.setButton("OK", new DialogInterface.OnClickListener()
{
public void onClick(DialogInterface dialog, int which)
{
alertDialog.dismiss();
}
});
alertDialog.show();