Help in Android app

I want to put some help text in action when the "Help in MenuItem" button is pressed in an Android application. I currently have a Help MenuItem, so when it clicks, a new action opens.

What would be the best way to put formatted text in a Contentview layout for reference? I think I will need the ability to scroll in this view. Should I use TextView? What is the recommended way to do this?

Thanks in advance.

+3
source share
2 answers

I used WebView to display help and local html storage. It worked out well, but it really depends on what you want your help to look like.

xml :

<WebView android:id="@+id/yourwebview"
         android:layout_width="fill_parent"
         android:layout_height="fill_parent"
         />

. about.html , , res.

    WebView browser = (WebView)findViewById(R.id.yourwebview);

    WebSettings settings = browser.getSettings();
    settings.setJavaScriptEnabled(true);

    browser.loadUrl("file:///android_asset/about.html");
+11

. ImageView (, , ) .

, AlertDialog. AlertDialog.setMessage() AlertDialog . Android AlertDialogs.

+2

Source: https://habr.com/ru/post/1778837/


All Articles