From d6133d2437403a45221b5953907779cb2e7df594 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Fri, 25 Jul 2014 16:13:25 -0700 Subject: Add ability to have views which are not updated --- src/github/daneren2005/dsub/view/UpdateView.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/github') diff --git a/src/github/daneren2005/dsub/view/UpdateView.java b/src/github/daneren2005/dsub/view/UpdateView.java index 5278f83a..88cdce19 100644 --- a/src/github/daneren2005/dsub/view/UpdateView.java +++ b/src/github/daneren2005/dsub/view/UpdateView.java @@ -54,15 +54,23 @@ public class UpdateView extends LinearLayout { protected boolean starred = false; protected boolean isStarred = false; + protected final boolean autoUpdate; + public UpdateView(Context context) { + UpdateView(context, true); + } + public UpdateView(Context context, boolean autoUpdate) { super(context); this.context = context; + this.autoUpdate = autoUpdate; setLayoutParams(new AbsListView.LayoutParams( ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT)); - INSTANCES.put(this, null); + if(autoUpdate) { + INSTANCES.put(this, null); + } startUpdater(); } -- cgit v1.2.3