do not show drawer header in tablet horizontal mode

This commit is contained in:
Andrew Dolgov 2015-06-05 20:01:27 +03:00
parent cb0c9b06e0
commit 99216872d0
5 changed files with 54 additions and 44 deletions

View File

@ -28,6 +28,8 @@ public abstract class BaseFeedlistFragment extends Fragment {
if (true /*m_activity.findViewById(R.id.headlines_drawer) != null*/) {
try {
if (activity.isSmallScreen()) {
View layout = inflater.inflate(R.layout.drawer_header, list, false);
list.addHeaderView(layout, null, false);
@ -55,6 +57,7 @@ public abstract class BaseFeedlistFragment extends Fragment {
}
}
});
}
/* deal with ~material~ footers */

View File

@ -225,7 +225,10 @@ public class FeedCategoriesFragment extends BaseFeedlistFragment implements OnIt
registerForContextMenu(m_list);
View loadingBar = (View) view.findViewById(R.id.feeds_loading_bar);
if (loadingBar != null) {
loadingBar.setVisibility(View.VISIBLE);
}
//m_activity.m_pullToRefreshAttacher.addRefreshableView(list, this);

View File

@ -309,7 +309,10 @@ public class FeedsFragment extends BaseFeedlistFragment implements OnItemClickLi
//m_enableFeedIcons = m_prefs.getBoolean("download_feed_icons", false);
View loadingBar = (View) view.findViewById(R.id.feeds_loading_bar);
if (loadingBar != null) {
loadingBar.setVisibility(View.VISIBLE);
}
//Log.d(TAG, "mpTRA=" + m_activity.m_pullToRefreshAttacher);
//m_activity.m_pullToRefreshAttacher.addRefreshableView(list, this);

View File

@ -1,11 +1,18 @@
<LinearLayout
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fitsSystemWindows="true"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android">
<include layout="@layout/actionbar_toolbar" android:id="@+id/actionbar_toolbar" />
<LinearLayout
android:id="@+id/fragment_container"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:baselineAligned="false"
android:orientation="horizontal" >
android:orientation="horizontal"
android:layout_below="@+id/actionbar_toolbar">
<FrameLayout
android:id="@+id/sw600dp_anchor"
@ -14,7 +21,6 @@
android:visibility="gone" >
</FrameLayout>
<FrameLayout
android:id="@+id/feeds_fragment"
android:layout_width="0dp"
@ -23,21 +29,16 @@
android:background="?feedlistBackground" >
</FrameLayout>
<RelativeLayout
<FrameLayout
android:layout_width="0dp"
android:layout_weight="0.75"
android:layout_height="match_parent">
<include layout="@layout/actionbar_toolbar" android:id="@+id/actionbar_toolbar" />
<FrameLayout
android:id="@+id/headlines_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?headlinesBackground"
android:layout_below="@+id/actionbar_toolbar">
android:elevation="4dp"
android:layout_height="match_parent">
</FrameLayout>
</RelativeLayout>
</LinearLayout>
</RelativeLayout>

View File

@ -26,7 +26,7 @@
android:id="@+id/headlines_fragment"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.4"
android:layout_weight="0.3"
android:background="?headlinesBackground" >
</FrameLayout>
@ -34,7 +34,7 @@
android:id="@+id/article_fragment"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.6"
android:layout_weight="0.7"
android:elevation="4dp"
android:background="?articleBackground" >
</FrameLayout>