Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(597)

Unified Diff: pkg/immi_samples/lib/android/src/main/com/google/dartino/immisamples/Menu.java

Issue 2035023003: Remove service-compiler related code. (Closed) Base URL: git@github.com:dartino/sdk.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/immi_samples/lib/android/src/main/com/google/dartino/immisamples/Menu.java
diff --git a/pkg/immi_samples/lib/android/src/main/com/google/dartino/immisamples/Menu.java b/pkg/immi_samples/lib/android/src/main/com/google/dartino/immisamples/Menu.java
deleted file mode 100644
index 5e3c2ef98603fd08e6943af13e97e516a6ba5e26..0000000000000000000000000000000000000000
--- a/pkg/immi_samples/lib/android/src/main/com/google/dartino/immisamples/Menu.java
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE.md file.
-
-package com.google.dartino.immisamples;
-
-import android.content.Context;
-import android.os.Handler;
-import android.os.Looper;
-import android.view.View;
-import android.widget.AdapterView;
-import android.widget.ArrayAdapter;
-import android.widget.ListView;
-
-import immi.MenuItemNode;
-import immi.MenuNode;
-import immi.MenuPatch;
-import immi.MenuPresenter;
-
-public class Menu
- extends ArrayAdapter<String>
- implements MenuPresenter, AdapterView.OnItemClickListener {
-
- public Menu(Context context, int resource, int textViewResourceId) {
- // ArrayAdapter
- super(context, resource, textViewResourceId);
- }
-
- public void setListView(ListView view) {
- view.setOnItemClickListener(this);
- view.setAdapter(this);
- // TODO(zerny): Implement selected state for menus.
- }
-
- // From MenuPresenter
-
- @Override
- public void present(MenuNode node) {
- root = node;
- new Handler(Looper.getMainLooper()).post(updateItems);
- }
-
- @Override
- public void patch(MenuPatch patch) {
- root = patch.getCurrent();
- new Handler(Looper.getMainLooper()).post(updateItems);
- }
-
- // From OnItemClickListener
-
- @Override
- public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
- assert position < root.getItems().size();
- root.getItems().get(position).getSelect().dispatch();
- }
-
- // Private implementation.
-
- private Runnable updateItems = new Runnable() {
- @Override
- public void run() {
- if (getCount() > 0) clear();
- for (MenuItemNode item : root.getItems()) {
- add(item.getTitle());
- }
- }
- };
-
- private MenuNode root;
-}

Powered by Google App Engine
This is Rietveld 408576698