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

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

Issue 2404903003: [Remoting Android] Change talkback for the navigation drawer button (Closed)
Patch Set: Reviewer's Feedback 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/resources/remoting_strings.grd » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.app.ProgressDialog; 8 import android.app.ProgressDialog;
9 import android.content.DialogInterface; 9 import android.content.DialogInterface;
10 import android.content.Intent; 10 import android.content.Intent;
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 onHostClicked(position); 237 onHostClicked(position);
238 } 238 }
239 }); 239 });
240 240
241 mProgressView = findViewById(R.id.hostList_progress); 241 mProgressView = findViewById(R.id.hostList_progress);
242 242
243 findViewById(R.id.host_setup_link_android).setOnClickListener(this); 243 findViewById(R.id.host_setup_link_android).setOnClickListener(this);
244 244
245 mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout); 245 mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
246 mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, toolbar, 246 mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, toolbar,
247 R.string.open_navigation_drawer, R.string.close_navigation_drawe r) { 247 R.string.open_navigation_drawer, R.string.close_navigation_drawe r) {
Lambros 2016/10/11 23:20:47 I guess these string resource IDs don't actually g
248 @Override 248 @Override
249 public void onDrawerClosed(View drawerView) { 249 public void onDrawerClosed(View drawerView) {
250 super.onDrawerClosed(drawerView); 250 super.onDrawerClosed(drawerView);
251 runPendingDrawerCloseTask(); 251 runPendingDrawerCloseTask();
252 } 252 }
253 }; 253 };
254 mDrawerLayout.addDrawerListener(mDrawerToggle); 254 mDrawerLayout.addDrawerListener(mDrawerToggle);
255 255
256 // Disable the hamburger icon animation. This is more complex than it ou ght to be. 256 // Disable the hamburger icon animation. This is more complex than it ou ght to be.
257 // The animation can be customized by tweaking some style parameters - s ee 257 // The animation can be customized by tweaking some style parameters - s ee
(...skipping 21 matching lines...) Expand all
279 } 279 }
280 } 280 }
281 }); 281 });
282 282
283 // Set the three-line icon instead of the default which is a tinted arro w icon. 283 // Set the three-line icon instead of the default which is a tinted arro w icon.
284 getSupportActionBar().setDisplayHomeAsUpEnabled(true); 284 getSupportActionBar().setDisplayHomeAsUpEnabled(true);
285 Drawable menuIcon = ContextCompat.getDrawable(this, R.drawable.ic_menu); 285 Drawable menuIcon = ContextCompat.getDrawable(this, R.drawable.ic_menu);
286 DrawableCompat.setTint(menuIcon.mutate(), 286 DrawableCompat.setTint(menuIcon.mutate(),
287 ChromotingUtil.getColorAttribute(this, R.attr.colorControlNormal )); 287 ChromotingUtil.getColorAttribute(this, R.attr.colorControlNormal ));
288 getSupportActionBar().setHomeAsUpIndicator(menuIcon); 288 getSupportActionBar().setHomeAsUpIndicator(menuIcon);
289 getSupportActionBar().setHomeActionContentDescription(R.string.actionbar _menu);
289 290
290 mAccountSwitcher = AccountSwitcherFactory.getInstance().createAccountSwi tcher(this, this); 291 mAccountSwitcher = AccountSwitcherFactory.getInstance().createAccountSwi tcher(this, this);
291 mAccountSwitcher.setNavigation(NavigationMenuAdapter.createNavigationMen u(this)); 292 mAccountSwitcher.setNavigation(NavigationMenuAdapter.createNavigationMen u(this));
292 LinearLayout navigationDrawer = (LinearLayout) findViewById(R.id.navigat ion_drawer); 293 LinearLayout navigationDrawer = (LinearLayout) findViewById(R.id.navigat ion_drawer);
293 mAccountSwitcher.setDrawer(navigationDrawer); 294 mAccountSwitcher.setDrawer(navigationDrawer);
294 View switcherView = mAccountSwitcher.getView(); 295 View switcherView = mAccountSwitcher.getView();
295 switcherView.setLayoutParams(new LinearLayout.LayoutParams( 296 switcherView.setLayoutParams(new LinearLayout.LayoutParams(
296 LinearLayout.LayoutParams.MATCH_PARENT, 297 LinearLayout.LayoutParams.MATCH_PARENT,
297 LinearLayout.LayoutParams.WRAP_CONTENT)); 298 LinearLayout.LayoutParams.WRAP_CONTENT));
298 navigationDrawer.addView(switcherView, 0); 299 navigationDrawer.addView(switcherView, 0);
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 // Unreachable, but required by Google Java style and findbugs. 726 // Unreachable, but required by Google Java style and findbugs.
726 assert false : "Unreached"; 727 assert false : "Unreached";
727 } 728 }
728 729
729 if (dismissProgress && mProgressIndicator != null) { 730 if (dismissProgress && mProgressIndicator != null) {
730 mProgressIndicator.dismiss(); 731 mProgressIndicator.dismiss();
731 mProgressIndicator = null; 732 mProgressIndicator = null;
732 } 733 }
733 } 734 }
734 } 735 }
OLDNEW
« no previous file with comments | « no previous file | remoting/resources/remoting_strings.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698