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

Side by Side Diff: remoting/android/java/src/org/chromium/chromoting/NavigationMenuAdapter.java

Issue 2376203003: [Remoting Android] use HelpAndFeedback.launchFeedback to launch the feedback activity (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | remoting/android/java/src/org/chromium/chromoting/help/HelpAndFeedback.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chromoting; 5 package org.chromium.chromoting;
6 6
7 import android.app.Activity; 7 import android.app.Activity;
8 import android.content.Context; 8 import android.content.Context;
9 import android.content.Intent; 9 import android.content.Intent;
10 import android.view.LayoutInflater; 10 import android.view.LayoutInflater;
11 import android.view.View; 11 import android.view.View;
12 import android.view.ViewGroup; 12 import android.view.ViewGroup;
13 import android.widget.AdapterView; 13 import android.widget.AdapterView;
14 import android.widget.ArrayAdapter; 14 import android.widget.ArrayAdapter;
15 import android.widget.ListView; 15 import android.widget.ListView;
16 16
17 import org.chromium.chromoting.help.CreditsActivity; 17 import org.chromium.chromoting.help.CreditsActivity;
18 import org.chromium.chromoting.help.FeedbackSender;
19 import org.chromium.chromoting.help.HelpContext; 18 import org.chromium.chromoting.help.HelpContext;
20 import org.chromium.chromoting.help.HelpSingleton; 19 import org.chromium.chromoting.help.HelpSingleton;
21 20
22 /** 21 /**
23 * Describes the appearance and behavior of the navigation menu. This also imple ments 22 * Describes the appearance and behavior of the navigation menu. This also imple ments
24 * AdapterView.OnItemClickListener so it can be used as the ListView's onItemCli ckListener. 23 * AdapterView.OnItemClickListener so it can be used as the ListView's onItemCli ckListener.
25 */ 24 */
26 public class NavigationMenuAdapter extends ArrayAdapter<NavigationMenuAdapter.Na vigationMenuItem> 25 public class NavigationMenuAdapter extends ArrayAdapter<NavigationMenuAdapter.Na vigationMenuItem>
27 implements AdapterView.OnItemClickListener { 26 implements AdapterView.OnItemClickListener {
28 /** 27 /**
(...skipping 17 matching lines...) Expand all
46 @Override 45 @Override
47 public void run() { 46 public void run() {
48 activity.startActivity(new Intent(activity, CreditsActiv ity.class)); 47 activity.startActivity(new Intent(activity, CreditsActiv ity.class));
49 } 48 }
50 }); 49 });
51 50
52 NavigationMenuItem feedbackItem = new NavigationMenuItem(R.menu.feedback _list_item, 51 NavigationMenuItem feedbackItem = new NavigationMenuItem(R.menu.feedback _list_item,
53 new Runnable() { 52 new Runnable() {
54 @Override 53 @Override
55 public void run() { 54 public void run() {
56 FeedbackSender.sendFeedback(activity); 55 HelpSingleton.getInstance().launchFeedback(activity);
57 } 56 }
58 }); 57 });
59 58
60 NavigationMenuItem helpItem = new NavigationMenuItem(R.menu.help_list_it em, 59 NavigationMenuItem helpItem = new NavigationMenuItem(R.menu.help_list_it em,
61 new Runnable() { 60 new Runnable() {
62 @Override 61 @Override
63 public void run() { 62 public void run() {
64 HelpSingleton.getInstance().launchHelp(activity, 63 HelpSingleton.getInstance().launchHelp(activity,
65 HelpContext.HOST_LIST); 64 HelpContext.HOST_LIST);
66 } 65 }
(...skipping 22 matching lines...) Expand all
89 return convertView; 88 return convertView;
90 } 89 }
91 90
92 91
93 /** AdapterView.OnItemClickListener override. */ 92 /** AdapterView.OnItemClickListener override. */
94 @Override 93 @Override
95 public void onItemClick(AdapterView<?> parent, View view, int position, long id) { 94 public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
96 getItem(position).mCallback.run(); 95 getItem(position).mCallback.run();
97 } 96 }
98 } 97 }
OLDNEW
« no previous file with comments | « no previous file | remoting/android/java/src/org/chromium/chromoting/help/HelpAndFeedback.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698