Merge "QS: Fixup footer + animations" into nyc-mr1-dev
This commit is contained in:
@@ -10,6 +10,7 @@ import android.util.Log;
|
|||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
import com.android.systemui.R;
|
import com.android.systemui.R;
|
||||||
import com.android.systemui.qs.QSPanel.QSTileLayout;
|
import com.android.systemui.qs.QSPanel.QSTileLayout;
|
||||||
import com.android.systemui.qs.QSPanel.TileRecord;
|
import com.android.systemui.qs.QSPanel.TileRecord;
|
||||||
@@ -207,6 +208,7 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout {
|
|||||||
}
|
}
|
||||||
if (DEBUG) Log.d(TAG, "Size: " + mNumPages);
|
if (DEBUG) Log.d(TAG, "Size: " + mNumPages);
|
||||||
mPageIndicator.setNumPages(mNumPages);
|
mPageIndicator.setNumPages(mNumPages);
|
||||||
|
mDecorGroup.setVisibility(mNumPages > 1 ? View.VISIBLE : View.GONE);
|
||||||
setAdapter(mAdapter);
|
setAdapter(mAdapter);
|
||||||
mAdapter.notifyDataSetChanged();
|
mAdapter.notifyDataSetChanged();
|
||||||
setCurrentItem(0, false);
|
setCurrentItem(0, false);
|
||||||
@@ -238,7 +240,8 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout {
|
|||||||
maxHeight = height;
|
maxHeight = height;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setMeasuredDimension(getMeasuredWidth(), maxHeight + mDecorGroup.getMeasuredHeight());
|
setMeasuredDimension(getMeasuredWidth(), maxHeight
|
||||||
|
+ (mDecorGroup.getVisibility() != View.GONE ? mDecorGroup.getMeasuredHeight() : 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
private final Runnable mDistribute = new Runnable() {
|
private final Runnable mDistribute = new Runnable() {
|
||||||
|
|||||||
@@ -230,7 +230,9 @@ public class QSAnimator implements Callback, PageListener, Listener, OnLayoutCha
|
|||||||
// Fade in the tiles/labels as we reach the final position.
|
// Fade in the tiles/labels as we reach the final position.
|
||||||
mFirstPageDelayedAnimator = new TouchAnimator.Builder()
|
mFirstPageDelayedAnimator = new TouchAnimator.Builder()
|
||||||
.setStartDelay(EXPANDED_TILE_DELAY)
|
.setStartDelay(EXPANDED_TILE_DELAY)
|
||||||
.addFloat(mQsPanel.getTileLayout(), "alpha", 0, 1).build();
|
.addFloat(mQsPanel.getTileLayout(), "alpha", 0, 1)
|
||||||
|
.addFloat(mQsPanel.getFooter().getView(), "alpha", 0, 1).build();
|
||||||
|
mAllViews.add(mQsPanel.getFooter().getView());
|
||||||
Path path = new Path();
|
Path path = new Path();
|
||||||
path.moveTo(0, 0);
|
path.moveTo(0, 0);
|
||||||
path.cubicTo(0, 0, 0, 1, 1, 1);
|
path.cubicTo(0, 0, 0, 1, 1, 1);
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ import android.content.res.Resources;
|
|||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.util.Log;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
@@ -505,6 +504,10 @@ public class QSPanel extends LinearLayout implements Tunable, Callback {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public QSFooter getFooter() {
|
||||||
|
return mFooter;
|
||||||
|
}
|
||||||
|
|
||||||
private class H extends Handler {
|
private class H extends Handler {
|
||||||
private static final int SHOW_DETAIL = 1;
|
private static final int SHOW_DETAIL = 1;
|
||||||
private static final int SET_TILE_VISIBILITY = 2;
|
private static final int SET_TILE_VISIBILITY = 2;
|
||||||
|
|||||||
Reference in New Issue
Block a user