disable headlines actionbar hiding >=600dp devices
This commit is contained in:
parent
6a834e1486
commit
675f77a59b
@ -72,6 +72,11 @@ public class CommonActivity extends ActionBarActivity {
|
|||||||
return super.onKeyDown(keyCode, event);
|
return super.onKeyDown(keyCode, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// not the same as isSmallScreen() which is mostly about layout being loaded
|
||||||
|
public boolean isTablet() {
|
||||||
|
return getResources().getConfiguration().smallestScreenWidthDp >= 600;
|
||||||
|
}
|
||||||
|
|
||||||
public void setUnreadOnly(boolean unread) {
|
public void setUnreadOnly(boolean unread) {
|
||||||
SharedPreferences.Editor editor = m_prefs.edit();
|
SharedPreferences.Editor editor = m_prefs.edit();
|
||||||
editor.putBoolean("show_unread_only", unread);
|
editor.putBoolean("show_unread_only", unread);
|
||||||
|
@ -1333,7 +1333,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_activity.isSmallScreen()) {
|
if (!m_activity.isTablet()) {
|
||||||
if (m_adapter.getCount() > 0) {
|
if (m_adapter.getCount() > 0) {
|
||||||
if (firstVisibleItem > m_listPreviousVisibleItem) {
|
if (firstVisibleItem > m_listPreviousVisibleItem) {
|
||||||
m_activity.getSupportActionBar().hide();
|
m_activity.getSupportActionBar().hide();
|
||||||
|
Loading…
Reference in New Issue
Block a user