remove drawer in headlines_articles on phones

This commit is contained in:
Andrew Dolgov 2014-11-01 09:23:20 +03:00
parent 66906beace
commit 081b98e9c0
4 changed files with 16 additions and 34 deletions

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.fox.ttrss" package="org.fox.ttrss"
android:versionCode="254" android:versionCode="255"
android:versionName="1.51" > android:versionName="1.52" >
<uses-sdk <uses-sdk
android:minSdkVersion="9" android:minSdkVersion="9"

View File

@ -768,7 +768,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
String articleContent = article.content != null ? article.content : ""; String articleContent = article.content != null ? article.content : "";
if (holder.excerptView != null) { if (holder.excerptView != null) {
if ((m_compactLayoutMode && m_activity.isSmallScreen()) || !m_prefs.getBoolean("headlines_show_content", true)) { if (!m_prefs.getBoolean("headlines_show_content", true)) {
holder.excerptView.setVisibility(View.GONE); holder.excerptView.setVisibility(View.GONE);
} else { } else {
String excerpt = Jsoup.parse(articleContent).text(); String excerpt = Jsoup.parse(articleContent).text();
@ -966,12 +966,6 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
}); });
} }
if (m_compactLayoutMode && m_activity.isSmallScreen()) {
if (holder.headlineFooter != null) {
holder.headlineFooter.setVisibility(View.GONE);
}
}
return v; return v;
} }

View File

@ -592,7 +592,7 @@ public class OfflineHeadlinesFragment extends Fragment implements OnItemClickLis
TextView te = (TextView)v.findViewById(R.id.excerpt); TextView te = (TextView)v.findViewById(R.id.excerpt);
if (te != null) { if (te != null) {
if ((m_compactLayoutMode && m_activity.isSmallScreen()) || !m_prefs.getBoolean("headlines_show_content", true)) { if (!m_prefs.getBoolean("headlines_show_content", true)) {
te.setVisibility(View.GONE); te.setVisibility(View.GONE);
} else { } else {
String excerpt = Jsoup.parse(article.getString(article.getColumnIndex("content"))).text(); String excerpt = Jsoup.parse(article.getString(article.getColumnIndex("content"))).text();
@ -684,12 +684,6 @@ public class OfflineHeadlinesFragment extends Fragment implements OnItemClickLis
}); });
} }
View headlineFooter = v.findViewById(R.id.headline_footer);
if (headlineFooter != null && m_compactLayoutMode && m_activity.isSmallScreen()) {
headlineFooter.setVisibility(View.GONE);
}
return v; return v;
} }

View File

@ -4,11 +4,6 @@
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent"> android:layout_height="fill_parent">
<android.support.v4.widget.DrawerLayout
android:id="@+id/headlines_drawer"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout <FrameLayout
android:id="@+id/article_fragment" android:id="@+id/article_fragment"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -18,11 +13,10 @@
<FrameLayout <FrameLayout
android:id="@+id/headlines_fragment" android:id="@+id/headlines_fragment"
android:layout_height="match_parent" android:visibility="gone"
android:layout_width="240dp" android:layout_height="0dp"
android:layout_gravity="start" android:layout_width="0dp"
android:background="?headlinesBackgroundSolid"> android:background="?headlinesBackgroundSolid">
</FrameLayout> </FrameLayout>
</android.support.v4.widget.DrawerLayout>
</FrameLayout> </FrameLayout>