From d8b7761ad404cddb18489db23f1d853a1db55258 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 27 Jan 2012 12:57:56 +0300 Subject: [PATCH] disable layout transitioner on ICS since it doesn't seem to work properly, bump version --- AndroidManifest.xml | 4 +-- src/org/fox/ttrss/MainActivity.java | 44 ++++++++++++++------------ src/org/fox/ttrss/OfflineActivity.java | 12 ++++--- 3 files changed, 32 insertions(+), 28 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index f1ab445c..95d87da9 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="55" + android:versionName="0.4.7" > diff --git a/src/org/fox/ttrss/MainActivity.java b/src/org/fox/ttrss/MainActivity.java index bfe00255..54660382 100644 --- a/src/org/fox/ttrss/MainActivity.java +++ b/src/org/fox/ttrss/MainActivity.java @@ -480,7 +480,9 @@ public class MainActivity extends FragmentActivity implements OnlineServices { Log.d(TAG, "m_compatMode=" + m_compatMode); if (!m_compatMode) { - new TransitionHelper((ViewGroup) findViewById(R.id.main)); + if (android.os.Build.VERSION.SDK_INT < 14) { + new TransitionHelper((ViewGroup) findViewById(R.id.main)); + } m_headlinesActionModeCallback = new HeadlinesActionModeCallback(); } @@ -507,10 +509,10 @@ public class MainActivity extends FragmentActivity implements OnlineServices { findViewById(R.id.article_fragment).setVisibility(View.GONE); if (m_enableCats && m_activeCategory == null) { - findViewById(R.id.cats_fragment).setVisibility( - View.VISIBLE); findViewById(R.id.feeds_fragment).setVisibility( View.GONE); + findViewById(R.id.cats_fragment).setVisibility( + View.VISIBLE); } else { findViewById(R.id.cats_fragment).setVisibility( View.GONE); @@ -733,8 +735,8 @@ public class MainActivity extends FragmentActivity implements OnlineServices { private void closeCategory() { - findViewById(R.id.cats_fragment).setVisibility(View.VISIBLE); findViewById(R.id.feeds_fragment).setVisibility(View.GONE); + findViewById(R.id.cats_fragment).setVisibility(View.VISIBLE); m_activeCategory = null; @@ -768,17 +770,17 @@ public class MainActivity extends FragmentActivity implements OnlineServices { if (m_selectedArticle != null) { closeArticle(); } else if (m_activeFeed != null) { - if (m_compatMode) { + //if (m_compatMode) { findViewById(R.id.main).setAnimation( AnimationUtils.loadAnimation(this, R.anim.slide_right)); - } + //} if (m_activeFeed.is_cat) { - findViewById(R.id.cats_fragment) - .setVisibility(View.VISIBLE); findViewById(R.id.headlines_fragment).setVisibility( View.GONE); + findViewById(R.id.cats_fragment) + .setVisibility(View.VISIBLE); FeedCategoriesFragment cf = (FeedCategoriesFragment) getSupportFragmentManager() .findFragmentById(R.id.cats_fragment); @@ -789,10 +791,10 @@ public class MainActivity extends FragmentActivity implements OnlineServices { refreshCategories(); } else { - findViewById(R.id.feeds_fragment).setVisibility( - View.VISIBLE); findViewById(R.id.headlines_fragment).setVisibility( View.GONE); + findViewById(R.id.feeds_fragment).setVisibility( + View.VISIBLE); refreshFeeds(); } @@ -809,11 +811,11 @@ public class MainActivity extends FragmentActivity implements OnlineServices { initMainMenu(); } else if (m_activeCategory != null) { - if (m_compatMode) { + //if (m_compatMode) { findViewById(R.id.main).setAnimation( AnimationUtils.loadAnimation(this, R.anim.slide_right)); - } + //} closeCategory(); @@ -1173,7 +1175,7 @@ public class MainActivity extends FragmentActivity implements OnlineServices { } private void closeArticle() { - if (m_compatMode) { + if (m_smallScreenMode) { findViewById(R.id.main).setAnimation( AnimationUtils.loadAnimation(this, R.anim.slide_right)); } @@ -1182,8 +1184,8 @@ public class MainActivity extends FragmentActivity implements OnlineServices { // false); if (m_smallScreenMode) { - findViewById(R.id.headlines_fragment).setVisibility(View.VISIBLE); findViewById(R.id.article_fragment).setVisibility(View.GONE); + findViewById(R.id.headlines_fragment).setVisibility(View.VISIBLE); } else { findViewById(R.id.article_fragment).setVisibility(View.GONE); @@ -1499,8 +1501,8 @@ public class MainActivity extends FragmentActivity implements OnlineServices { initMainMenu(); if (m_smallScreenMode) { - findViewById(R.id.headlines_fragment).setVisibility(View.VISIBLE); findViewById(R.id.feeds_fragment).setVisibility(View.GONE); + findViewById(R.id.headlines_fragment).setVisibility(View.VISIBLE); } else { findViewById(R.id.headlines_fragment).setVisibility(View.VISIBLE); } @@ -1536,8 +1538,8 @@ public class MainActivity extends FragmentActivity implements OnlineServices { Log.d(TAG, "viewCategory"); if (!openAsFeed) { - findViewById(R.id.feeds_fragment).setVisibility(View.VISIBLE); findViewById(R.id.cats_fragment).setVisibility(View.GONE); + findViewById(R.id.feeds_fragment).setVisibility(View.VISIBLE); m_activeCategory = cat; @@ -1548,11 +1550,11 @@ public class MainActivity extends FragmentActivity implements OnlineServices { ft.replace(R.id.feeds_fragment, frag); ft.commit(); } else { - findViewById(R.id.headlines_fragment).setVisibility(View.VISIBLE); - if (m_smallScreenMode) findViewById(R.id.cats_fragment).setVisibility(View.GONE); + findViewById(R.id.headlines_fragment).setVisibility(View.VISIBLE); + m_activeFeed = new Feed(cat.id, cat.title, true); if (m_menu != null) { @@ -1594,12 +1596,12 @@ public class MainActivity extends FragmentActivity implements OnlineServices { } if (m_smallScreenMode) { - findViewById(R.id.article_fragment).setVisibility(View.VISIBLE); findViewById(R.id.headlines_fragment).setVisibility(View.GONE); - } else { findViewById(R.id.article_fragment).setVisibility(View.VISIBLE); + } else { findViewById(R.id.feeds_fragment).setVisibility(View.GONE); findViewById(R.id.cats_fragment).setVisibility(View.GONE); + findViewById(R.id.article_fragment).setVisibility(View.VISIBLE); } Fragment frag; @@ -1614,7 +1616,7 @@ public class MainActivity extends FragmentActivity implements OnlineServices { ft.replace(R.id.article_fragment, frag); ft.commit(); - if (m_compatMode) { + if (m_smallScreenMode) { if (compatAnimation == 0) findViewById(R.id.main).setAnimation( AnimationUtils.loadAnimation(this, R.anim.slide_left)); diff --git a/src/org/fox/ttrss/OfflineActivity.java b/src/org/fox/ttrss/OfflineActivity.java index 0274b20d..ec53a80a 100644 --- a/src/org/fox/ttrss/OfflineActivity.java +++ b/src/org/fox/ttrss/OfflineActivity.java @@ -131,7 +131,9 @@ public class OfflineActivity extends FragmentActivity implements Log.d(TAG, "m_compatMode=" + m_compatMode); if (!m_compatMode) { - new TransitionHelper((ViewGroup) findViewById(R.id.main)); + if (android.os.Build.VERSION.SDK_INT < 14) { + new TransitionHelper((ViewGroup) findViewById(R.id.main)); + } m_headlinesActionModeCallback = new HeadlinesActionModeCallback(); } @@ -311,11 +313,11 @@ public class OfflineActivity extends FragmentActivity implements if (m_selectedArticleId != 0) { closeArticle(); } else if (m_activeFeedId != 0) { - if (m_compatMode) { + //if (m_compatMode) { findViewById(R.id.main).setAnimation( AnimationUtils.loadAnimation(this, R.anim.slide_right)); - } + //} /* * if (m_activeFeed != null && m_activeFeed.is_cat) { @@ -669,7 +671,7 @@ public class OfflineActivity extends FragmentActivity implements } private void closeArticle() { - if (m_compatMode) { + if (m_smallScreenMode) { findViewById(R.id.main).setAnimation( AnimationUtils.loadAnimation(this, R.anim.slide_right)); } @@ -1118,7 +1120,7 @@ public class OfflineActivity extends FragmentActivity implements ft.replace(R.id.article_fragment, frag); ft.commit(); - if (m_compatMode) { + if (m_smallScreenMode) { if (compatAnimation == 0) findViewById(R.id.main).setAnimation( AnimationUtils.loadAnimation(this, R.anim.slide_left));