Browse Source

Allow viewing of details page (via browser intent) of search resutls.

pull/11/head v2.0-alpha3
Eric Kok 12 years ago
parent
commit
b761c6741a
  1. 6
      core/res/menu/fragment_rssitems_cab.xml
  2. 6
      core/res/menu/fragment_searchresults_cab.xml
  3. 5
      core/src/org/transdroid/core/gui/search/SearchResultsFragment.java

6
core/res/menu/fragment_rssitems_cab.xml

@ -1,11 +1,5 @@ @@ -1,11 +1,5 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:id="@+id/action_showdetails"
android:icon="?attr/ic_action_new"
android:showAsAction="always"
android:title="@string/action_showdetails" />
<item
android:id="@+id/action_addall"
android:icon="?attr/ic_action_new"

6
core/res/menu/fragment_searchresults_cab.xml

@ -1,5 +1,11 @@ @@ -1,5 +1,11 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:id="@+id/action_showdetails"
android:icon="?attr/ic_action_website"
android:showAsAction="always"
android:title="@string/action_showdetails" />
<item
android:id="@+id/action_addall"
android:icon="?attr/ic_action_new"

5
core/src/org/transdroid/core/gui/search/SearchResultsFragment.java

@ -144,8 +144,9 @@ public class SearchResultsFragment extends SherlockFragment { @@ -144,8 +144,9 @@ public class SearchResultsFragment extends SherlockFragment {
} else if (itemId == R.id.action_showdetails) {
SearchResult first = checked.get(0);
// Open the torrent's web page in the browser
Toast.makeText(getActivity(), getString(R.string.search_openingdetails, first), Toast.LENGTH_LONG)
.show();
if (checked.size() > 1)
Toast.makeText(getActivity(), getString(R.string.search_openingdetails, first), Toast.LENGTH_LONG)
.show();
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(first.getDetailsUrl())));
return true;
} else {

Loading…
Cancel
Save