本文整理汇总了Java中android.support.v7.widget.ContentFrameLayout类的典型用法代码示例。如果您正苦于以下问题:Java ContentFrameLayout类的具体用法?Java ContentFrameLayout怎么用?Java ContentFrameLayout使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ContentFrameLayout类属于android.support.v7.widget包,在下文中一共展示了ContentFrameLayout类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: applyFixedSizeWindow
import android.support.v7.widget.ContentFrameLayout; //导入依赖的package包/类
private void applyFixedSizeWindow() {
ContentFrameLayout cfl = (ContentFrameLayout) this.mSubDecor.findViewById(16908290);
View windowDecor = this.mWindow.getDecorView();
cfl.setDecorPadding(windowDecor.getPaddingLeft(), windowDecor.getPaddingTop(), windowDecor.getPaddingRight(), windowDecor.getPaddingBottom());
TypedArray a = this.mContext.obtainStyledAttributes(R.styleable.AppCompatTheme);
a.getValue(R.styleable.AppCompatTheme_windowMinWidthMajor, cfl.getMinWidthMajor());
a.getValue(R.styleable.AppCompatTheme_windowMinWidthMinor, cfl.getMinWidthMinor());
if (a.hasValue(R.styleable.AppCompatTheme_windowFixedWidthMajor)) {
a.getValue(R.styleable.AppCompatTheme_windowFixedWidthMajor, cfl.getFixedWidthMajor());
}
if (a.hasValue(R.styleable.AppCompatTheme_windowFixedWidthMinor)) {
a.getValue(R.styleable.AppCompatTheme_windowFixedWidthMinor, cfl.getFixedWidthMinor());
}
if (a.hasValue(R.styleable.AppCompatTheme_windowFixedHeightMajor)) {
a.getValue(R.styleable.AppCompatTheme_windowFixedHeightMajor, cfl.getFixedHeightMajor());
}
if (a.hasValue(R.styleable.AppCompatTheme_windowFixedHeightMinor)) {
a.getValue(R.styleable.AppCompatTheme_windowFixedHeightMinor, cfl.getFixedHeightMinor());
}
a.recycle();
cfl.requestLayout();
}
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:23,代码来源:AppCompatDelegateImplV7.java
示例2: m1696t
import android.support.v7.widget.ContentFrameLayout; //导入依赖的package包/类
private void m1696t() {
ContentFrameLayout contentFrameLayout = (ContentFrameLayout) this.f601v.findViewById(16908290);
View decorView = this.b.getDecorView();
contentFrameLayout.m1767a(decorView.getPaddingLeft(), decorView.getPaddingTop(), decorView.getPaddingRight(), decorView.getPaddingBottom());
TypedArray obtainStyledAttributes = this.a.obtainStyledAttributes(C0243l.AppCompatTheme);
obtainStyledAttributes.getValue(C0243l.AppCompatTheme_windowMinWidthMajor, contentFrameLayout.getMinWidthMajor());
obtainStyledAttributes.getValue(C0243l.AppCompatTheme_windowMinWidthMinor, contentFrameLayout.getMinWidthMinor());
if (obtainStyledAttributes.hasValue(C0243l.AppCompatTheme_windowFixedWidthMajor)) {
obtainStyledAttributes.getValue(C0243l.AppCompatTheme_windowFixedWidthMajor, contentFrameLayout.getFixedWidthMajor());
}
if (obtainStyledAttributes.hasValue(C0243l.AppCompatTheme_windowFixedWidthMinor)) {
obtainStyledAttributes.getValue(C0243l.AppCompatTheme_windowFixedWidthMinor, contentFrameLayout.getFixedWidthMinor());
}
if (obtainStyledAttributes.hasValue(C0243l.AppCompatTheme_windowFixedHeightMajor)) {
obtainStyledAttributes.getValue(C0243l.AppCompatTheme_windowFixedHeightMajor, contentFrameLayout.getFixedHeightMajor());
}
if (obtainStyledAttributes.hasValue(C0243l.AppCompatTheme_windowFixedHeightMinor)) {
obtainStyledAttributes.getValue(C0243l.AppCompatTheme_windowFixedHeightMinor, contentFrameLayout.getFixedHeightMinor());
}
obtainStyledAttributes.recycle();
contentFrameLayout.requestLayout();
}
开发者ID:Qwaz,项目名称:solved-hacking-problem,代码行数:23,代码来源:ae.java
示例3: initContainer
import android.support.v7.widget.ContentFrameLayout; //导入依赖的package包/类
private void initContainer(@Nullable Bundle savedInstanceState) {
ContentFrameLayout container = new ContentFrameLayout(this);
container.setId(R.id.delegate_container);
setContentView(container);
if (savedInstanceState == null) {
loadRootFragment(R.id.delegate_container, setRootDelegate());
}
}
开发者ID:remerber,项目名称:FastEc,代码行数:9,代码来源:ProxyActivity.java
示例4: destroy
import android.support.v7.widget.ContentFrameLayout; //导入依赖的package包/类
private void destroy(View originalView, ContentFrameLayout container) {
originalView.setAlpha(1.0F);
copyImageView.setVisibility(View.GONE);
r.setVisibility(View.GONE);
container.removeView(copyImageView);
container.removeView(r);
animator = null;
}
开发者ID:garyhu1,项目名称:collapselrecycler,代码行数:9,代码来源:BossZoomHelper.java
示例5: onCreateView
import android.support.v7.widget.ContentFrameLayout; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_info_hands_shake_dialog, container, false);
ContentFrameLayout mButtonOk = (ContentFrameLayout) view.findViewById(R.id.hands_shake_ok);
ContentFrameLayout mButtonCancel = (ContentFrameLayout) view.findViewById(R.id.hands_shake_cancel);
mButtonOk.setOnClickListener(this);
mButtonCancel.setOnClickListener(this);
return view;
}
开发者ID:securityfirst,项目名称:Umbrella_android,代码行数:13,代码来源:InfoHandsShakeDialog.java
示例6: onCreateView
import android.support.v7.widget.ContentFrameLayout; //导入依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.hands_shake_enter_dialog, container, false);
mNextButton = (ContentFrameLayout) view.findViewById(R.id.hands_shake_next_button);
mNextButton.setOnClickListener(this);
return view;
}
开发者ID:securityfirst,项目名称:Umbrella_android,代码行数:10,代码来源:HandsShakeDialog.java
示例7: m1695s
import android.support.v7.widget.ContentFrameLayout; //导入依赖的package包/类
private ViewGroup m1695s() {
TypedArray obtainStyledAttributes = this.a.obtainStyledAttributes(C0243l.AppCompatTheme);
if (obtainStyledAttributes.hasValue(C0243l.AppCompatTheme_windowActionBar)) {
View view;
if (obtainStyledAttributes.getBoolean(C0243l.AppCompatTheme_windowNoTitle, false)) {
m1723c(1);
} else if (obtainStyledAttributes.getBoolean(C0243l.AppCompatTheme_windowActionBar, false)) {
m1723c((int) C0243l.AppCompatTheme_ratingBarStyleSmall);
}
if (obtainStyledAttributes.getBoolean(C0243l.AppCompatTheme_windowActionBarOverlay, false)) {
m1723c((int) C0243l.AppCompatTheme_seekBarStyle);
}
if (obtainStyledAttributes.getBoolean(C0243l.AppCompatTheme_windowActionModeOverlay, false)) {
m1723c(10);
}
this.k = obtainStyledAttributes.getBoolean(C0243l.AppCompatTheme_android_windowIsFloating, false);
obtainStyledAttributes.recycle();
LayoutInflater from = LayoutInflater.from(this.a);
if (this.l) {
View view2 = this.j ? (ViewGroup) from.inflate(C0240i.abc_screen_simple_overlay_action_mode, null) : (ViewGroup) from.inflate(C0240i.abc_screen_simple, null);
if (VERSION.SDK_INT >= 21) {
bu.m985a(view2, new ag(this));
view = view2;
} else {
((android.support.v7.widget.bu) view2).setOnFitSystemWindowsListener(new ah(this));
view = view2;
}
} else if (this.k) {
r0 = (ViewGroup) from.inflate(C0240i.abc_dialog_title_material, null);
this.i = false;
this.h = false;
view = r0;
} else if (this.h) {
TypedValue typedValue = new TypedValue();
this.a.getTheme().resolveAttribute(C0233b.actionBarTheme, typedValue, true);
r0 = (ViewGroup) LayoutInflater.from(typedValue.resourceId != 0 ? new C0249e(this.a, typedValue.resourceId) : this.a).inflate(C0240i.abc_screen_toolbar, null);
this.f597r = (br) r0.findViewById(C0238g.decor_content_parent);
this.f597r.setWindowCallback(m1658o());
if (this.i) {
this.f597r.m2295a(C0243l.AppCompatTheme_seekBarStyle);
}
if (this.f604y) {
this.f597r.m2295a(2);
}
if (this.f605z) {
this.f597r.m2295a(5);
}
view = r0;
} else {
view = null;
}
if (view == null) {
throw new IllegalArgumentException("AppCompat does not support the current theme features: { windowActionBar: " + this.h + ", windowActionBarOverlay: " + this.i + ", android:windowIsFloating: " + this.k + ", windowActionModeOverlay: " + this.j + ", windowNoTitle: " + this.l + " }");
}
if (this.f597r == null) {
this.f602w = (TextView) view.findViewById(C0238g.title);
}
du.m2795b(view);
ViewGroup viewGroup = (ViewGroup) this.b.findViewById(16908290);
ContentFrameLayout contentFrameLayout = (ContentFrameLayout) view.findViewById(C0238g.action_bar_activity_content);
while (viewGroup.getChildCount() > 0) {
View childAt = viewGroup.getChildAt(0);
viewGroup.removeViewAt(0);
contentFrameLayout.addView(childAt);
}
this.b.setContentView(view);
viewGroup.setId(-1);
contentFrameLayout.setId(16908290);
if (viewGroup instanceof FrameLayout) {
((FrameLayout) viewGroup).setForeground(null);
}
contentFrameLayout.setAttachListener(new ai(this));
return view;
}
obtainStyledAttributes.recycle();
throw new IllegalStateException("You need to use a Theme.AppCompat theme (or descendant) with this activity.");
}
开发者ID:Qwaz,项目名称:solved-hacking-problem,代码行数:78,代码来源:ae.java
示例8: init
import android.support.v7.widget.ContentFrameLayout; //导入依赖的package包/类
public void init(){
if (animator != null) {
animator.cancel();
}
container = (ContentFrameLayout) activity.findViewById(android.R.id.content);
copyImageView = new PhotoView(activity);
int matchParent = FrameLayout.LayoutParams.MATCH_PARENT;
FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(matchParent, matchParent);
copyImageView.setLayoutParams(params);
r = new RelativeLayout(activity);
r.setLayoutParams(params);
r.setBackgroundColor(Color.BLACK);
if (originalView instanceof ImageView) {
copyImageView.setImageDrawable(((ImageView) originalView).getDrawable());
} else {
Bitmap bm = view2Bitmap(originalView);
if (bm != null) {
copyImageView.setImageBitmap(bm);
}
}
copyImageView.setVisibility(View.GONE);
r.setVisibility(View.GONE);
container.addView(r);
container.addView(copyImageView);
startRect = new Rect();
endRect = new Rect();
Point offsetPoint = new Point();
originalView.getGlobalVisibleRect(startRect);
/**
* r 是 绝对(global)坐标参数,包含状态栏、ActionBar、底部虚拟键
* globalOffset 用于将global坐标转换成local坐标,这里的local坐标,是相对于内容区的坐标,也就是除了状态栏和action bar和虚拟按键的区域。
* */
container.getGlobalVisibleRect(endRect, offsetPoint);
startRect.offset(-offsetPoint.x, -offsetPoint.y);
endRect.offset(-offsetPoint.x, -offsetPoint.y);
float scaleSize;
float startScaleFinal;
Log.d("garyhu","width == "+endRect.width());
Log.d("garyhu","height == "+endRect.height());
if ((float) endRect.width() / (float) endRect.height() > (float) startRect.width() / (float) startRect.height()) {
startScale = (float) startRect.height() / (float) endRect.height();
scaleSize = startScale * (float) endRect.width();
startScaleFinal = (scaleSize - (float) startRect.width()) / 2.0F;
startRect.left = (int) ((float) startRect.left - startScaleFinal);
startRect.right = (int) ((float) startRect.right + startScaleFinal);
} else {
startScale = (float) startRect.width() / (float) endRect.width();
scaleSize = startScale * (float) endRect.height();
startScaleFinal = (scaleSize - (float) startRect.height()) / 2.0F;
startRect.top = (int) ((float) startRect.top - startScaleFinal);
startRect.bottom = (int) ((float) startRect.bottom + startScaleFinal);
}
}
开发者ID:garyhu1,项目名称:collapselrecycler,代码行数:54,代码来源:BossZoomHelper.java
注:本文中的android.support.v7.widget.ContentFrameLayout类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论