use of com.android.systemui.statusbar.ExpandableView in project android_frameworks_base by AOSPA.
the class NotificationStackScrollLayout method getBottomMostNotificationBottom.
public float getBottomMostNotificationBottom() {
final int count = getChildCount();
float max = 0;
for (int childIdx = 0; childIdx < count; childIdx++) {
ExpandableView child = (ExpandableView) getChildAt(childIdx);
if (child.getVisibility() == GONE) {
continue;
}
float bottom = child.getTranslationY() + child.getActualHeight();
if (bottom > max) {
max = bottom;
}
}
return max + getStackTranslation();
}
use of com.android.systemui.statusbar.ExpandableView in project android_frameworks_base by AOSPA.
the class ExpandHelper method findView.
private ExpandableView findView(float x, float y) {
ExpandableView v;
if (mEventSource != null) {
int[] location = new int[2];
mEventSource.getLocationOnScreen(location);
x += location[0];
y += location[1];
v = mCallback.getChildAtRawPosition(x, y);
} else {
v = mCallback.getChildAtPosition(x, y);
}
return v;
}
use of com.android.systemui.statusbar.ExpandableView in project android_frameworks_base by crdroidandroid.
the class ExpandHelper method findView.
private ExpandableView findView(float x, float y) {
ExpandableView v;
if (mEventSource != null) {
int[] location = new int[2];
mEventSource.getLocationOnScreen(location);
x += location[0];
y += location[1];
v = mCallback.getChildAtRawPosition(x, y);
} else {
v = mCallback.getChildAtPosition(x, y);
}
return v;
}
use of com.android.systemui.statusbar.ExpandableView in project android_frameworks_base by crdroidandroid.
the class NotificationStackScrollLayout method changeViewPosition.
/**
* Change the position of child to a new location
*
* @param child the view to change the position for
* @param newIndex the new index
*/
public void changeViewPosition(View child, int newIndex) {
int currentIndex = indexOfChild(child);
if (child != null && child.getParent() == this && currentIndex != newIndex) {
mChangePositionInProgress = true;
((ExpandableView) child).setChangingPosition(true);
removeView(child);
addView(child, newIndex);
((ExpandableView) child).setChangingPosition(false);
mChangePositionInProgress = false;
if (mIsExpanded && mAnimationsEnabled && child.getVisibility() != View.GONE) {
mChildrenChangingPositions.add(child);
mNeedsAnimation = true;
}
}
}
use of com.android.systemui.statusbar.ExpandableView in project android_frameworks_base by crdroidandroid.
the class RemoteInputView method findScrollContainer.
private void findScrollContainer() {
if (mScrollContainer == null) {
mScrollContainerChild = null;
ViewParent p = this;
while (p != null) {
if (mScrollContainerChild == null && p instanceof ExpandableView) {
mScrollContainerChild = (View) p;
}
if (p.getParent() instanceof ScrollContainer) {
mScrollContainer = (ScrollContainer) p.getParent();
if (mScrollContainerChild == null) {
mScrollContainerChild = (View) p;
}
break;
}
p = p.getParent();
}
}
}
Aggregations