Я делал диалоговое окно с WebView и подгружал HTML с assets :
public class HelpDialog extends DialogFragment{
@Override
public Dialog onCreateDialog(Bundle savedInstanseState){
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
// Get the layout inflater
LayoutInflater inflater = getActivity().getLayoutInflater();
@SuppressLint("InflateParams") final View Help = inflater.inflate(R.layout.help, null, false);
assert Help!=null;
final WebView helpText = (WebView)Help.findViewById(R.id.helpText);
helpText.loadUrl("file:///android_asset/"+getString(R.string.help_dir)+"/index.html");
ImageButton prew = (ImageButton)Help.findViewById(R.id.help_prew);
ImageButton next = (ImageButton)Help.findViewById(R.id.help_next);
ImageButton home = (ImageButton)Help.findViewById(R.id.help_home);
prew.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
helpText.goBack();
}
});
next.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
helpText.goForward();
}
});
home.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
helpText.loadUrl("file:///android_asset/"+getString(R.string.help_dir)+"/index.html");
}
});
// Inflate and set the layout for the dialog
// Pass null as the parent view because its going in the dialog layout
builder.setView(Help)
// Add action buttons
.setPositiveButton(R.string.action_quit, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int id) {
HelpDialog.this.getDialog().cancel();
}
});
return builder.create();
}
}
и код ресурса фрагмента
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/help_prew"
android:src="@android:drawable/ic_media_previous" />
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/help_next"
android:src="@android:drawable/ic_media_next" />
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/help_home"
android:src="@android:drawable/ic_menu_help" />
</LinearLayout>
<WebView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/helpText"
android:focusableInTouchMode="false" />
</LinearLayout>
Вывод на экран так:
DialogFragment help = new HelpDialog();
help.show(getSupportFragmentManager(),"help");