switched to 'New Episodes', also displaying queue first in the drawer
This commit is contained in:
parent
033572bde9
commit
e7bde8ff82
|
@ -73,9 +73,9 @@ public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActiv
|
|||
|
||||
// all episodes
|
||||
openNavDrawer();
|
||||
solo.clickOnText(solo.getString(R.string.all_episodes_label));
|
||||
solo.clickOnText(solo.getString(R.string.new_episodes_label));
|
||||
solo.waitForView(android.R.id.list);
|
||||
assertEquals(solo.getString(R.string.all_episodes_label), getActionbarTitle());
|
||||
assertEquals(solo.getString(R.string.new_episodes_label), getActionbarTitle());
|
||||
|
||||
// queue
|
||||
openNavDrawer();
|
||||
|
|
|
@ -79,7 +79,7 @@ public class PlaybackTest extends ActivityInstrumentationTestCase2<MainActivity>
|
|||
private void startLocalPlayback() {
|
||||
assertTrue(solo.waitForActivity(MainActivity.class));
|
||||
openNavDrawer();
|
||||
solo.clickOnText(solo.getString(R.string.all_episodes_label));
|
||||
solo.clickOnText(solo.getString(R.string.new_episodes_label));
|
||||
solo.waitForView(android.R.id.list);
|
||||
solo.clickOnView(solo.getView(R.id.butSecondaryAction));
|
||||
assertTrue(solo.waitForActivity(AudioplayerActivity.class));
|
||||
|
|
|
@ -66,8 +66,8 @@ public class MainActivity extends ActionBarActivity implements NavDrawerActivity
|
|||
public static final String SAVE_TITLE = "title";
|
||||
|
||||
|
||||
public static final int POS_NEW = 0,
|
||||
POS_QUEUE = 1,
|
||||
public static final int POS_QUEUE = 0,
|
||||
POS_NEW = 1,
|
||||
POS_DOWNLOADS = 2,
|
||||
POS_HISTORY = 3,
|
||||
POS_ADD = 4;
|
||||
|
|
|
@ -25,7 +25,7 @@ public class NavListAdapter extends BaseAdapter {
|
|||
public static final int VIEW_TYPE_SECTION_DIVIDER = 1;
|
||||
public static final int VIEW_TYPE_SUBSCRIPTION = 2;
|
||||
|
||||
public static final int[] NAV_TITLES = {R.string.all_episodes_label, R.string.queue_label, R.string.downloads_label, R.string.playback_history_label, R.string.add_feed_label};
|
||||
public static final int[] NAV_TITLES = {R.string.queue_label, R.string.new_episodes_label, R.string.downloads_label, R.string.playback_history_label, R.string.add_feed_label};
|
||||
|
||||
private final Drawable[] drawables;
|
||||
|
||||
|
@ -132,7 +132,7 @@ public class NavListAdapter extends BaseAdapter {
|
|||
} else {
|
||||
holder.count.setVisibility(View.GONE);
|
||||
}
|
||||
} else if (NAV_TITLES[position] == R.string.all_episodes_label) {
|
||||
} else if (NAV_TITLES[position] == R.string.new_episodes_label) {
|
||||
int unreadItems = itemAccess.getNumberOfUnreadItems();
|
||||
if (unreadItems > 0) {
|
||||
holder.count.setVisibility(View.VISIBLE);
|
||||
|
|
|
@ -144,6 +144,8 @@ public class NewEpisodesListAdapter extends BaseAdapter {
|
|||
if (item.isRead()) {
|
||||
// grey it out
|
||||
ViewHelper.setAlpha(convertView, .2f);
|
||||
} else {
|
||||
ViewHelper.setAlpha(convertView, 1.0f);
|
||||
}
|
||||
|
||||
return convertView;
|
||||
|
|
|
@ -230,7 +230,7 @@ public class NewEpisodesFragment extends Fragment {
|
|||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
super.onCreateView(inflater, container, savedInstanceState);
|
||||
((MainActivity) getActivity()).getSupportActionBar().setTitle(R.string.all_episodes_label);
|
||||
((MainActivity) getActivity()).getSupportActionBar().setTitle(R.string.new_episodes_label);
|
||||
|
||||
View root = inflater.inflate(R.layout.new_episodes_fragment, container, false);
|
||||
|
||||
|
|
Loading…
Reference in New Issue