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:
parent
6be9af4600
commit
fe3e40d236
@ -438,7 +438,7 @@ public class FeedCategoriesFragment extends Fragment implements OnItemClickListe
|
|||||||
public int getItemViewType(int position) {
|
public int getItemViewType(int position) {
|
||||||
FeedCategory cat = items.get(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;
|
return VIEW_SELECTED;
|
||||||
} else {
|
} else {
|
||||||
return VIEW_NORMAL;
|
return VIEW_NORMAL;
|
||||||
|
@ -594,8 +594,7 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh
|
|||||||
|
|
||||||
public static final int VIEW_NORMAL = 0;
|
public static final int VIEW_NORMAL = 0;
|
||||||
public static final int VIEW_SELECTED = 1;
|
public static final int VIEW_SELECTED = 1;
|
||||||
//public static final int VIEW_GOBACK = 2;
|
|
||||||
|
|
||||||
public static final int VIEW_COUNT = VIEW_SELECTED+1;
|
public static final int VIEW_COUNT = VIEW_SELECTED+1;
|
||||||
|
|
||||||
public FeedListAdapter(Context context, int textViewResourceId, ArrayList<Feed> items) {
|
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) {
|
public int getItemViewType(int position) {
|
||||||
Feed feed = items.get(position);
|
Feed feed = items.get(position);
|
||||||
|
|
||||||
/* if (m_enableParentBtn && position == 0) {
|
if (!m_activity.isSmallScreen() && m_selectedFeed != null && feed.id == m_selectedFeed.id) {
|
||||||
return VIEW_GOBACK;
|
|
||||||
} else */ if (m_selectedFeed != null && feed.id == m_selectedFeed.id) {
|
|
||||||
return VIEW_SELECTED;
|
return VIEW_SELECTED;
|
||||||
} else {
|
} else {
|
||||||
return VIEW_NORMAL;
|
return VIEW_NORMAL;
|
||||||
@ -630,8 +627,6 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh
|
|||||||
int layoutId = R.layout.feeds_row;
|
int layoutId = R.layout.feeds_row;
|
||||||
|
|
||||||
switch (getItemViewType(position)) {
|
switch (getItemViewType(position)) {
|
||||||
/* case VIEW_GOBACK:
|
|
||||||
layoutId = R.layout.feeds_goback; */
|
|
||||||
case VIEW_SELECTED:
|
case VIEW_SELECTED:
|
||||||
layoutId = R.layout.feeds_row_selected;
|
layoutId = R.layout.feeds_row_selected;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user