enable transitions for API 15, remove TransitionHelper

This commit is contained in:
Andrew Dolgov 2012-02-25 13:27:57 +03:00
parent c33708a1cf
commit 9b637ba139
3 changed files with 8 additions and 16 deletions

View File

@ -6,6 +6,7 @@ import java.util.List;
import java.util.Timer;
import java.util.TimerTask;
import android.animation.LayoutTransition;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.BroadcastReceiver;
@ -482,8 +483,9 @@ public class MainActivity extends FragmentActivity implements OnlineServices {
Log.d(TAG, "m_compatMode=" + m_compatMode);
if (!m_compatMode) {
if (android.os.Build.VERSION.SDK_INT < 14) {
new TransitionHelper((ViewGroup) findViewById(R.id.main));
if (android.os.Build.VERSION.SDK_INT < 14 || android.os.Build.VERSION.SDK_INT == 15) {
LayoutTransition transitioner = new LayoutTransition();
((ViewGroup) findViewById(R.id.main)).setLayoutTransition(transitioner);
}
m_headlinesActionModeCallback = new HeadlinesActionModeCallback();

View File

@ -2,6 +2,7 @@ package org.fox.ttrss;
import org.fox.ttrss.OnlineServices.RelativeArticle;
import android.animation.LayoutTransition;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.NotificationManager;
@ -131,8 +132,9 @@ public class OfflineActivity extends FragmentActivity implements
Log.d(TAG, "m_compatMode=" + m_compatMode);
if (!m_compatMode) {
if (android.os.Build.VERSION.SDK_INT < 14) {
new TransitionHelper((ViewGroup) findViewById(R.id.main));
if (android.os.Build.VERSION.SDK_INT < 14 || android.os.Build.VERSION.SDK_INT == 15) {
LayoutTransition transitioner = new LayoutTransition();
((ViewGroup) findViewById(R.id.main)).setLayoutTransition(transitioner);
}
m_headlinesActionModeCallback = new HeadlinesActionModeCallback();

View File

@ -1,12 +0,0 @@
package org.fox.ttrss;
import android.animation.LayoutTransition;
import android.view.ViewGroup;
import android.widget.LinearLayout;
public class TransitionHelper {
public TransitionHelper(ViewGroup layout) {
LayoutTransition transitioner = new LayoutTransition();
layout.setLayoutTransition(transitioner);
}
}