Example usage for android.widget LinearLayout isEnabled

List of usage examples for android.widget LinearLayout isEnabled

Introduction

In this page you can find the example usage for android.widget LinearLayout isEnabled.

Prototype

@ViewDebug.ExportedProperty
public boolean isEnabled() 

Source Link

Document

Returns the enabled status for this view.

Usage

From source file:com.mobicage.rogerthat.plugins.messaging.ServiceMessageDetailActivity.java

private void displayWidget(LinearLayout widgetLayout, BrandingResult br) {
    final String type = (String) mCurrentMessage.form.get("type");

    widgetLayout.removeAllViews();/*from   w ww .jav  a  2  s.c o m*/

    final Widget widget = (Widget) getLayoutInflater().inflate(Widget.RESOURCES.get(type), null, false);
    if (br != null) {
        widget.setColorScheme(br.scheme);
    }
    widget.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
    widget.setEnabled(widgetLayout.isEnabled());
    widget.loadMessage(mCurrentMessage, this, widgetLayout);

    if (!widgetLayout.isEnabled()) {
        for (int i = 0; i < widget.getChildCount(); i++) {
            View v = widget.getChildAt(i);
            v.setEnabled(false);
        }
    }
    widgetLayout.addView(widget);
}