From 1433cba57faa2e0bcd8b8c798bcf5b72a0c6266f Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 3 Feb 2012 09:22:15 +0300 Subject: [PATCH] open preferences automatically on first start --- AndroidManifest.xml | 4 ++-- src/org/fox/ttrss/ArticleFragment.java | 4 +++- src/org/fox/ttrss/MainActivity.java | 5 +++++ src/org/fox/ttrss/OfflineArticleFragment.java | 4 +++- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 55f46404..eda9b264 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="58" + android:versionName="0.4.10" > diff --git a/src/org/fox/ttrss/ArticleFragment.java b/src/org/fox/ttrss/ArticleFragment.java index 3809d0ab..fe02aa3d 100644 --- a/src/org/fox/ttrss/ArticleFragment.java +++ b/src/org/fox/ttrss/ArticleFragment.java @@ -106,7 +106,9 @@ public class ArticleFragment extends Fragment { getActivity().getTheme().resolveAttribute(R.attr.linkColor, tv, true); // prevent flicker in ics - web.setLayerType(View.LAYER_TYPE_SOFTWARE, null); + if (android.os.Build.VERSION.SDK_INT >= 11) { + web.setLayerType(View.LAYER_TYPE_SOFTWARE, null); + } if (m_prefs.getString("theme", "THEME_DARK").equals("THEME_DARK")) { cssOverride = "body { background : transparent; color : #e0e0e0}"; diff --git a/src/org/fox/ttrss/MainActivity.java b/src/org/fox/ttrss/MainActivity.java index 22940f78..f3606dc2 100644 --- a/src/org/fox/ttrss/MainActivity.java +++ b/src/org/fox/ttrss/MainActivity.java @@ -1685,6 +1685,11 @@ public class MainActivity extends FragmentActivity implements OnlineServices { setLoadingStatus(R.string.login_need_configure, false); + // launch preferences + Intent intent = new Intent(MainActivity.this, + PreferencesActivity.class); + startActivityForResult(intent, 0); + } else { LoginRequest ar = new LoginRequest(getApplicationContext()); diff --git a/src/org/fox/ttrss/OfflineArticleFragment.java b/src/org/fox/ttrss/OfflineArticleFragment.java index 79b7df92..e6c291bc 100644 --- a/src/org/fox/ttrss/OfflineArticleFragment.java +++ b/src/org/fox/ttrss/OfflineArticleFragment.java @@ -110,7 +110,9 @@ public class OfflineArticleFragment extends Fragment { getActivity().getTheme().resolveAttribute(R.attr.linkColor, tv, true); // prevent flicker in ics - web.setLayerType(View.LAYER_TYPE_SOFTWARE, null); + if (android.os.Build.VERSION.SDK_INT >= 11) { + web.setLayerType(View.LAYER_TYPE_SOFTWARE, null); + } if (m_prefs.getString("theme", "THEME_DARK").equals("THEME_DARK")) { cssOverride = "body { background : transparent; color : #e0e0e0}";