当前位置: 首页>>代码示例>>Java>>正文


Java FrameLayout.setBackgroundColor方法代码示例

本文整理汇总了Java中android.widget.FrameLayout.setBackgroundColor方法的典型用法代码示例。如果您正苦于以下问题:Java FrameLayout.setBackgroundColor方法的具体用法?Java FrameLayout.setBackgroundColor怎么用?Java FrameLayout.setBackgroundColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.widget.FrameLayout的用法示例。


在下文中一共展示了FrameLayout.setBackgroundColor方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initializeWebappData

import android.widget.FrameLayout; //导入方法依赖的package包/类
private void initializeWebappData() {
    final int backgroundColor = ColorUtils.getOpaqueColor(mWebappInfo.backgroundColor(
            ApiCompatibilityUtils.getColor(getResources(), R.color.webapp_default_bg)));

    mSplashScreen = new FrameLayout(this);
    mSplashScreen.setBackgroundColor(backgroundColor);

    ViewGroup contentView = (ViewGroup) findViewById(android.R.id.content);
    contentView.addView(mSplashScreen);

    mWebappUma.splashscreenVisible();
    mWebappUma.recordSplashscreenBackgroundColor(mWebappInfo.hasValidBackgroundColor()
            ? WebappUma.SPLASHSCREEN_COLOR_STATUS_CUSTOM
            : WebappUma.SPLASHSCREEN_COLOR_STATUS_DEFAULT);
    mWebappUma.recordSplashscreenThemeColor(mWebappInfo.hasValidThemeColor()
            ? WebappUma.SPLASHSCREEN_COLOR_STATUS_CUSTOM
            : WebappUma.SPLASHSCREEN_COLOR_STATUS_DEFAULT);

    initializeSplashScreenWidgets(backgroundColor);
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:21,代码来源:WebappActivity.java

示例2: RPopupWindow

import android.widget.FrameLayout; //导入方法依赖的package包/类
public RPopupWindow(Context context) {
        super(context);
        mContext = context;

        setWidth(-2);
        setHeight(-2);

        mRootLayout = new FrameLayout(context);
        mViewHolder = new RBaseViewHolder(mRootLayout);

        mRootLayout.setBackgroundColor(Color.WHITE);
//        setBackgroundDrawable(new ColorDrawable(Color.WHITE));

        setTouchable(true);
        setOutsideTouchable(true);//点击窗口外, 消失

    }
 
开发者ID:angcyo,项目名称:RLibrary,代码行数:18,代码来源:RPopupWindow.java

示例3: doCreateDisplay

import android.widget.FrameLayout; //导入方法依赖的package包/类
private void doCreateDisplay(ViewGroup container) {
    log("doCreateDisplay");
    isolateDisplayBox();
    FrameLayout displayBox = new FrameLayout(container.getContext());
    displayBox.setId(R.id.player_display_box);
    displayBox.setBackgroundColor(videoInfo.getBgColor());
    FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(
            ViewGroup.LayoutParams.MATCH_PARENT,
            ViewGroup.LayoutParams.MATCH_PARENT,
            Gravity.CENTER
    );
    ScalableTextureView textureView = new ScalableTextureView(container.getContext());
    textureView.setAspectRatio(videoInfo.getAspectRatio());
    textureView.setId(R.id.player_display);
    displayBox.addView(textureView, new FrameLayout.LayoutParams(
            ViewGroup.LayoutParams.WRAP_CONTENT,
            ViewGroup.LayoutParams.WRAP_CONTENT,
            Gravity.CENTER
    ));
    container.addView(displayBox, 0, lp);
    bindDisplay(textureView);
    displayBoxRef = new WeakReference<>(displayBox);
}
 
开发者ID:tcking,项目名称:GiraffePlayer2,代码行数:24,代码来源:GiraffePlayer.java

示例4: initLevelContainers

import android.widget.FrameLayout; //导入方法依赖的package包/类
@Override
protected void initLevelContainers(Context context) {
    //add low cover container
    mLevelLowCoverContainer = new FrameLayout(context);
    mLevelLowCoverContainer.setBackgroundColor(Color.TRANSPARENT);
    addLevelContainerView(mLevelLowCoverContainer,null);

    //add medium cover container
    mLevelMediumCoverContainer = new FrameLayout(context);
    mLevelMediumCoverContainer.setBackgroundColor(Color.TRANSPARENT);
    addLevelContainerView(mLevelMediumCoverContainer,null);

    //add high cover container
    mLevelHighCoverContainer = new FrameLayout(context);
    mLevelHighCoverContainer.setBackgroundColor(Color.TRANSPARENT);
    addLevelContainerView(mLevelHighCoverContainer,null);
}
 
开发者ID:jiajunhui,项目名称:PlayerBase,代码行数:18,代码来源:DefaultLevelCoverContainer.java

示例5: initViews

import android.widget.FrameLayout; //导入方法依赖的package包/类
private void initViews() {
    flNavigationButtonsBar = (FrameLayout) findViewById(R.id.fl_navigation_buttons_bar);
    ivCancel = (ImageView) findViewById(R.id.iv_cancel);
    ivDone = (ImageView) findViewById(R.id.iv_done);
    calendarView = (CalendarView) findViewById(R.id.calendar_view);

    Drawable background = calendarView.getBackground();

    if (background instanceof ColorDrawable) {
        flNavigationButtonsBar.setBackgroundColor(((ColorDrawable) background).getColor());
    }

    ivCancel.setOnClickListener(this);
    ivDone.setOnClickListener(this);

}
 
开发者ID:ApplikeySolutions,项目名称:CosmoCalendar,代码行数:17,代码来源:CalendarDialog.java

示例6: createBodyOnDomThread

import android.widget.FrameLayout; //导入方法依赖的package包/类
WXComponent createBodyOnDomThread(WXDomObject dom) {
  if (mWXSDKInstance == null) {
    return null;
  }
  WXDomObject domObject = new WXDomObject();
  WXDomObject.prepareGod(domObject);
  mGodComponent = (WXVContainer) WXComponentFactory.newInstance(mWXSDKInstance, domObject, null);
  mGodComponent.createView(null, -1);
  if (mGodComponent == null) {
    if (WXEnvironment.isApkDebugable()) {
      WXLogUtils.e("rootView failed!");
    }
    //TODO error callback
    return null;
  }
  FrameLayout frameLayout = (FrameLayout) mGodComponent.getHostView();
  ViewGroup.LayoutParams layoutParams = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
  frameLayout.setLayoutParams(layoutParams);
  frameLayout.setBackgroundColor(Color.TRANSPARENT);

  WXComponent component = generateComponentTree(dom, mGodComponent);
  mGodComponent.addChild(component);
  mRegistry.put(component.getRef(), component);
  return component;
}
 
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:26,代码来源:WXRenderStatement.java

示例7: getView

import android.widget.FrameLayout; //导入方法依赖的package包/类
@Override
public View getView() {
    FrameLayout root = new FrameLayout(mContext);
    root.setBackgroundColor(Color.WHITE);

    mWebView = new WebView(mContext);//mContext.getApplicationContext();
    FrameLayout.LayoutParams wvLayoutParams =
            new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT,
                    FrameLayout.LayoutParams.MATCH_PARENT);
    wvLayoutParams.gravity = Gravity.CENTER;
    mWebView.setLayoutParams(wvLayoutParams);
    root.addView(mWebView);
    initWebView(mWebView);

    mProgressBar = new ProgressBar(mContext);
    showProgressBar(false);
    FrameLayout.LayoutParams pLayoutParams =
            new FrameLayout.LayoutParams(FrameLayout.LayoutParams.WRAP_CONTENT,
                    FrameLayout.LayoutParams.WRAP_CONTENT);
    mProgressBar.setLayoutParams(pLayoutParams);
    pLayoutParams.gravity = Gravity.CENTER;
    root.addView(mProgressBar);
    return root;
}
 
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:25,代码来源:WXWebView.java

示例8: onCreateView

import android.widget.FrameLayout; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
	View view = inflater.inflate(R.layout.fragment_loading, container, false);

	FrameLayout loadingContainer = (FrameLayout) view.findViewById(R.id.fragment_loading_container);
	loadingContainer.setBackgroundColor(backgroundColor);

	progressBar = new ProgressBar(container.getContext());
	if (container instanceof FrameLayout) {
		FrameLayout.LayoutParams layoutParams =
				new FrameLayout.LayoutParams(progressWidth, progressHeight, Gravity.CENTER);
		progressBar.setLayoutParams(layoutParams);
	}

	if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
		if (progressBar.getIndeterminateDrawable() != null) {
			progressBar.getIndeterminateDrawable().setColorFilter(getResources().getColor(progressColor),
					PorterDuff.Mode.SRC_IN);
		}
	} else {
		ColorStateList stateList = ColorStateList.valueOf(progressColor);
		progressBar.setIndeterminateTintMode(PorterDuff.Mode.SRC_IN);
		progressBar.setIndeterminateTintList(stateList);
		progressBar.setProgressBackgroundTintMode(PorterDuff.Mode.SRC_IN);
		progressBar.setProgressBackgroundTintList(stateList);
		progressBar.setIndeterminate(true);
	}

	loadingContainer.addView(progressBar);

	return view;
}
 
开发者ID:fasteque,项目名称:leanback-extensions,代码行数:34,代码来源:LoadingFragment.java

示例9: ViewHolder

import android.widget.FrameLayout; //导入方法依赖的package包/类
public ViewHolder(View itemView) {
    super(itemView);
    text = (TextView) itemView.findViewById(R.id.end_text);
    background = (FrameLayout) itemView.findViewById(R.id.end_layout);
    if (mFlag == FLAG_TEXT_COLOR_BLACK) {
        text.setTextColor(ContextCompat.getColor(text.getContext(), R.color.colorBlack));
        background.setBackgroundColor(ContextCompat.getColor(background.getContext(), R.color.colorWhite));
    }
}
 
开发者ID:KnowledgeBegger,项目名称:MyEyepetizer,代码行数:10,代码来源:EndAreaBinder.java

示例10: onCreateView

import android.widget.FrameLayout; //导入方法依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    FrameLayout frameLayout = new FrameLayout(getActivity());
    FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT);
    lp.gravity = Gravity.CENTER;
    frameLayout.setLayoutParams(lp);
    frameLayout.setBackgroundColor(0xff000000);
    initView(frameLayout);
    return frameLayout;
}
 
开发者ID:liying2008,项目名称:Simpler,代码行数:12,代码来源:PictureFragment.java

示例11: initView

import android.widget.FrameLayout; //导入方法依赖的package包/类
/**
 * 初始化播放器视图
 */
protected void initView() {
    Constants.SCREEN_HEIGHT = WindowUtil.getScreenHeight(getContext(), false);
    Constants.SCREEN_WIDTH = WindowUtil.getScreenWidth(getContext());
    playerContainer = new FrameLayout(getContext());
    playerContainer.setBackgroundColor(Color.BLACK);
    LayoutParams params = new LayoutParams(
            ViewGroup.LayoutParams.MATCH_PARENT,
            ViewGroup.LayoutParams.MATCH_PARENT);
    this.addView(playerContainer, params);
}
 
开发者ID:dueeeke,项目名称:dkplayer,代码行数:14,代码来源:IjkVideoView.java

示例12: createVHForRefreshComponent

import android.widget.FrameLayout; //导入方法依赖的package包/类
private ListBaseViewHolder createVHForRefreshComponent(int viewType) {
  FrameLayout view = new FrameLayout(getContext());
  view.setBackgroundColor(Color.WHITE);
  view.setLayoutParams(new FrameLayout.LayoutParams(1, 1));
  view.setVisibility(View.GONE);
  return new ListBaseViewHolder(view, viewType);
}
 
开发者ID:erguotou520,项目名称:weex-uikit,代码行数:8,代码来源:BasicListComponent.java

示例13: init

import android.widget.FrameLayout; //导入方法依赖的package包/类
private void init(Context context) {
    iMediaControl = ConfigManage.getInstance(getContext()).getIMediaControl(this);
    videoView = new FrameLayout(context);
    renderViewContainer = new FrameLayout(context);
    renderViewContainer.setBackgroundColor(Color.BLACK);
    videoView.addView(renderViewContainer, new LayoutParams(-1, -1));
    addView(videoView, new LayoutParams(-1, -1));
}
 
开发者ID:tohodog,项目名称:QSVideoPlayer,代码行数:9,代码来源:QSVideoView.java

示例14: createVHForFakeComponent

import android.widget.FrameLayout; //导入方法依赖的package包/类
@NonNull
private ListBaseViewHolder createVHForFakeComponent(int viewType) {
    FrameLayout view = new FrameLayout(getContext());
    view.setBackgroundColor(Color.WHITE);
    view.setLayoutParams(new FrameLayout.LayoutParams(0, 0));
    return new ListBaseViewHolder(view, viewType);
}
 
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:8,代码来源:WXListComponent.java

示例15: createVHForFakeComponent

import android.widget.FrameLayout; //导入方法依赖的package包/类
@NonNull
private ListBaseViewHolder createVHForFakeComponent(int viewType) {
  FrameLayout view = new FrameLayout(getContext());
  view.setBackgroundColor(Color.WHITE);
  view.setLayoutParams(new FrameLayout.LayoutParams(0, 0));
  return new ListBaseViewHolder(view, viewType);
}
 
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:8,代码来源:BasicListComponent.java


注:本文中的android.widget.FrameLayout.setBackgroundColor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。