mirror of
https://github.com/material-components/material-components-android.git
synced 2026-02-20 08:39:55 +08:00
90 lines
2.5 KiB
Java
90 lines
2.5 KiB
Java
/*
|
|
* Copyright (C) 2015 The Android Open Source Project
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
package android.support.design.widget;
|
|
|
|
import android.content.Context;
|
|
import android.support.annotation.RequiresApi;
|
|
import android.util.AttributeSet;
|
|
import android.view.ViewGroup;
|
|
import android.widget.FrameLayout;
|
|
|
|
/**
|
|
* @deprecated This version of the CollapsingToolbarLayout is deprecated use {@link
|
|
* android.support.design.appbar.CollapsingToolbarLayout} instead.
|
|
*/
|
|
@Deprecated
|
|
public class CollapsingToolbarLayout extends android.support.design.appbar.CollapsingToolbarLayout {
|
|
|
|
public CollapsingToolbarLayout(Context context) {
|
|
super(context);
|
|
}
|
|
|
|
public CollapsingToolbarLayout(Context context, AttributeSet attrs) {
|
|
super(context, attrs);
|
|
}
|
|
|
|
public CollapsingToolbarLayout(Context context, AttributeSet attrs, int defStyleAttr) {
|
|
super(context, attrs, defStyleAttr);
|
|
}
|
|
|
|
@Override
|
|
protected LayoutParams generateDefaultLayoutParams() {
|
|
return new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
|
|
}
|
|
|
|
@Override
|
|
public FrameLayout.LayoutParams generateLayoutParams(AttributeSet attrs) {
|
|
return new LayoutParams(getContext(), attrs);
|
|
}
|
|
|
|
@Override
|
|
protected FrameLayout.LayoutParams generateLayoutParams(ViewGroup.LayoutParams p) {
|
|
return new LayoutParams(p);
|
|
}
|
|
|
|
/** @deprecated */
|
|
@Deprecated
|
|
public static class LayoutParams
|
|
extends android.support.design.appbar.CollapsingToolbarLayout.LayoutParams {
|
|
|
|
public LayoutParams(Context c, AttributeSet attrs) {
|
|
super(c, attrs);
|
|
}
|
|
|
|
public LayoutParams(int width, int height) {
|
|
super(width, height);
|
|
}
|
|
|
|
public LayoutParams(int width, int height, int gravity) {
|
|
super(width, height, gravity);
|
|
}
|
|
|
|
public LayoutParams(ViewGroup.LayoutParams p) {
|
|
super(p);
|
|
}
|
|
|
|
public LayoutParams(MarginLayoutParams source) {
|
|
super(source);
|
|
}
|
|
|
|
@RequiresApi(19)
|
|
public LayoutParams(FrameLayout.LayoutParams source) {
|
|
super(source);
|
|
}
|
|
}
|
|
}
|