當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。