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


Java AppCompatCheckBox.setOnClickListener方法代码示例

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


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

示例1: onViewCreatedOk

import android.support.v7.widget.AppCompatCheckBox; //导入方法依赖的package包/类
@Override
public void onViewCreatedOk(View view, @Nullable Bundle savedInstanceState) {
    mCbCheck = (AppCompatCheckBox) view.findViewById(R.id.cb_page_check);
    mViewPager = (ViewPager) view.findViewById(R.id.view_pager_page);
    mRlRootView = (RelativeLayout) view.findViewById(R.id.rl_page_root_view);
    mScreenSize = DeviceUtils.getScreenSize(getContext());

    mMediaBeanList = new ArrayList<>();
    if (savedInstanceState != null) {
        List<MediaBean> mediaList = savedInstanceState.getParcelableArrayList(EXTRA_MEDIA_LIST);
        mItemClickPosition = savedInstanceState.getInt(EXTRA_ITEM_CLICK_POSITION);

        if (mediaList != null) {
            mMediaBeanList.addAll(mediaList);
        }
    }
    mMediaPreviewAdapter = new MediaPreviewAdapter(mMediaBeanList,
            mScreenSize.widthPixels, mScreenSize.heightPixels, mConfiguration
            , ThemeUtils.resolveColor(getActivity(), R.attr.gallery_page_bg, R.color.gallery_default_page_bg),
            ContextCompat.getDrawable(getActivity(), ThemeUtils.resolveDrawableRes(getActivity(), R.attr.gallery_default_image, R.drawable.gallery_default_image)));
    mViewPager.setAdapter(mMediaPreviewAdapter);
    mCbCheck.setOnClickListener(this);
    mViewPager.setCurrentItem(mItemClickPosition);
    mViewPager.addOnPageChangeListener(this);
}
 
开发者ID:Loofer,项目名称:Watermark,代码行数:26,代码来源:MediaPageFragment.java

示例2: onViewCreatedOk

import android.support.v7.widget.AppCompatCheckBox; //导入方法依赖的package包/类
@Override
public void onViewCreatedOk(View view, @Nullable Bundle savedInstanceState) {
    mCbCheck = (AppCompatCheckBox) view.findViewById(R.id.cb_check);
    mViewPager = (ViewPager) view.findViewById(R.id.view_pager);
    mRlRootView = (RelativeLayout) view.findViewById(R.id.rl_root_view);
    mScreenSize = DeviceUtils.getScreenSize(getContext());
    mMediaBeanList = new ArrayList<>();
    if (mMediaActivity.getCheckedList() != null) {
        mMediaBeanList.addAll(mMediaActivity.getCheckedList());
    }
    MediaPreviewAdapter mMediaPreviewAdapter = new MediaPreviewAdapter(mMediaBeanList,
            mScreenSize.widthPixels, mScreenSize.heightPixels, mConfiguration,
            ThemeUtils.resolveColor(getActivity(), R.attr.gallery_page_bg, R.color.gallery_default_page_bg),
            ContextCompat.getDrawable(getActivity(), ThemeUtils.resolveDrawableRes(getActivity(), R.attr.gallery_default_image, R.drawable.gallery_default_image)));
    mViewPager.setAdapter(mMediaPreviewAdapter);
    mCbCheck.setOnClickListener(this);

    if (savedInstanceState != null) {
        mPagerPosition = savedInstanceState.getInt(EXTRA_PAGE_INDEX);
    }
}
 
开发者ID:Loofer,项目名称:Watermark,代码行数:22,代码来源:MediaPreviewFragment.java

示例3: ImageHolder

import android.support.v7.widget.AppCompatCheckBox; //导入方法依赖的package包/类
ImageHolder(View itemView, int itemSize, boolean hasCamera, @Album.ChoiceMode int choiceMode, ColorStateList selector,
            OnItemClickListener itemClickListener, OnItemCheckedListener itemCheckedListener) {
    super(itemView);
    itemView.getLayoutParams().height = itemSize;

    this.itemSize = itemSize;
    this.hasCamera = hasCamera;
    this.mChoiceMode = choiceMode;
    this.mItemClickListener = itemClickListener;
    this.mItemCheckedListener = itemCheckedListener;

    mIvImage = (ImageView) itemView.findViewById(R.id.iv_album_content_image);
    mCheckBox = (AppCompatCheckBox) itemView.findViewById(R.id.cb_album_check);
    mLayoutLayer = (FrameLayout) itemView.findViewById(R.id.layout_layer);

    itemView.setOnClickListener(this);
    mCheckBox.setOnClickListener(this);
    mLayoutLayer.setOnClickListener(this);
    if (mChoiceMode == Album.MODE_MULTIPLE) {
        mCheckBox.setVisibility(View.VISIBLE);
        mCheckBox.setSupportButtonTintList(selector);
    } else {
        mCheckBox.setVisibility(View.GONE);
    }
}
 
开发者ID:WeiXinqiao,项目名称:Recognize-it,代码行数:26,代码来源:AlbumFileAdapter.java

示例4: VideoHolder

import android.support.v7.widget.AppCompatCheckBox; //导入方法依赖的package包/类
VideoHolder(View itemView, int itemSize, boolean hasCamera, @Album.ChoiceMode int choiceMode, ColorStateList selector,
            OnItemClickListener itemClickListener, OnItemCheckedListener itemCheckedListener) {
    super(itemView);
    itemView.getLayoutParams().height = itemSize;

    this.itemSize = itemSize;
    this.hasCamera = hasCamera;
    this.mChoiceMode = choiceMode;
    this.mItemClickListener = itemClickListener;
    this.mItemCheckedListener = itemCheckedListener;

    mIvImage = (ImageView) itemView.findViewById(R.id.iv_album_content_image);
    mCheckBox = (AppCompatCheckBox) itemView.findViewById(R.id.cb_album_check);
    mTvDuration = (TextView) itemView.findViewById(R.id.tv_duration);
    mLayoutLayer = (FrameLayout) itemView.findViewById(R.id.layout_layer);

    itemView.setOnClickListener(this);
    mCheckBox.setOnClickListener(this);
    mLayoutLayer.setOnClickListener(this);
    if (mChoiceMode == Album.MODE_MULTIPLE) {
        mCheckBox.setVisibility(View.VISIBLE);
        mCheckBox.setSupportButtonTintList(selector);
    } else {
        mCheckBox.setVisibility(View.GONE);
    }
}
 
开发者ID:WeiXinqiao,项目名称:Recognize-it,代码行数:27,代码来源:AlbumFileAdapter.java

示例5: showFullscreenTempView

import android.support.v7.widget.AppCompatCheckBox; //导入方法依赖的package包/类
/***
 * 显示隐藏全屏按钮
 *
 * @param visibility 状态
 */
public void showFullscreenTempView(int visibility) {
    AppCompatCheckBox compatCheckBox = (AppCompatCheckBox) playerView.findViewById(R.id.sexo_video_fullscreen);
    compatCheckBox.setVisibility(visibility);
    compatCheckBox.setButtonDrawable(playerView.getControllerView().getIcFullscreenSelector());
    compatCheckBox.setOnClickListener(onClickListener);
}
 
开发者ID:yangchaojiang,项目名称:yjPlay,代码行数:12,代码来源:VideoPlayerView.java


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