OLD | NEW |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-present eyeo GmbH | 3 * Copyright (C) 2006-present 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 { | 87 { |
88 @Override | 88 @Override |
89 public void onClick(DialogInterface dialog, int which) | 89 public void onClick(DialogInterface dialog, int which) |
90 { | 90 { |
91 removeWhitelistedWebsite(url); | 91 removeWhitelistedWebsite(url); |
92 } | 92 } |
93 }); | 93 }); |
94 this.addPreference(whitelistedWebsitePreference); | 94 this.addPreference(whitelistedWebsitePreference); |
95 } | 95 } |
96 | 96 |
97 final UrlInputOpenerPreference urlPreference = new UrlInputOpenerPreference(
this.getContext()); | 97 final UrlInputOpenerPreference urlPreference = new UrlInputOpenerPreference(
this.getContext(), true); |
98 urlPreference.setTitle(R.string.whitelisted_websites_add_button); | 98 urlPreference.setTitle(R.string.whitelisted_websites_add_button); |
99 urlPreference.setDialogTitle(R.string.whitelist_website_dialog_title); | 99 urlPreference.setDialogTitle(R.string.whitelist_website_dialog_title); |
100 urlPreference.setDialogMessage(R.string.whitelist_website_dialog_message); | 100 urlPreference.setDialogMessage(R.string.whitelist_website_dialog_message); |
101 urlPreference.getEditText().setHint(R.string.whitelist_website_dialog_hint); | 101 urlPreference.getEditText().setHint(R.string.whitelist_website_dialog_hint); |
102 urlPreference.setOnUrlReadyListener(new UrlInputOpenerPreference.OnUrlReadyL
istener() | 102 urlPreference.setOnUrlReadyListener(new UrlInputOpenerPreference.OnUrlReadyL
istener() |
103 { | 103 { |
104 @Override | 104 @Override |
105 public void onUrlReady(String url) | 105 public void onUrlReady(String url) |
106 { | 106 { |
107 WhitelistedWebsitesPreferenceCategory.this.whitelistWebsite(url); | 107 WhitelistedWebsitesPreferenceCategory.this.whitelistWebsite(url); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 { | 181 { |
182 if (WhitelistedWebsitePreference.this.onDeleteClickListener != null) | 182 if (WhitelistedWebsitePreference.this.onDeleteClickListener != null) |
183 { | 183 { |
184 WhitelistedWebsitePreference.this.onDeleteClickListener.onClick(dial
og, which); | 184 WhitelistedWebsitePreference.this.onDeleteClickListener.onClick(dial
og, which); |
185 } | 185 } |
186 } | 186 } |
187 }); | 187 }); |
188 } | 188 } |
189 } | 189 } |
190 } | 190 } |
OLD | NEW |