disable view_selected for feed/cats fragments in small screen mode because of issues when navigating back while not replacing the headlines view content

This commit is contained in:
Andrew Dolgov 2014-11-06 19:08:52 +03:00
parent 6be9af4600
commit fe3e40d236
2 changed files with 3 additions and 8 deletions

View File

@ -438,7 +438,7 @@ public class FeedCategoriesFragment extends Fragment implements OnItemClickListe
public int getItemViewType(int position) {
FeedCategory cat = items.get(position);
if (m_selectedCat != null && cat.id == m_selectedCat.id) {
if (!m_activity.isSmallScreen() && m_selectedCat != null && cat.id == m_selectedCat.id) {
return VIEW_SELECTED;
} else {
return VIEW_NORMAL;

View File

@ -594,8 +594,7 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh
public static final int VIEW_NORMAL = 0;
public static final int VIEW_SELECTED = 1;
//public static final int VIEW_GOBACK = 2;
public static final int VIEW_COUNT = VIEW_SELECTED+1;
public FeedListAdapter(Context context, int textViewResourceId, ArrayList<Feed> items) {
@ -611,9 +610,7 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh
public int getItemViewType(int position) {
Feed feed = items.get(position);
/* if (m_enableParentBtn && position == 0) {
return VIEW_GOBACK;
} else */ if (m_selectedFeed != null && feed.id == m_selectedFeed.id) {
if (!m_activity.isSmallScreen() && m_selectedFeed != null && feed.id == m_selectedFeed.id) {
return VIEW_SELECTED;
} else {
return VIEW_NORMAL;
@ -630,8 +627,6 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh
int layoutId = R.layout.feeds_row;
switch (getItemViewType(position)) {
/* case VIEW_GOBACK:
layoutId = R.layout.feeds_goback; */
case VIEW_SELECTED:
layoutId = R.layout.feeds_row_selected;
break;