List of usage examples for android.widget LinearLayout isEnabled
@ViewDebug.ExportedProperty public boolean isEnabled()
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); }