diff options
Diffstat (limited to 'src/net/cbaines/suma/POIDialog.java')
-rw-r--r-- | src/net/cbaines/suma/POIDialog.java | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/src/net/cbaines/suma/POIDialog.java b/src/net/cbaines/suma/POIDialog.java index 20304bb..dd871fd 100644 --- a/src/net/cbaines/suma/POIDialog.java +++ b/src/net/cbaines/suma/POIDialog.java @@ -31,62 +31,62 @@ import android.widget.TextView; public class POIDialog extends Dialog { - // private static final String TAG = "POIDialog"; - private ListView listItems; + // private static final String TAG = "POIDialog"; + private ListView listItems; - private final Context context; + private final Context context; - private final TextView message; + private final TextView message; - protected POIArrayAdapter adapter; + protected POIArrayAdapter adapter; - public POIDialog(Context context) { - super(context); + public POIDialog(Context context) { + super(context); - this.context = context; + this.context = context; - setContentView(R.layout.poi_dialog); + setContentView(R.layout.poi_dialog); - message = (TextView) findViewById(R.id.favouriteDialogMessage); - listItems = (ListView) findViewById(R.id.favouriteListItems); + message = (TextView) findViewById(R.id.favouriteDialogMessage); + listItems = (ListView) findViewById(R.id.favouriteListItems); - } + } - void setMessage(final String text) { - message.post(new Runnable() { - public void run() { - if (text == null || text.length() == 0) { - message.setVisibility(View.GONE); - } else { - message.setText(text); - message.setVisibility(View.VISIBLE); - } - } - }); - } + void setMessage(final String text) { + message.post(new Runnable() { + public void run() { + if (text == null || text.length() == 0) { + message.setVisibility(View.GONE); + } else { + message.setText(text); + message.setVisibility(View.VISIBLE); + } + } + }); + } - void setItems(final List<POI> items) { - listItems.post(new Runnable() { - public void run() { - if (items != null) { - adapter = new POIArrayAdapter(context, items); + void setItems(final List<POI> items) { + listItems.post(new Runnable() { + public void run() { + if (items != null) { + adapter = new POIArrayAdapter(context, items); - listItems.setVisibility(View.VISIBLE); - listItems.setAdapter(adapter); - } else { - listItems.setVisibility(View.GONE); - } - } - }); - } + listItems.setVisibility(View.VISIBLE); + listItems.setAdapter(adapter); + } else { + listItems.setVisibility(View.GONE); + } + } + }); + } - void setOnItemClickListener(OnItemClickListener item) { - listItems.setOnItemClickListener(item); + void setOnItemClickListener(OnItemClickListener item) { + listItems.setOnItemClickListener(item); - } + } - void setOnItemLongClickListener(OnItemLongClickListener item) { - listItems.setOnItemLongClickListener(item); - } + void setOnItemLongClickListener(OnItemLongClickListener item) { + listItems.setOnItemLongClickListener(item); + } } |