mirror of
https://gitee.com/houstudio/Cdroid.git
synced 2024-12-02 04:07:42 +08:00
mOrientationHelper's destroing moved to linearlayoutmanager
This commit is contained in:
parent
f817d973e3
commit
594d543239
@ -134,9 +134,7 @@ int LinearLayoutManager::getOrientation()const {
|
||||
}
|
||||
|
||||
void LinearLayoutManager::setOrientation(int orientation) {
|
||||
if (orientation != HORIZONTAL && orientation != VERTICAL) {
|
||||
FATAL("invalid orientation:%d",orientation);
|
||||
}
|
||||
FATAL_IF( (orientation != HORIZONTAL)&&(orientation != VERTICAL),"invalid orientation:%d",orientation);
|
||||
|
||||
assertNotInLayoutOrScroll("");
|
||||
|
||||
@ -1653,13 +1651,10 @@ void LinearLayoutManager::SavedState::writeToParcel(Parcel& dest, int flags) {
|
||||
|
||||
LinearLayoutManager::AnchorInfo::AnchorInfo() {
|
||||
mOrientationHelper = nullptr;
|
||||
/*mOrientationHelper is owned/destroied by LinearLayoutManager*/
|
||||
reset();
|
||||
}
|
||||
|
||||
LinearLayoutManager::AnchorInfo::~AnchorInfo(){
|
||||
delete mOrientationHelper;
|
||||
}
|
||||
|
||||
void LinearLayoutManager::AnchorInfo::reset() {
|
||||
mPosition = RecyclerView::NO_POSITION;
|
||||
mCoordinate = INVALID_OFFSET;
|
||||
|
@ -224,7 +224,6 @@ protected:
|
||||
bool mValid;
|
||||
protected:
|
||||
AnchorInfo();
|
||||
virtual ~AnchorInfo();
|
||||
void reset();
|
||||
void assignCoordinateFromPadding();
|
||||
bool isViewValidAsAnchor(View* child, RecyclerView::State& state);
|
||||
|
Loading…
Reference in New Issue
Block a user