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


Java FrameLayout.findViewById方法代码示例

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


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

示例1: onCreateView

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

    // Inflate the view
    mLayout = (FrameLayout) inflater.inflate(getLayoutId(), container, false);

    mLayout.findViewById(R.id.relative_layout_loader_container).bringToFront();

    // Find the TextureView
    mRenderSurface = (ISurface) mLayout.findViewById(R.id.rajwali_surface);

    // Create the loader
    mProgressBarLoader = (ProgressBar) mLayout.findViewById(R.id.progress_bar_loader);
    mProgressBarLoader.setVisibility(View.GONE);

    // Create the renderer
    mRenderer = createRenderer();
    onBeforeApplyRenderer();
    applyRenderer();
    return mLayout;
}
 
开发者ID:SimonCherryGZ,项目名称:face-landmark-android,代码行数:23,代码来源:AExampleFragment.java

示例2: instantiateItem

import android.widget.FrameLayout; //导入方法依赖的package包/类
@Override
public Object instantiateItem(ViewGroup container, int position) {
  FrameLayout page = (FrameLayout) container.getChildAt(position);
  if (page == null) {
    return null;
  }
  ZoomableDraweeView zoomableDraweeView =
          (ZoomableDraweeView) page.findViewById(R.id.zoomableView);
  zoomableDraweeView.setAllowTouchInterceptionWhileZoomed(mAllowSwipingWhileZoomed);
  // needed for double tap to zoom
  zoomableDraweeView.setIsLongpressEnabled(false);
  zoomableDraweeView.setTapListener(new DoubleTapGestureListener(zoomableDraweeView));
  DraweeController controller = Fresco.newDraweeControllerBuilder()
    .setUri(SAMPLE_URIS[position % SAMPLE_URIS.length])
    .setCallerContext("ZoomableApp-MyPagerAdapter")
    .build();
  zoomableDraweeView.setController(controller);
  page.requestLayout();
  return page;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:21,代码来源:MyPagerAdapter.java

示例3: initGuideViews

import android.widget.FrameLayout; //导入方法依赖的package包/类
private void initGuideViews() {
        LayoutInflater inflater = getLayoutInflater();
        FrameLayout guideOne = (FrameLayout) inflater.inflate(R.layout.guide_viewpage_one, null);
        FrameLayout guideTwo = (FrameLayout) inflater.inflate(R.layout.guide_viewpage_one, null);
        FrameLayout guideThree = (FrameLayout) inflater.inflate(R.layout.guide_viewpage_one, null);
        FrameLayout guideFour = (FrameLayout) inflater.inflate(R.layout.guide_viewpage_two, null);
        TextView skip = (TextView) guideFour.findViewById(R.id.guide_tv);
        skip.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(GuideActivity.this,MainActivity.class));
                finish();
            }
        });

        guideOne.setBackgroundResource(R.drawable.guide_1);
        guideTwo.setBackgroundResource(R.drawable.guide_2);
        guideThree.setBackgroundResource(R.drawable.guide_3);
        guideFour.setBackgroundResource(R.drawable.guide_4);
//            skip.setBackgroundResource(R.drawable.guide_ver3_zh_open);
        //其他语言图片待添加
        guideViews.add(guideOne);
        guideViews.add(guideTwo);
        guideViews.add(guideThree);
        guideViews.add(guideFour);
    }
 
开发者ID:supremezzz,项目名称:Supreme,代码行数:27,代码来源:GuideActivity.java

示例4: createScrollView

import android.widget.FrameLayout; //导入方法依赖的package包/类
private void createScrollView() {
	root = (FrameLayout) inflater.inflate(
			R.layout.qrh__scrollview_container, null);

	NotifyingScrollView scrollView = (NotifyingScrollView) root
			.findViewById(R.id.rqh__scroll_view);
	scrollView.setOnScrollChangedListener(mOnScrollChangedListener);

	root.addView(realHeader, realHeaderLayoutParams);

	mContentContainer = (ViewGroup) root.findViewById(R.id.rqh__container);
	mContentContainer.addView(content);

	dummyHeader = mContentContainer
			.findViewById(R.id.rqh__content_top_margin);
	LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
			LayoutParams.MATCH_PARENT, headerHeight);
	dummyHeader.setLayoutParams(params);
}
 
开发者ID:Dnet3,项目名称:CustomAndroidOneSheeld,代码行数:20,代码来源:QuickReturnHeaderHelper.java

示例5: initView

import android.widget.FrameLayout; //导入方法依赖的package包/类
private void initView() {
    mBaseItems = new ArrayList<>();
    mStaggeredGridLayoutManager = new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL);
    mMrvVideo.setLayoutManager(mStaggeredGridLayoutManager);
    mMrvVideo.setItemAnimator(new DefaultItemAnimator());
    mMrvVideo.getItemAnimator().setChangeDuration(0);
    SpaceDecoration itemDecoration = new SpaceDecoration(DensityUtil.dip2px(getContext(), 8));
    itemDecoration.setPaddingEdgeSide(true);
    itemDecoration.setPaddingStart(true);
    itemDecoration.setPaddingHeaderFooter(false);
    mMrvVideo.addItemDecoration(itemDecoration);
    FrameLayout headerView = (FrameLayout) mMrvVideo.getHeaderView();
    scrollViewPager = (AutoScrollViewPager) headerView.findViewById(R.id.scroll_pager);
    viewGroupIndicator = (ViewGroupIndicator) headerView.findViewById(R.id.scroll_pager_indicator);
    mSrlRefresh.setProgressBackgroundColorSchemeColor(getResources().getColor(R.color.white));
    mSrlRefresh.setOnRefreshListener(this);
    mSrlRefresh.setColorSchemeResources(android.R.color.holo_blue_bright,
            android.R.color.holo_green_light,
            android.R.color.holo_orange_light,
            android.R.color.holo_red_light);
    refreshData();
    mPresenter.loadCache();
    mMrvVideo.addOnItemClickListener(this);
}
 
开发者ID:haihaio,项目名称:AmenEye,代码行数:25,代码来源:VideoCircleFragment.java

示例6: initView

import android.widget.FrameLayout; //导入方法依赖的package包/类
private void initView(){
    FrameLayout layout = (FrameLayout) LayoutInflater.from(getContext()).inflate(R.layout.widget_banner_holder,null);
    mViewPager = (HolderViewPager) layout.findViewById(R.id.banner_holder_vp);
    initViewPagerScroll();
    radioGroup = (RadioGroup) layout.findViewById(R.id.banner_selects);
    addView(layout);
    initViewPager();
}
 
开发者ID:Militch,项目名称:banner-holder,代码行数:9,代码来源:BannerHolderView.java

示例7: onCreateView

import android.widget.FrameLayout; //导入方法依赖的package包/类
@Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        rootView = (FrameLayout) inflater.inflate(R.layout.fragment_tap_to_move_demo, container, false);
        mTouchView = rootView.findViewById(R.id.touch_view);
        animatedView = rootView.findViewById(R.id.animated_view);

        rootView.setOnTouchListener(new View.OnTouchListener() {
            @Override
            public boolean onTouch(View v, MotionEvent event) {
                if (event.getAction() == MotionEvent.ACTION_MOVE || event.getAction() == MotionEvent.ACTION_DOWN) {
                    AdditiveAnimator.cancelAnimations(mTouchView);
                    mTouchView.setAlpha(1);
                    mTouchView.setX(event.getX() - mTouchView.getWidth()/2);
                    mTouchView.setY(event.getY() - mTouchView.getHeight()/2);
                    if(AdditiveAnimationsShowcaseActivity.ADDITIVE_ANIMATIONS_ENABLED) {
                        AdditiveAnimator.animate(animatedView)
                                .centerX(event.getX())
                                // uncomment the next line to see how you can use a different interpolator for each property!
//                                .switchInterpolator(new BounceInterpolator())
                                .centerY(event.getY())
                                .start();

                    } else {
                        animatedView.animate().setInterpolator(EaseInOutPathInterpolator.create()).setDuration(1000)
                                .x(event.getX() - animatedView.getWidth() / 2)
                                .y(event.getY() - animatedView.getHeight() / 2)
                                .start();
                    }
                }
                if(event.getAction() == MotionEvent.ACTION_UP) {
                    AdditiveAnimator.animate(mTouchView, 100).alpha(0).start();
                }
                return true;
            }
        });
        return rootView;
    }
 
开发者ID:wirecube,项目名称:android_additive_animations,代码行数:39,代码来源:TapToMoveDemoFragment.java

示例8: init

import android.widget.FrameLayout; //导入方法依赖的package包/类
private void init(Context context) {
        setCacheColorHint(context.getResources().getColor(ResourceUtils.getIdByName(getContext(), "color",
                "sobot_transparent")));
        inflater = LayoutInflater.from(context);

        fl = (FrameLayout)inflater.inflate(ResourceUtils.getIdByName(getContext(), "layout",
                "sobot_dropdown_lv_head"), null);
        headView = (LinearLayout) fl.findViewById(ResourceUtils.getIdByName(getContext(), "id",
                "drop_down_head"));

        progressBar = (ProgressBar) fl.findViewById(ResourceUtils.getIdByName(getContext(), "id",
                "sobot_loading"));
        measureView(headView);


        headContentHeight = headView.getMeasuredHeight();
        headContentWidth = headView.getMeasuredWidth();

        headView.setPadding(0, -1 * headContentHeight, 0, 0);
        headView.invalidate();

        Log.v("size", "width:" + headContentWidth + " height:"
                + headContentHeight);

        addHeaderView(fl, null, false);
//		addHeaderView(headView, null, false);
        setOnScrollListener(this);


        state = DONE;
        isRefreshableHeader = false;
    }
 
开发者ID:fengdongfei,项目名称:CXJPadProject,代码行数:33,代码来源:DropdownListView.java

示例9: initComponents

import android.widget.FrameLayout; //导入方法依赖的package包/类
protected void initComponents() {
	mInnerLayout = (FrameLayout) findViewById(R.id.fl_inner);
	mHeaderText = (TextView) mInnerLayout.findViewById(R.id.pull_to_refresh_text);
	mHeaderProgress = (ProgressBar) mInnerLayout.findViewById(R.id.pull_to_refresh_progress);
	mSubHeaderText = (TextView) mInnerLayout.findViewById(R.id.pull_to_refresh_sub_text);
	mHeaderImage = (ImageView) mInnerLayout.findViewById(R.id.pull_to_refresh_image);
}
 
开发者ID:Dnet3,项目名称:CustomAndroidOneSheeld,代码行数:8,代码来源:LoadingLayout.java

示例10: initView

import android.widget.FrameLayout; //导入方法依赖的package包/类
private void initView(){
    mBaseItems = new ArrayList<>();
    mZhihudailyList.setItemAnimator(new DefaultItemAnimator());
    mZhihudailyList.getItemAnimator().setChangeDuration(0);
    mLinearLayoutManager= new LinearLayoutManager(this.getContext());
    mZhihudailyList.setLayoutManager(mLinearLayoutManager);
    mZhihudailyList.setOnScrollListener(new RecyclerView.OnScrollListener() {
        @Override
        public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
            super.onScrollStateChanged(recyclerView, newState);
            if (mZhihudailyList.refreshAble()){
                mRefresh.setEnabled(true);
            }
            if (mZhihudailyList.loadAble()){
                loadMoreData();
            }

            if (mZhihudailyList.tagGone() && mTvTag.getVisibility() == View.VISIBLE){
                hideTagAnim(mTvTag);
                mTvTag.setVisibility(View.GONE);
            }
        }
    });

    initToolBar();

    mRefresh.setProgressBackgroundColorSchemeColor(getResources().getColor(R.color.white));
    mRefresh.setOnRefreshListener(this);
    mRefresh.setColorSchemeResources(android.R.color.holo_blue_bright,android.R.color.holo_green_light,
            android.R.color.holo_orange_light,
            android.R.color.holo_red_light);
    FrameLayout headerView = (FrameLayout)mZhihudailyList.getHeaderView();
    mAutoScrollViewPager = (AutoScrollViewPager)headerView.findViewById(R.id.scroll_pager);
    mViewGroupIndicator = (ViewGroupIndicator)headerView.findViewById(R.id.scroll_pager_indicator);
    mZhiHuPresenter.loadCache();
    refreshData();
    mZhihudailyList.addOnTagChangeListener(this);

}
 
开发者ID:haihaio,项目名称:AmenEye,代码行数:40,代码来源:ZhihuDailyFragment.java

示例11: onCreate

import android.widget.FrameLayout; //导入方法依赖的package包/类
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.alert_dialog);

    mDialogView = getWindow().getDecorView().findViewById(android.R.id.content);
    mTitleTextView = (TextView)findViewById(R.id.title_text);
    mContentTextView = (TextView)findViewById(R.id.content_text);
    mErrorFrame = (FrameLayout)findViewById(R.id.error_frame);
    mErrorX = (ImageView)mErrorFrame.findViewById(R.id.error_x);
    mSuccessFrame = (FrameLayout)findViewById(R.id.success_frame);
    mProgressFrame = (FrameLayout)findViewById(R.id.progress_dialog);
    mSuccessTick = (SuccessTickView)mSuccessFrame.findViewById(R.id.success_tick);
    mSuccessLeftMask = mSuccessFrame.findViewById(R.id.mask_left);
    mSuccessRightMask = mSuccessFrame.findViewById(R.id.mask_right);
    mCustomImage = (ImageView)findViewById(R.id.custom_image);
    mWarningFrame = (FrameLayout)findViewById(R.id.warning_frame);
    mEditingFrame = (FrameLayout) findViewById(R.id.editing_frame);
    mSexFrame = (FrameLayout) findViewById(R.id.sex_frame);
    mPasswordLayout = (LinearLayout) findViewById(R.id.password_frame);
    mSignFrame = (FrameLayout) findViewById(R.id.sign_frame);
    mEditSign = (EditText) findViewById(R.id.etSign);
    mOldPassword = (EditText) findViewById(R.id.etOldPassword);
    mNewPassword = (EditText) findViewById(R.id.etNewPassword);
    mEditContent = (EditText) findViewById(R.id.etContent);
    mConfirmButton = (Button)findViewById(R.id.confirm_button);
    mCancelButton = (Button)findViewById(R.id.cancel_button);
    mSexGroup = (RadioGroup) findViewById(R.id.radio);
    mProgressHelper.setProgressWheel((ProgressWheel)findViewById(R.id.progressWheel));
    mConfirmButton.setOnClickListener(this);
    mCancelButton.setOnClickListener(this);

    setSex(currentChooseSex);
    setTitleText(mTitleText);
    setContentText(mContentText);
    setCancelText(mCancelText);
    setConfirmText(mConfirmText);
    changeAlertType(mAlertType, true);
    showCancelButton(mShowCancel);
    showConfirmButton(mShowCanfirm);
}
 
开发者ID:weimin96,项目名称:shareNote,代码行数:41,代码来源:SweetAlertDialog.java

示例12: initMainView

import android.widget.FrameLayout; //导入方法依赖的package包/类
private void initMainView(Context context) {
    mMainContainer = (FrameLayout) LayoutInflater.from(context).inflate(R.layout.recycler_layout, this, true);
    mLoadingContainer = (FrameLayout) mMainContainer.findViewById(R.id.practical_loading);
    mErrorContainer = (FrameLayout) mMainContainer.findViewById(R.id.practical_error);
    mEmptyContainer = (FrameLayout) mMainContainer.findViewById(R.id.practical_empty);
    mContentContainer = (LinearLayout) mMainContainer.findViewById(R.id.practical_content);

    mSwipeRefreshLayout = (SwipeRefreshLayout) mMainContainer.findViewById(R.id.practical_swipe_refresh);
    mRecyclerView = (RecyclerView) mMainContainer.findViewById(R.id.practical_recycler);
}
 
开发者ID:Tamicer,项目名称:FastDownloader,代码行数:11,代码来源:PracticalRecyclerView.java

示例13: initializeViews

import android.widget.FrameLayout; //导入方法依赖的package包/类
@Override
public void initializeViews() {

     FrameLayout frameLayout = findViewById(R.id.frame_info_container);

    tvTitle = findViewById(R.id.tv_title);
    tvBody = findViewById(R.id.tv_body);
    tvDate = findViewById(R.id.tv_date);
    tvLikes = findViewById(R.id.tv_up_votes);
    tvViews = findViewById(R.id.tv_views);
    tvEmpty = frameLayout.findViewById(R.id.tv_empty);
    tvCategory = findViewById(R.id.tv_category);

    recyclerView = frameLayout.findViewById(R.id.recycler_comments);
    recyclerView.setLayoutManager(new LinearLayoutManager(this));
    recyclerView.setHasFixedSize(true);

    edtText = findViewById(R.id.edt_comment);
    edtText.setOnEditorActionListener(new TextView.OnEditorActionListener() {
        @Override
        public boolean onEditorAction(TextView textView, int actionId, KeyEvent keyEvent) {

            if (actionId == EditorInfo.IME_ACTION_SEND) {

                presenter.onSendCommentClicked();
                return true;
            }
            return false;
        }
    });
}
 
开发者ID:pedromassango,项目名称:Programmers,代码行数:32,代码来源:CommentsActivity.java

示例14: init

import android.widget.FrameLayout; //导入方法依赖的package包/类
private void init(Context context) {
	mContext = context;
	mLayout = new FrameLayout(context);
	mBrowserFrameLayout = (FrameLayout) LayoutInflater.from(context)
			.inflate(R.layout.common_custom_screen, null);
	wv_imgbtn_back = (LinearLayout) mBrowserFrameLayout.findViewById(R.id.top_bar_linear_back);
	wv_tv_title = (TextView) mBrowserFrameLayout.findViewById(R.id.top_bar_title);
	mContentView = (FrameLayout) mBrowserFrameLayout
			.findViewById(R.id.main_content);
	mCustomViewContainer = (FrameLayout) mBrowserFrameLayout
			.findViewById(R.id.fullscreen_custom_content);
	frame_progress = (FrameLayout) mBrowserFrameLayout
			.findViewById(R.id.frame_progress);
	webview_tv_progress = (TextView) frame_progress
			.findViewById(R.id.webview_tv_progress);
	final FrameLayout.LayoutParams COVER_SCREEN_PARAMS = new FrameLayout.LayoutParams(
			ViewGroup.LayoutParams.MATCH_PARENT,
			ViewGroup.LayoutParams.MATCH_PARENT, Gravity.CENTER);
	mLayout.addView(mBrowserFrameLayout, COVER_SCREEN_PARAMS);
	mWebChromeClient = new MyWebChromeClient();
	setWebChromeClient(mWebChromeClient);
	setWebViewClient(new MyWebViewClient());
	WebSettings webSettings = this.getSettings();
	webSettings.setJavaScriptEnabled(true);  //开启javascript
	webSettings.setDomStorageEnabled(true);  //开启DOM
	webSettings.setDefaultTextEncodingName("utf-8"); //设置编码
	// // web页面处理
	webSettings.setAllowFileAccess(true);// 支持文件流
	// webSettings.setSupportZoom(true);// 支持缩放
	// webSettings.setBuiltInZoomControls(true);// 支持缩放
	webSettings.setUseWideViewPort(true);// 调整到适合webview大小
	webSettings.setLoadWithOverviewMode(true);// 调整到适合webview大小
	webSettings.setDefaultZoom(ZoomDensity.FAR);// 屏幕自适应网页,如果没有这个,在低分辨率的手机上显示可能会异常
	webSettings.setRenderPriority(RenderPriority.HIGH);
	//提高网页加载速度,暂时阻塞图片加载,然后网页加载好了,在进行加载图片
	webSettings.setBlockNetworkImage(true);
	//开启缓存机制
	webSettings.setAppCacheEnabled(true);
	//根据当前网页连接状态
	 if(StrUtils.getAPNType(context)== StrUtils.WIFI){
	 //设置无缓存
	 webSettings.setCacheMode(WebSettings.LOAD_DEFAULT);
	 }else{
	 //设置缓存
	 webSettings.setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
	 }
	mContentView.addView(this);
	// 返回
	wv_imgbtn_back.setOnClickListener(new OnClickListener() {
		@Override
		public void onClick(View v) {
			closeAdWebPage();
		}
	});
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:56,代码来源:HTML5CustomWebView.java

示例15: ActivityChooserView

import android.widget.FrameLayout; //导入方法依赖的package包/类
/**
 * Create a new instance.
 *
 * @param context The application environment.
 * @param attrs A collection of attributes.
 * @param defStyle The default style to apply to this view.
 */
public ActivityChooserView(Context context, AttributeSet attrs, int defStyle) {
    super(context, attrs, defStyle);
    mContext = context;

    TypedArray attributesArray = context.obtainStyledAttributes(attrs,
            R.styleable.SherlockActivityChooserView, defStyle, 0);

    mInitialActivityCount = attributesArray.getInt(
            R.styleable.SherlockActivityChooserView_initialActivityCount,
            ActivityChooserViewAdapter.MAX_ACTIVITY_COUNT_DEFAULT);

    Drawable expandActivityOverflowButtonDrawable = attributesArray.getDrawable(
            R.styleable.SherlockActivityChooserView_expandActivityOverflowButtonDrawable);

    attributesArray.recycle();

    LayoutInflater inflater = LayoutInflater.from(mContext);
    inflater.inflate(R.layout.abs__activity_chooser_view, this, true);

    mCallbacks = new Callbacks();

    mActivityChooserContent = (IcsLinearLayout) findViewById(R.id.abs__activity_chooser_view_content);
    mActivityChooserContentBackground = mActivityChooserContent.getBackground();

    mDefaultActivityButton = (FrameLayout) findViewById(R.id.abs__default_activity_button);
    mDefaultActivityButton.setOnClickListener(mCallbacks);
    mDefaultActivityButton.setOnLongClickListener(mCallbacks);
    mDefaultActivityButtonImage = (ImageView) mDefaultActivityButton.findViewById(R.id.abs__image);

    mExpandActivityOverflowButton = (FrameLayout) findViewById(R.id.abs__expand_activities_button);
    mExpandActivityOverflowButton.setOnClickListener(mCallbacks);
    mExpandActivityOverflowButtonImage =
        (ImageView) mExpandActivityOverflowButton.findViewById(R.id.abs__image);
    mExpandActivityOverflowButtonImage.setImageDrawable(expandActivityOverflowButtonDrawable);

    mAdapter = new ActivityChooserViewAdapter();
    mAdapter.registerDataSetObserver(new DataSetObserver() {
        @Override
        public void onChanged() {
            super.onChanged();
            updateAppearance();
        }
    });

    Resources resources = context.getResources();
    mListPopupMaxWidth = Math.max(resources.getDisplayMetrics().widthPixels / 2,
          resources.getDimensionPixelSize(R.dimen.abs__config_prefDialogWidth));
}
 
开发者ID:treasure-lau,项目名称:CSipSimple,代码行数:56,代码来源:ActivityChooserView.java


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