diff --git a/lite/res/layout-w600dp/activity_torrents.xml b/lite/res/layout-w600dp/activity_torrents.xml index 92b91914..2f96106f 100644 --- a/lite/res/layout-w600dp/activity_torrents.xml +++ b/lite/res/layout-w600dp/activity_torrents.xml @@ -12,13 +12,16 @@ android:id="@+id/filters_list" android:layout_width="0dip" android:layout_height="match_parent" - android:layout_weight="1" /> + android:layout_weight="1" + android:choiceMode="singleChoice" + android:listSelector="@drawable/selectable_background_transdroid" /> + class="org.transdroid.gui.TorrentsFragment" + tools:layout="@layout/fragment_torrents" /> \ No newline at end of file diff --git a/lite/res/layout-w720dp/activity_torrents.xml b/lite/res/layout-w720dp/activity_torrents.xml index 19c5a3ad..6575c30e 100644 --- a/lite/res/layout-w720dp/activity_torrents.xml +++ b/lite/res/layout-w720dp/activity_torrents.xml @@ -12,20 +12,24 @@ android:id="@+id/filters_list" android:layout_width="0dip" android:layout_height="match_parent" - android:layout_weight="1" /> + android:layout_weight="1" + android:choiceMode="singleChoice" + android:listSelector="@drawable/selectable_background_transdroid" /> + class="org.transdroid.gui.TorrentsFragment" + tools:layout="@layout/fragment_torrents" /> + class="org.transdroid.gui.DetailsFragment" + tools:layout="@layout/fragment_details" /> \ No newline at end of file diff --git a/lite/res/layout/activity_torrents.xml b/lite/res/layout/activity_torrents.xml index 6e9f0815..ee4dd9b6 100644 --- a/lite/res/layout/activity_torrents.xml +++ b/lite/res/layout/activity_torrents.xml @@ -10,6 +10,6 @@ android:id="@+id/torrent_list" android:layout_width="match_parent" android:layout_height="match_parent" - class="org.transdroid.gui.TorrentsFragment" /> + class="org.transdroid.gui.TorrentsFragment" tools:layout="@layout/fragment_torrents"/> \ No newline at end of file diff --git a/lite/res/layout/fragment_details.xml b/lite/res/layout/fragment_details.xml index e5663b46..bbbcdb0a 100644 --- a/lite/res/layout/fragment_details.xml +++ b/lite/res/layout/fragment_details.xml @@ -3,10 +3,13 @@ android:layout_width="match_parent" android:layout_height="match_parent" > - + android:layout_height="match_parent" + android:choiceMode="multipleChoiceModal" + android:listSelector="@drawable/selectable_background_transdroid" + android:visibility="gone" /> - + android:layout_height="match_parent" + android:choiceMode="singleChoice" + android:listSelector="@drawable/selectable_background_transdroid" /> \ No newline at end of file diff --git a/lite/res/layout/fragment_torrents.xml b/lite/res/layout/fragment_torrents.xml index 3365978d..65ae6c53 100644 --- a/lite/res/layout/fragment_torrents.xml +++ b/lite/res/layout/fragment_torrents.xml @@ -3,9 +3,23 @@ android:layout_width="match_parent" android:layout_height="match_parent" > - + android:layout_height="match_parent" + android:choiceMode="multipleChoiceModal" + android:listSelector="@drawable/selectable_background_transdroid" + android:visibility="gone" /> + + \ No newline at end of file diff --git a/lite/src/org/transdroid/lite/gui/DetailsFagment.java b/lite/src/org/transdroid/lite/gui/DetailsFagment.java index 38f2e74a..1b3c7e10 100644 --- a/lite/src/org/transdroid/lite/gui/DetailsFagment.java +++ b/lite/src/org/transdroid/lite/gui/DetailsFagment.java @@ -40,6 +40,8 @@ public class DetailsFagment extends SherlockFragment { emptyText.setVisibility(View.VISIBLE); } + // TODO: Show the torrent details and load the advanced statistics + } } diff --git a/lite/src/org/transdroid/lite/gui/TorrentsActivity.java b/lite/src/org/transdroid/lite/gui/TorrentsActivity.java index 248a7186..f368bc94 100644 --- a/lite/src/org/transdroid/lite/gui/TorrentsActivity.java +++ b/lite/src/org/transdroid/lite/gui/TorrentsActivity.java @@ -14,11 +14,10 @@ import org.transdroid.lite.gui.navigation.FilterItem; import org.transdroid.lite.gui.navigation.FilterSeparatorView; import org.transdroid.lite.gui.navigation.NavigationHelper; -import android.widget.ListView; - import com.actionbarsherlock.app.ActionBar; import com.actionbarsherlock.app.ActionBar.OnNavigationListener; import com.actionbarsherlock.app.SherlockFragmentActivity; +import com.actionbarsherlock.view.SherlockListView; @EActivity(R.layout.activity_torrents) @OptionsMenu(R.menu.activity_torrents) @@ -28,7 +27,7 @@ public class TorrentsActivity extends SherlockFragmentActivity implements OnNavi @Bean protected NavigationHelper navigationHelper; @ViewById - protected ListView filtersList; + protected SherlockListView filtersList; protected FilterAdapter navigationListAdapter = null; protected FilterAdapter navigationSpinnerAdapter = null; @@ -57,6 +56,9 @@ public class TorrentsActivity extends SherlockFragmentActivity implements OnNavi } + /** + * Called when an item in the action bar navigation spinner was selected + */ @Override public boolean onNavigationItemSelected(int itemPosition, long itemId) { Object item = navigationSpinnerAdapter.getItem(itemPosition); @@ -71,7 +73,7 @@ public class TorrentsActivity extends SherlockFragmentActivity implements OnNavi /** * A new filter was selected; update the view over the current data - * @param selected + * @param selected True if * @param item */ @ItemSelect(R.id.filters_list)