Browse Source

Current filter list text size through separate view.

pull/11/head
Eric Kok 12 years ago
parent
commit
9ae53ba848
  1. 2
      core/src/org/transdroid/core/gui/TorrentsActivity.java
  2. 6
      core/src/org/transdroid/core/gui/navigation/FilterListAdapter.java
  3. 5
      core/src/org/transdroid/core/gui/navigation/FilterListDropDownAdapter.java
  4. 7
      core/src/org/transdroid/core/gui/navigation/FilterListItemAdapter.java
  5. 2
      core/src/org/transdroid/core/gui/navigation/FilterListItemView.java

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

@ -132,6 +132,8 @@ public class TorrentsActivity extends SherlockFragmentActivity implements OnNavi @@ -132,6 +132,8 @@ public class TorrentsActivity extends SherlockFragmentActivity implements OnNavi
// Check if there was room for a dedicated filter list (i.e. on tablets)
if (filtersList != null) {
// The action bar spinner doesn't have to show the 'servers' label, as it will only contain servers
navigationSpinnerAdapter.hideServersLabel();
// Create dedicated side list adapter and add the status types
navigationListAdapter = FilterListAdapter_.getInstance_(this);
navigationListAdapter.updateStatusTypes(StatusType.getAllStatusTypes(this));

6
core/src/org/transdroid/core/gui/navigation/FilterListAdapter.java

@ -26,9 +26,9 @@ public class FilterListAdapter extends MergeAdapter { @@ -26,9 +26,9 @@ public class FilterListAdapter extends MergeAdapter {
private FilterListItemAdapter serverItems = null;
private FilterListItemAdapter statusTypeItems = null;
private FilterListItemAdapter labelItems = null;
private FilterSeparatorView statusTypeSeparator;
private FilterSeparatorView labelSeperator;
private FilterSeparatorView serverSeparator;
protected FilterSeparatorView statusTypeSeparator;
protected FilterSeparatorView labelSeperator;
protected FilterSeparatorView serverSeparator;
/**
* Update the list of available servers

5
core/src/org/transdroid/core/gui/navigation/FilterListDropDownAdapter.java

@ -45,5 +45,10 @@ public class FilterListDropDownAdapter extends FilterListAdapter { @@ -45,5 +45,10 @@ public class FilterListDropDownAdapter extends FilterListAdapter {
if (navigationSelectionView != null)
navigationSelectionView.bind(this.currentServer, this.currentFilter);
}
public void hideServersLabel() {
serverSeparator.setVisibility(View.INVISIBLE);
notifyDataSetInvalidated();
}
}

7
core/src/org/transdroid/core/gui/navigation/FilterListItemAdapter.java

@ -4,7 +4,6 @@ import java.util.List; @@ -4,7 +4,6 @@ import java.util.List;
import org.transdroid.core.gui.lists.SimpleListItem;
import org.transdroid.core.gui.lists.SimpleListItemView;
import org.transdroid.core.gui.lists.SimpleListItemView_;
import android.content.Context;
import android.view.View;
@ -47,11 +46,11 @@ public class FilterListItemAdapter extends BaseAdapter { @@ -47,11 +46,11 @@ public class FilterListItemAdapter extends BaseAdapter {
@Override
public View getView(int position, View convertView, ViewGroup parent) {
SimpleListItemView filterItemView;
FilterListItemView filterItemView;
if (convertView == null || !(convertView instanceof SimpleListItemView)) {
filterItemView = SimpleListItemView_.build(context);
filterItemView = FilterListItemView_.build(context);
} else {
filterItemView = (SimpleListItemView) convertView;
filterItemView = (FilterListItemView) convertView;
}
filterItemView.bind(getItem(position));
return filterItemView;

2
core/src/org/transdroid/core/gui/navigation/FilterListItemView.java

@ -9,7 +9,7 @@ import android.widget.FrameLayout; @@ -9,7 +9,7 @@ import android.widget.FrameLayout;
import android.widget.TextView;
/**
* View that represents some {@link SimpleListItem} object used to represent a navigation filter item
* View that represents some {@link SimpleListItem} object specifically used to represent a navigation filter item.
* @author Eric Kok
*/
@EViewGroup(resName="list_item_filter")

Loading…
Cancel
Save