Example usage for android.widget TextView setVerticalScrollBarEnabled

List of usage examples for android.widget TextView setVerticalScrollBarEnabled

Introduction

In this page you can find the example usage for android.widget TextView setVerticalScrollBarEnabled.

Prototype

public void setVerticalScrollBarEnabled(boolean verticalScrollBarEnabled) 

Source Link

Document

Define whether the vertical scrollbar should be drawn or not.

Usage

From source file:devicroft.burnboy.Activities.MainActivity.java

private void dispatchLicenseDialog() {
    Log.d(LOG_TAG, "dispatchLicenseDialog");
    AlertDialog d = new AlertDialog.Builder(this).setTitle("Licenses")
            .setMessage(Html.fromHtml(getString(R.string.license_fab) + "<br><br>"
                    + getString(R.string.license_mpandroidchart) + getString(R.string.app_name))) //https://stackoverflow.com/questions/3235131/set-textview-text-from-html-formatted-string-resource-in-xml
            .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int which) {
                    dialog.dismiss();/*from   w w w .  j  a  va 2s. c  o  m*/
                }
            }).show();
    TextView textView = (TextView) d.findViewById(android.R.id.message);
    textView.setScroller(new Scroller(this));
    textView.setVerticalScrollBarEnabled(true);
    textView.setAllCaps(false);
    textView.setMovementMethod(new ScrollingMovementMethod());
}