Browse Source

Only show 3 pane layout if screen is at least 900dp width.

pull/11/head
Eric Kok 12 years ago
parent
commit
a5d5872094
  1. 0
      core/res/layout-w900dp/activity_torrents.xml
  2. 2
      core/src/org/transdroid/core/gui/DetailsFragment.java
  3. 17
      core/src/org/transdroid/core/gui/TorrentsActivity.java

0
core/res/layout-w720dp/activity_torrents.xml → core/res/layout-w900dp/activity_torrents.xml

2
core/src/org/transdroid/core/gui/DetailsFragment.java

@ -5,6 +5,7 @@ import java.util.List;
import org.androidannotations.annotations.AfterViews; import org.androidannotations.annotations.AfterViews;
import org.androidannotations.annotations.EFragment; import org.androidannotations.annotations.EFragment;
import org.androidannotations.annotations.FragmentArg;
import org.androidannotations.annotations.InstanceState; import org.androidannotations.annotations.InstanceState;
import org.androidannotations.annotations.OptionsItem; import org.androidannotations.annotations.OptionsItem;
import org.androidannotations.annotations.OptionsMenu; import org.androidannotations.annotations.OptionsMenu;
@ -36,6 +37,7 @@ public class DetailsFragment extends SherlockFragment {
// Local data // Local data
@InstanceState @InstanceState
@FragmentArg
protected Torrent torrent = null; protected Torrent torrent = null;
@InstanceState @InstanceState
protected TorrentDetails torrentDetails = null; protected TorrentDetails torrentDetails = null;

17
core/src/org/transdroid/core/gui/TorrentsActivity.java

@ -24,12 +24,20 @@ import org.transdroid.core.app.settings.ApplicationSettings;
import org.transdroid.core.app.settings.ServerSetting; import org.transdroid.core.app.settings.ServerSetting;
import org.transdroid.core.gui.lists.LocalTorrent; import org.transdroid.core.gui.lists.LocalTorrent;
import org.transdroid.core.gui.lists.SimpleListItem; import org.transdroid.core.gui.lists.SimpleListItem;
import org.transdroid.core.gui.log.*; import org.transdroid.core.gui.log.Log;
import org.transdroid.core.gui.navigation.*; import org.transdroid.core.gui.log.Log_;
import org.transdroid.core.gui.navigation.FilterListAdapter;
import org.transdroid.core.gui.navigation.FilterListAdapter_;
import org.transdroid.core.gui.navigation.FilterListDropDownAdapter;
import org.transdroid.core.gui.navigation.FilterListDropDownAdapter_;
import org.transdroid.core.gui.navigation.Label;
import org.transdroid.core.gui.navigation.NavigationFilter;
import org.transdroid.core.gui.navigation.NavigationHelper;
import org.transdroid.core.gui.navigation.StatusType;
import org.transdroid.core.gui.search.BarcodeHelper; import org.transdroid.core.gui.search.BarcodeHelper;
import org.transdroid.core.gui.search.FilePickerHelper; import org.transdroid.core.gui.search.FilePickerHelper;
import org.transdroid.core.gui.search.UrlEntryDialog; import org.transdroid.core.gui.search.UrlEntryDialog;
import org.transdroid.core.gui.settings.*; import org.transdroid.core.gui.settings.MainSettingsActivity_;
import org.transdroid.daemon.Daemon; import org.transdroid.daemon.Daemon;
import org.transdroid.daemon.IDaemonAdapter; import org.transdroid.daemon.IDaemonAdapter;
import org.transdroid.daemon.Torrent; import org.transdroid.daemon.Torrent;
@ -461,9 +469,6 @@ public class TorrentsActivity extends SherlockFragmentActivity implements OnNavi
public void openDetails(Torrent torrent) { public void openDetails(Torrent torrent) {
if (fragmentDetails != null) { if (fragmentDetails != null) {
fragmentDetails.updateTorrent(torrent); fragmentDetails.updateTorrent(torrent);
} else if (filtersList != null) {
getSupportFragmentManager().beginTransaction().add(R.id.torrent_list, DetailsFragment_.builder().build())
.addToBackStack(null).commit();
} else { } else {
DetailsActivity_.intent(this).torrent(torrent).start(); DetailsActivity_.intent(this).torrent(torrent).start();
} }

Loading…
Cancel
Save