Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: src/org/adblockplus/android/RefreshableListPreference.java

Issue 5697499218051072: Usage of new API, cleanups (reduced) (Closed)
Left Patch Set: Adressed first batch of review issues. Created April 16, 2014, 5:36 p.m.
Right Patch Set: Even more review issues fixed. Created April 28, 2014, 10:18 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/org/adblockplus/android/ProxySettings.java ('k') | src/org/adblockplus/android/Starter.java » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2014 Eyeo GmbH 3 * Copyright (C) 2006-2014 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 return; 48 return;
49 widgetFrameView.setVisibility(View.VISIBLE); 49 widgetFrameView.setVisibility(View.VISIBLE);
50 final int rightPaddingDip = android.os.Build.VERSION.SDK_INT < 14 ? 8 : 5; 50 final int rightPaddingDip = android.os.Build.VERSION.SDK_INT < 14 ? 8 : 5;
51 final float density = getContext().getResources().getDisplayMetrics().densit y; 51 final float density = getContext().getResources().getDisplayMetrics().densit y;
52 if (widgetFrameView instanceof LinearLayout) 52 if (widgetFrameView instanceof LinearLayout)
53 { 53 {
54 ((LinearLayout) widgetFrameView).setOrientation(LinearLayout.HORIZONTAL); 54 ((LinearLayout) widgetFrameView).setOrientation(LinearLayout.HORIZONTAL);
55 } 55 }
56 widgetFrameView.addView(refreshImage, 0); 56 widgetFrameView.addView(refreshImage, 0);
57 refreshImage.setImageResource(R.drawable.ic_menu_refresh); 57 refreshImage.setImageResource(R.drawable.ic_menu_refresh);
58 refreshImage.setPadding(refreshImage.getPaddingLeft(), refreshImage.getPaddi ngTop(), (int) (density * rightPaddingDip), 58 refreshImage.setPadding(refreshImage.getPaddingLeft(), refreshImage.getPaddi ngTop(), (int) (density * rightPaddingDip), refreshImage.getPaddingBottom());
59 refreshImage.getPaddingBottom());
60 refreshImage.setOnClickListener(new OnClickListener() 59 refreshImage.setOnClickListener(new OnClickListener()
61 { 60 {
62 @Override 61 @Override
63 public void onClick(final View v) 62 public void onClick(final View v)
64 { 63 {
65 if (refreshClickListener != null) 64 if (refreshClickListener != null)
66 {
67 refreshClickListener.onClick(refreshImage); 65 refreshClickListener.onClick(refreshImage);
68 }
69 } 66 }
70 }); 67 });
71 } 68 }
72 69
73 public void setOnRefreshClickListener(final OnClickListener l) 70 public void setOnRefreshClickListener(final OnClickListener l)
74 { 71 {
75 refreshClickListener = l; 72 refreshClickListener = l;
76 } 73 }
77 } 74 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld