Example usage for android.widget ScrollView setVerticalScrollBarEnabled

List of usage examples for android.widget ScrollView setVerticalScrollBarEnabled

Introduction

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

Prototype

public void setVerticalScrollBarEnabled(boolean verticalScrollBarEnabled) 

Source Link

Document

Define whether the vertical scrollbar should be drawn or not.

Usage

From source file:com.appfirst.activities.details.AFServerDetail.java

/**
 * @return//from  w  w  w .j  a va 2  s .c  o  m
 */
private ScrollView createOuterContainer() {
    ScrollView container = new ScrollView(this);
    container.setVerticalScrollBarEnabled(true);
    container.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, this.dialogMaxInnerSpace));

    return container;
}

From source file:org.openremote.android.console.AppSettingsActivity.java

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
    setTitle(R.string.settings);//from   www.j  av  a2 s . co  m

    this.autoMode = AppSettingsModel.isAutoMode(AppSettingsActivity.this);

    // The main layout contains all application configuration items.
    LinearLayout mainLayout = new LinearLayout(this);
    mainLayout
            .setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
    mainLayout.setOrientation(LinearLayout.VERTICAL);
    mainLayout.setBackgroundColor(0);
    mainLayout.setTag(R.string.settings);

    loadingPanelProgress = new ProgressDialog(this);

    // The scroll view contains appSettingsView, and make the appSettingsView can be scrolled.
    ScrollView scroll = new ScrollView(this);
    scroll.setVerticalScrollBarEnabled(true);
    scroll.setLayoutParams(
            new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT, 1));
    appSettingsView = new LinearLayout(this);
    appSettingsView
            .setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
    appSettingsView.setOrientation(LinearLayout.VERTICAL);

    appSettingsView.addView(createAutoLayout());
    appSettingsView.addView(createChooseControllerLabel());

    currentServer = "";
    if (autoMode) {
        appSettingsView.addView(constructAutoServersView());
    } else {
        appSettingsView.addView(constructCustomServersView());
    }
    appSettingsView.addView(createChoosePanelLabel());
    panelSelectSpinnerView = new PanelSelectSpinnerView(this);
    appSettingsView.addView(panelSelectSpinnerView);

    appSettingsView.addView(createCacheText());
    appSettingsView.addView(createClearImageCacheButton());
    appSettingsView.addView(createSSLLayout());
    scroll.addView(appSettingsView);

    mainLayout.addView(scroll);
    mainLayout.addView(createDoneAndCancelLayout());

    setContentView(mainLayout);
    initSSLState();
    addOnclickListenerOnDoneButton();
    addOnclickListenerOnCancelButton();
    progressLayout = (LinearLayout) findViewById(R.id.choose_controller_progress);

}