|
|
@ -1,24 +1,22 @@ |
|
|
|
/* |
|
|
|
/* |
|
|
|
* Copyright 2010-2018 Eric Kok et al. |
|
|
|
* Copyright 2010-2018 Eric Kok et al. |
|
|
|
* |
|
|
|
* |
|
|
|
* Transdroid is free software: you can redistribute it and/or modify |
|
|
|
* Transdroid is free software: you can redistribute it and/or modify |
|
|
|
* it under the terms of the GNU General Public License as published by |
|
|
|
* it under the terms of the GNU General Public License as published by |
|
|
|
* the Free Software Foundation, either version 3 of the License, or |
|
|
|
* the Free Software Foundation, either version 3 of the License, or |
|
|
|
* (at your option) any later version. |
|
|
|
* (at your option) any later version. |
|
|
|
* |
|
|
|
* |
|
|
|
* Transdroid is distributed in the hope that it will be useful, |
|
|
|
* Transdroid is distributed in the hope that it will be useful, |
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
|
|
* GNU General Public License for more details. |
|
|
|
* GNU General Public License for more details. |
|
|
|
* |
|
|
|
* |
|
|
|
* You should have received a copy of the GNU General Public License |
|
|
|
* You should have received a copy of the GNU General Public License |
|
|
|
* along with Transdroid. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
* along with Transdroid. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/ |
|
|
|
*/ |
|
|
|
package org.transdroid.core.gui.rss; |
|
|
|
package org.transdroid.core.gui.rss; |
|
|
|
|
|
|
|
|
|
|
|
import android.app.AlertDialog; |
|
|
|
import android.app.AlertDialog; |
|
|
|
import android.app.Dialog; |
|
|
|
|
|
|
|
import android.app.DialogFragment; |
|
|
|
|
|
|
|
import android.app.Fragment; |
|
|
|
import android.app.Fragment; |
|
|
|
import android.app.SearchManager; |
|
|
|
import android.app.SearchManager; |
|
|
|
import android.content.ClipData; |
|
|
|
import android.content.ClipData; |
|
|
@ -26,7 +24,6 @@ import android.content.ClipboardManager; |
|
|
|
import android.content.Context; |
|
|
|
import android.content.Context; |
|
|
|
import android.content.Intent; |
|
|
|
import android.content.Intent; |
|
|
|
import android.net.Uri; |
|
|
|
import android.net.Uri; |
|
|
|
import android.os.Bundle; |
|
|
|
|
|
|
|
import android.support.v7.app.AppCompatActivity; |
|
|
|
import android.support.v7.app.AppCompatActivity; |
|
|
|
import android.text.TextUtils; |
|
|
|
import android.text.TextUtils; |
|
|
|
import android.view.ActionMode; |
|
|
|
import android.view.ActionMode; |
|
|
@ -48,7 +45,6 @@ import org.androidannotations.annotations.InstanceState; |
|
|
|
import org.androidannotations.annotations.ItemClick; |
|
|
|
import org.androidannotations.annotations.ItemClick; |
|
|
|
import org.androidannotations.annotations.ViewById; |
|
|
|
import org.androidannotations.annotations.ViewById; |
|
|
|
import org.transdroid.R; |
|
|
|
import org.transdroid.R; |
|
|
|
import org.transdroid.core.app.settings.RssfeedSetting; |
|
|
|
|
|
|
|
import org.transdroid.core.gui.TorrentsActivity_; |
|
|
|
import org.transdroid.core.gui.TorrentsActivity_; |
|
|
|
import org.transdroid.core.gui.navigation.NavigationHelper; |
|
|
|
import org.transdroid.core.gui.navigation.NavigationHelper; |
|
|
|
import org.transdroid.core.gui.navigation.SelectionManagerMode; |
|
|
|
import org.transdroid.core.gui.navigation.SelectionManagerMode; |
|
|
@ -149,12 +145,8 @@ public class RssitemsFragment extends Fragment { |
|
|
|
final Item first = checked.get(0); |
|
|
|
final Item first = checked.get(0); |
|
|
|
if (itemId == R.id.action_showdetails) { |
|
|
|
if (itemId == R.id.action_showdetails) { |
|
|
|
// Show a dialog box with the RSS item description text
|
|
|
|
// Show a dialog box with the RSS item description text
|
|
|
|
new DialogFragment() { |
|
|
|
new AlertDialog.Builder(getActivity()).setMessage(first.getDescription()) |
|
|
|
public Dialog onCreateDialog(Bundle savedInstanceState) { |
|
|
|
.setPositiveButton(R.string.action_close, null).show(); |
|
|
|
return new AlertDialog.Builder(getActivity()).setMessage(first.getDescription()) |
|
|
|
|
|
|
|
.setPositiveButton(R.string.action_close, null).create(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}.show(getFragmentManager(), "RssItemDescription"); |
|
|
|
|
|
|
|
} else if (itemId == R.id.action_openwebsite) { |
|
|
|
} else if (itemId == R.id.action_openwebsite) { |
|
|
|
// Open the browser to show the website contained in the item's link tag
|
|
|
|
// Open the browser to show the website contained in the item's link tag
|
|
|
|
Toast.makeText(getActivity(), getString(R.string.search_openingdetails, first.getTitle()), Toast.LENGTH_LONG).show(); |
|
|
|
Toast.makeText(getActivity(), getString(R.string.search_openingdetails, first.getTitle()), Toast.LENGTH_LONG).show(); |
|
|
|