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


Java CircledImageView.setOnClickListener方法代码示例

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


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

示例1: onCreateView

import android.support.wearable.view.CircledImageView; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    ViewGroup mRootView = (ViewGroup) inflater.inflate(R.layout.fragment_pocket, null);
    mRootView.setBackgroundResource(android.R.color.transparent);

    final CircledImageView imageView = (CircledImageView) mRootView.findViewById(R.id.imageView);
    imageView.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            listener.onSave(tweetId, urls, new Handler.Callback() {
                @Override
                public boolean handleMessage(Message message) {
                    imageView.setImageResource(R.drawable.confirmation);
                    return true;
                }
            });
        }
    });
    return mRootView;
}
 
开发者ID:glanceable,项目名称:GlanceTweet,代码行数:22,代码来源:PocketCardFragment.java

示例2: onLayoutInflated

import android.support.wearable.view.CircledImageView; //导入方法依赖的package包/类
@Override
public void onLayoutInflated(WatchViewStub watchViewStub) {
	mTextView = (TextView) watchViewStub.findViewById(R.id.text);

	CircledImageView mCircleBtn = (CircledImageView) watchViewStub.findViewById(R.id.btn_circle);
	mCircleBtn.setOnClickListener(new View.OnClickListener() {
		@Override
		public void onClick(View view) {
			if (!isStart) {
				startGame();
			} else {
				if (mGame != null) {
					endGame();
				}
			}
		}
	});
}
 
开发者ID:fython,项目名称:LuSpeed,代码行数:19,代码来源:MainFragment.java

示例3: adjustIconsPos

import android.support.wearable.view.CircledImageView; //导入方法依赖的package包/类
/**
 * This method calculates what icons do we have.
 *
 * @param homeIcon    the first icon
 * @param galleryIcon the second icon
 */
public void adjustIconsPos(CircledImageView homeIcon, CircledImageView galleryIcon) {
    int iconCount[] = {homeIconCheck, galleryIconCheck};
    ArrayList<CircledImageView> circledImageViews = new ArrayList<>();
    circledImageViews.add(homeIcon);
    circledImageViews.add(galleryIcon);

    for (int i = 0; i < iconCount.length; i++) {
        if (iconCount[i] == 1)
            circledImageViews.get(circledImageViews.size() - 1).setVisibility(View.INVISIBLE);
        else {
            CircledImageView temp = circledImageViews.get(0);
            switch (i) {
                case 0:
                    temp.setOnClickListener(onHomeIconClick);
                    temp.setImageDrawable(ContextCompat.getDrawable(activity, R.drawable.ic_home_white_24dp));
                    temp.setTag(homeIconUrl);
                    break;
                case 1:
                    temp.setOnClickListener(onGalleryIconClick);
                    temp.setImageDrawable(ContextCompat.getDrawable(activity, R.drawable.ic_photo_camera_white_24dp));
                    break;

            }
            circledImageViews.remove(0);
        }

    }

}
 
开发者ID:sourcestream,项目名称:moviedb-android,代码行数:36,代码来源:TVDetails.java

示例4: adjustIconsPos

import android.support.wearable.view.CircledImageView; //导入方法依赖的package包/类
/**
 * This method calculates what icons do we have.
 *
 * @param homeIcon    the first icon
 * @param trailerIcon the second icon
 * @param galleryIcon the third icon
 */
public void adjustIconsPos(CircledImageView homeIcon, CircledImageView trailerIcon, CircledImageView galleryIcon) {
    int iconCount[] = {homeIconCheck, trailerIconCheck, galleryIconCheck};
    ArrayList<CircledImageView> circledImageViews = new ArrayList<>();
    circledImageViews.add(homeIcon);
    circledImageViews.add(trailerIcon);
    circledImageViews.add(galleryIcon);

    for (int i = 0; i < iconCount.length; i++) {
        if (iconCount[i] == 1)
            circledImageViews.get(circledImageViews.size() - 1).setVisibility(View.INVISIBLE);
        else {
            CircledImageView temp = circledImageViews.get(0);
            switch (i) {
                case 0:
                    temp.setOnClickListener(onHomeIconClick);
                    temp.setImageDrawable(ContextCompat.getDrawable(activity, R.drawable.ic_home_white_24dp));
                    temp.setTag(homeIconUrl);
                    break;
                case 1:
                    temp.setOnClickListener(onTrailerIconClick);
                    temp.setImageDrawable(ContextCompat.getDrawable(activity, R.drawable.ic_videocam_white_24dp));
                    break;
                case 2:
                    temp.setOnClickListener(onGalleryIconClick);
                    temp.setImageDrawable(ContextCompat.getDrawable(activity, R.drawable.ic_photo_camera_white_24dp));
                    break;

            }
            circledImageViews.remove(0);
        }

    }

}
 
开发者ID:sourcestream,项目名称:moviedb-android,代码行数:42,代码来源:MovieDetails.java

示例5: onCreateView

import android.support.wearable.view.CircledImageView; //导入方法依赖的package包/类
/**
 * Called to have the fragment instantiate its user interface view.
 *
 * @param inflater           sets the layout for the current view.
 * @param container          the container which holds the current view.
 * @param savedInstanceState If non-null, this fragment is being re-constructed from a previous saved state as given here.
 *                           Return the View for the fragment's UI, or null.
 */
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    super.onCreateView(inflater, container, savedInstanceState);

    activity = ((MainActivity) getActivity());
    onGalleryIconClick = new onGalleryIconClick();
    onMoreIconClick = new onMoreIconClick();
    onHomeIconClick = new onHomeIconClick();
    onPageChangeSelected = new onPageChangeSelected();
    downAnimationListener = new DownAnimationListener();
    upAnimationListener = new UpAnimationListener();
    iconUpAnimationListener = new IconUpAnimationListener();
    iconDownAnimationListener = new IconDownAnimationListener();
    phone = getResources().getBoolean(R.bool.portrait_only);
    scale = getResources().getDisplayMetrics().density;
    if (phone) {
        hideThreshold = (int) (-105 * scale);
        minThreshold = (int) (-49 * scale);
    } else {
        hideThreshold = (int) (-100 * scale);
        minThreshold = (int) (-42 * scale);
    }

    if (currentId != this.getArguments().getInt("id") || this.timeOut == 1) {
        rootView = inflater.inflate(R.layout.tvdetails, container, false);
        spinner = (ProgressBar) rootView.findViewById(R.id.progressBar);

        homeIcon = (CircledImageView) rootView.findViewById(R.id.homeIcon);
        homeIcon.bringToFront();
        homeIcon.setVisibility(View.INVISIBLE);
        galleryIcon = (CircledImageView) rootView.findViewById(R.id.galleryIcon);
        galleryIcon.bringToFront();
        galleryIcon.setVisibility(View.INVISIBLE);

        // Highest Z-index has to be declared last
        moreIcon = (CircledImageView) rootView.findViewById(R.id.moreIcon);
        moreIcon.bringToFront();
    }
    moreIcon.setOnClickListener(onMoreIconClick);

    return rootView;
}
 
开发者ID:sourcestream,项目名称:moviedb-android,代码行数:52,代码来源:TVDetails.java

示例6: onCreateView

import android.support.wearable.view.CircledImageView; //导入方法依赖的package包/类
/**
 * Called to have the fragment instantiate its user interface view.
 *
 * @param inflater           sets the layout for the current view.
 * @param container          the container which holds the current view.
 * @param savedInstanceState If non-null, this fragment is being re-constructed from a previous saved state as given here.
 *                           Return the View for the fragment's UI, or null.
 */
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    super.onCreateView(inflater, container, savedInstanceState);

    activity = ((MainActivity) getActivity());
    movieModel = new MovieModel();
    onGalleryIconClick = new onGalleryIconClick();
    onMoreIconClick = new onMoreIconClick();
    onHomeIconClick = new onHomeIconClick();
    onPageChangeSelected = new onPageChangeSelected();
    downAnimationListener = new DownAnimationListener();
    upAnimationListener = new UpAnimationListener();
    iconUpAnimationListener = new IconUpAnimationListener();
    iconDownAnimationListener = new IconDownAnimationListener();
    phone = getResources().getBoolean(R.bool.portrait_only);
    scale = getResources().getDisplayMetrics().density;
    if (phone) {
        hideThreshold = (int) (-105 * scale);
        minThreshold = (int) (-49 * scale);
    } else {
        hideThreshold = (int) (-100 * scale);
        minThreshold = (int) (-42 * scale);
    }

    if (currentId != this.getArguments().getInt("id") || this.timeOut == 1) {
        rootView = inflater.inflate(R.layout.castdetails, container, false);
        spinner = (ProgressBar) rootView.findViewById(R.id.progressBar);

        homeIcon = (CircledImageView) rootView.findViewById(R.id.homeIcon);
        homeIcon.bringToFront();
        homeIcon.setVisibility(View.INVISIBLE);

        galleryIcon = (CircledImageView) rootView.findViewById(R.id.galleryIcon);
        galleryIcon.bringToFront();
        galleryIcon.setVisibility(View.INVISIBLE);

        moreIcon = (CircledImageView) rootView.findViewById(R.id.moreIcon);
        moreIcon.bringToFront();
    }
    moreIcon.setOnClickListener(onMoreIconClick);

    return rootView;
}
 
开发者ID:sourcestream,项目名称:moviedb-android,代码行数:53,代码来源:CastDetails.java

示例7: onCreateView

import android.support.wearable.view.CircledImageView; //导入方法依赖的package包/类
/**
 * Called to have the fragment instantiate its user interface view.
 *
 * @param inflater           sets the layout for the current view.
 * @param container          the container which holds the current view.
 * @param savedInstanceState If non-null, this fragment is being re-constructed from a previous saved state as given here.
 *                           Return the View for the fragment's UI, or null.
 */
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    super.onCreateView(inflater, container, savedInstanceState);

    activity = ((MainActivity) getActivity());
    onGalleryIconClick = new onGalleryIconClick();
    onTrailerIconClick = new onTrailerIconClick();
    onMoreIconClick = new onMoreIconClick();
    onHomeIconClick = new onHomeIconClick();
    onPageChangeSelected = new onPageChangeSelected();
    downAnimationListener = new DownAnimationListener();
    upAnimationListener = new UpAnimationListener();
    iconUpAnimationListener = new IconUpAnimationListener();
    iconDownAnimationListener = new IconDownAnimationListener();
    phone = getResources().getBoolean(R.bool.portrait_only);
    scale = getResources().getDisplayMetrics().density;
    if (phone) {
        hideThreshold = (int) (-105 * scale);
        minThreshold = (int) (-49 * scale);
    } else {
        hideThreshold = (int) (-100 * scale);
        minThreshold = (int) (-42 * scale);
    }

    if (currentId != this.getArguments().getInt("id") || this.timeOut == 1) {
        rootView = inflater.inflate(R.layout.moviedetails, container, false);
        spinner = (ProgressBar) rootView.findViewById(R.id.progressBar);

        homeIcon = (CircledImageView) rootView.findViewById(R.id.homeIcon);
        homeIcon.bringToFront();
        homeIcon.setVisibility(View.INVISIBLE);
        galleryIcon = (CircledImageView) rootView.findViewById(R.id.galleryIcon);
        galleryIcon.bringToFront();
        galleryIcon.setVisibility(View.INVISIBLE);
        trailerIcon = (CircledImageView) rootView.findViewById(R.id.trailerIcon);
        trailerIcon.bringToFront();
        trailerIcon.setVisibility(View.INVISIBLE);

        // Highest Z-index has to be declared last
        moreIcon = (CircledImageView) rootView.findViewById(R.id.moreIcon);
        moreIcon.bringToFront();
    }
    moreIcon.setOnClickListener(onMoreIconClick);

    return rootView;
}
 
开发者ID:sourcestream,项目名称:moviedb-android,代码行数:56,代码来源:MovieDetails.java


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