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


Java CircledImageView类代码示例

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


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

示例1: onFinishInflate

import android.support.wearable.view.CircledImageView; //导入依赖的package包/类
@Override
protected void onFinishInflate() {
	super.onFinishInflate();

	mName = (TextView) findViewById(R.id.name);
	mIcon = (CircledImageView) findViewById(R.id.icon);
	mExpandCircleRadius = mIcon.getCircleRadius();
	mShrinkCircleRadius = mExpandCircleRadius * SHRINK_CIRCLE_RATIO;

	mShrinkCircleAnimator = ObjectAnimator.ofFloat(mIcon, "circleRadius", mExpandCircleRadius, mShrinkCircleRadius);
	mFadeOutLabelAnimator = ObjectAnimator.ofFloat(mName, "alpha",	EXPAND_LABEL_ALPHA, SHRINK_LABEL_ALPHA);
	mShrinkAnimator = new AnimatorSet().setDuration(ANIMATION_DURATION_MS);
	mShrinkAnimator.playTogether(mShrinkCircleAnimator, mFadeOutLabelAnimator);

	mExpandCircleAnimator = ObjectAnimator.ofFloat(mIcon, "circleRadius", mShrinkCircleRadius, mExpandCircleRadius);
	mFadeInLabelAnimator = ObjectAnimator.ofFloat(mName, "alpha", SHRINK_LABEL_ALPHA, EXPAND_LABEL_ALPHA);
	mExpandAnimator = new AnimatorSet().setDuration(ANIMATION_DURATION_MS);
	mExpandAnimator.playTogether(mExpandCircleAnimator, mFadeInLabelAnimator);
}
 
开发者ID:runtimeco,项目名称:Android-DFU-App,代码行数:20,代码来源:DeviceItemLayout.java

示例2: onBindViewHolder

import android.support.wearable.view.CircledImageView; //导入依赖的package包/类
@Override
public void onBindViewHolder(WearableListView.ViewHolder viewHolder, int i)
{
    String currentValue = this.elements.get(i);
    ItemListView itemView = (ItemListView) viewHolder.itemView;

    TextView txtView = (TextView) itemView.findViewById(R.id.text);
    txtView.setText(this.elements.get(i));

    CircledImageView imgView = (CircledImageView) itemView.findViewById(R.id.image);

    if(this.selectedElements == null) {
        imgView.setImageResource(android.R.color.transparent);
        return;
    }

    for(String activ : selectedElements) {  // mark activity and subactivity if subactivity is activ
        if(activ.equals(currentValue) || activ.startsWith(currentValue + Settings.ACTIVITY_DELIMITER) || (this.parent != null && activ.equals(this.parent + Settings.ACTIVITY_DELIMITER + currentValue))) {
            imgView.setImageResource(R.drawable.yes);
            return;
        }
    }

    imgView.setImageResource(android.R.color.transparent);
}
 
开发者ID:sztyler,项目名称:sensordatacollector,代码行数:26,代码来源:ItemListViewAdapter.java

示例3: onFinishInflate

import android.support.wearable.view.CircledImageView; //导入依赖的package包/类
@Override
protected void onFinishInflate() {
    super.onFinishInflate();
    mCircle = (CircledImageView) findViewById(R.id.circle);
    mName = (TextView) findViewById(R.id.time_text);

    mScalingDown = ObjectAnimator.ofFloat(mCircle, "circleRadius", mSmallCircleRadius);
    mScalingDown.setDuration(150L);

    mIncreaseTextSize = ObjectAnimator.ofFloat(mName, "textSize", mSmallTextSize);
    mIncreaseTextSize.setDuration(150L);

    mReduceTextSize = ObjectAnimator.ofFloat(mName, "textSize", mBigTextSize);
    mReduceTextSize.setDuration(150L);

    mScalingUp = ObjectAnimator.ofFloat(mCircle, "circleRadius", mBigCircleRadius);
    mScalingUp.setDuration(150L);
}
 
开发者ID:khasang,项目名称:Poti,代码行数:19,代码来源:SetDurationWearableListItemLayout.java

示例4: 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

示例5: ColorItem

import android.support.wearable.view.CircledImageView; //导入依赖的package包/类
public ColorItem(Context context) {
    super(context);
    View.inflate(context, R.layout.color_picker_item, this);

    mLabel = (TextView) findViewById(R.id.label);
    mColor = (CircledImageView) findViewById(R.id.color);

    mExpandCircleRadius = mColor.getCircleRadius();
    mShrinkCircleRadius = mExpandCircleRadius * SHRINK_CIRCLE_RATIO;

    mShrinkCircleAnimator = ObjectAnimator.ofFloat(mColor, "circleRadius",
            mExpandCircleRadius, mShrinkCircleRadius);
    mShrinkLabelAnimator = ObjectAnimator.ofFloat(mLabel, "alpha",
            EXPAND_LABEL_ALPHA, SHRINK_LABEL_ALPHA);
    mShrinkAnimator = new AnimatorSet().setDuration(ANIMATION_DURATION_MS);
    mShrinkAnimator.playTogether(mShrinkCircleAnimator, mShrinkLabelAnimator);

    mExpandCircleAnimator = ObjectAnimator.ofFloat(mColor, "circleRadius",
            mShrinkCircleRadius, mExpandCircleRadius);
    mExpandLabelAnimator = ObjectAnimator.ofFloat(mLabel, "alpha",
            SHRINK_LABEL_ALPHA, EXPAND_LABEL_ALPHA);
    mExpandAnimator = new AnimatorSet().setDuration(ANIMATION_DURATION_MS);
    mExpandAnimator.playTogether(mExpandCircleAnimator, mExpandLabelAnimator);
}
 
开发者ID:AndroidAvanzato,项目名称:Capitolo6,代码行数:25,代码来源:DigitalWatchFaceWearableConfigActivity.java

示例6: 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

示例7: setUp

import android.support.wearable.view.CircledImageView; //导入依赖的package包/类
/**
 * Adds the fragment to a new blank activity, thereby fully
 * initializing its view.
 */
@Before
public void setUp() {
    castDetailsFragment = new CastDetails();
    activity = Robolectric.buildActivity(MainActivity.class).create().get();
    FragmentManager manager = activity.getFragmentManager();
    Bundle bundle = new Bundle();
    bundle.putInt("id", 1);
    castDetailsFragment.setArguments(bundle);
    manager.beginTransaction().add(castDetailsFragment, FRAGMENT_TAG).commit();

    castDetailsFragmentView = castDetailsFragment.getView();
    moreIcon = (CircledImageView) castDetailsFragmentView.findViewById(R.id.moreIcon);
    homeIcon = (CircledImageView) castDetailsFragmentView.findViewById(R.id.homeIcon);
    galleryIcon = (CircledImageView) castDetailsFragmentView.findViewById(R.id.galleryIcon);

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

示例8: setUp

import android.support.wearable.view.CircledImageView; //导入依赖的package包/类
/**
 * Adds the fragment to a new blank activity, thereby fully
 * initializing its view.
 */
@Before
public void setUp() {
    movieDetailsFragment = new MovieDetails();
    activity = Robolectric.buildActivity(MainActivity.class).create().get();
    FragmentManager manager = activity.getFragmentManager();
    Bundle bundle = new Bundle();
    bundle.putInt("id", 1);
    movieDetailsFragment.setArguments(bundle);
    manager.beginTransaction().add(movieDetailsFragment, FRAGMENT_TAG).commit();

    movieDetailsFragmentView = movieDetailsFragment.getView();
    moreIcon = (CircledImageView) movieDetailsFragmentView.findViewById(R.id.moreIcon);
    homeIcon = (CircledImageView) movieDetailsFragmentView.findViewById(R.id.homeIcon);
    galleryIcon = (CircledImageView) movieDetailsFragmentView.findViewById(R.id.galleryIcon);
    trailerIcon = (CircledImageView) movieDetailsFragmentView.findViewById(R.id.trailerIcon);
}
 
开发者ID:sourcestream,项目名称:moviedb-android,代码行数:21,代码来源:MovieDetailsTest.java

示例9: setUp

import android.support.wearable.view.CircledImageView; //导入依赖的package包/类
/**
 * Adds the fragment to a new blank activity, thereby fully
 * initializing its view.
 */
@Before
public void setUp() {
    tvDetailsFragment = new TVDetails();
    activity = Robolectric.buildActivity(MainActivity.class).create().get();
    FragmentManager manager = activity.getFragmentManager();
    Bundle bundle = new Bundle();
    bundle.putInt("id", 1);
    tvDetailsFragment.setArguments(bundle);
    manager.beginTransaction().add(tvDetailsFragment, FRAGMENT_TAG).commit();

    tvDetailsFragmentView = tvDetailsFragment.getView();
    moreIcon = (CircledImageView) tvDetailsFragmentView.findViewById(R.id.moreIcon);
    homeIcon = (CircledImageView) tvDetailsFragmentView.findViewById(R.id.homeIcon);
    galleryIcon = (CircledImageView) tvDetailsFragmentView.findViewById(R.id.galleryIcon);
}
 
开发者ID:sourcestream,项目名称:moviedb-android,代码行数:20,代码来源:TVDetailsTest.java

示例10: ColorItem

import android.support.wearable.view.CircledImageView; //导入依赖的package包/类
public ColorItem(Context context) {
    super(context);
    View.inflate(context, R.layout.digital_color_picker_item, this);

    mLabel = (TextView) findViewById(R.id.label);
    mColor = (CircledImageView) findViewById(R.id.color);

    mExpandCircleRadius = mColor.getCircleRadius();
    mShrinkCircleRadius = mExpandCircleRadius * SHRINK_CIRCLE_RATIO;

    mShrinkCircleAnimator = ObjectAnimator.ofFloat(mColor, "circleRadius",
            mExpandCircleRadius, mShrinkCircleRadius);
    mShrinkLabelAnimator = ObjectAnimator.ofFloat(mLabel, "alpha",
            EXPAND_LABEL_ALPHA, SHRINK_LABEL_ALPHA);
    mShrinkAnimator = new AnimatorSet().setDuration(ANIMATION_DURATION_MS);
    mShrinkAnimator.playTogether(mShrinkCircleAnimator, mShrinkLabelAnimator);

    mExpandCircleAnimator = ObjectAnimator.ofFloat(mColor, "circleRadius",
            mShrinkCircleRadius, mExpandCircleRadius);
    mExpandLabelAnimator = ObjectAnimator.ofFloat(mLabel, "alpha",
            SHRINK_LABEL_ALPHA, EXPAND_LABEL_ALPHA);
    mExpandAnimator = new AnimatorSet().setDuration(ANIMATION_DURATION_MS);
    mExpandAnimator.playTogether(mExpandCircleAnimator, mExpandLabelAnimator);
}
 
开发者ID:googlesamples,项目名称:android-WatchFace,代码行数:25,代码来源:DigitalWatchFaceWearableConfigActivity.java

示例11: ItemViewHolder

import android.support.wearable.view.CircledImageView; //导入依赖的package包/类
public ItemViewHolder(final View itemView) {
	super(itemView);

	mIcon = (CircledImageView) itemView.findViewById(R.id.icon);
	mName = (TextView) itemView.findViewById(R.id.name);
	mAddress = (TextView) itemView.findViewById(R.id.state);
}
 
开发者ID:runtimeco,项目名称:Android-DFU-App,代码行数:8,代码来源:DevicesAdapter.java

示例12: CircleSizeAnimation

import android.support.wearable.view.CircledImageView; //导入依赖的package包/类
public CircleSizeAnimation(@NonNull CircledImageView circledView,
                           float targetRadius) {

    this.circledView = circledView;
    this.targetRadius = targetRadius;
    startRadius = targetRadius;
}
 
开发者ID:LadyViktoria,项目名称:wearDrip,代码行数:8,代码来源:CircleSizeAnimation.java

示例13: onBindViewHolder

import android.support.wearable.view.CircledImageView; //导入依赖的package包/类
@Override
public void onBindViewHolder(WearableListView.ViewHolder viewHolder,
                             int position) {
    ItemViewHolder itemViewHolder = (ItemViewHolder) viewHolder;
    CircledImageView circledView = itemViewHolder.mCircledImageView;
    circledView.setImageResource(mItems.get(position));
    TextView textView = itemViewHolder.mItemTextView;
    switch (position) {
        case ITEM_LOCALIZATION:
            textView.setText(R.string.menu_start_localization);
            break;
        case PositionsHelper.ITEM_SCAN11:
        case PositionsHelper.ITEM_SCAN12:
        case PositionsHelper.ITEM_SCAN21:
        case PositionsHelper.ITEM_SCAN22:
        case PositionsHelper.ITEM_SCAN31:
        case PositionsHelper.ITEM_SCAN32:
        case PositionsHelper.ITEM_SCAN41:
        case PositionsHelper.ITEM_SCAN42:
            String menuText = String.format(Locale.getDefault(), mRes.getString(R.string.menu_measure_place), PositionsHelper.getMenuLabelForPosition(position));
            textView.setText(menuText);
            break;
        case ITEM_CALCULATE:
            textView.setText(R.string.menu_calculate_average);
            break;
        case ITEM_DELETE:
            textView.setText(R.string.menu_delete_all_measurements);
            break;
    }
}
 
开发者ID:chenkel,项目名称:Lokalisierung-mit-Wearables,代码行数:31,代码来源:WearableAdapter.java

示例14: ItemViewHolder

import android.support.wearable.view.CircledImageView; //导入依赖的package包/类
/**
 * Instantiates a new Item view holder.
 *
 * @param itemView the item view
 */
public ItemViewHolder(View itemView) {
    super(itemView);
    mCircledImageView = (CircledImageView)
            itemView.findViewById(R.id.circle);
    mItemTextView = (TextView) itemView.findViewById(R.id.name);
}
 
开发者ID:chenkel,项目名称:Lokalisierung-mit-Wearables,代码行数:12,代码来源:WearableAdapter.java

示例15: onFinishInflate

import android.support.wearable.view.CircledImageView; //导入依赖的package包/类
@Override
protected void onFinishInflate() {
    super.onFinishInflate();
    ivStart = (CircledImageView) findViewById(R.id.btn_timerslist_start);
    ivSetting = (CircledImageView) findViewById(R.id.btn_timerslist_setting);
    mName = (TextView) findViewById(R.id.timer_name);
    mScalingDownStart = ObjectAnimator.ofFloat(ivStart, "circleRadius", mSmallCircleRadius);
    mScalingDownSetting = ObjectAnimator.ofFloat(ivSetting, "circleRadius", mSmallCircleRadius);
    mScalingDownStart.setDuration(150L);
    mScalingDownSetting.setDuration(150L);
    mScalingUpStart = ObjectAnimator.ofFloat(ivStart, "circleRadius", mBigCircleRadius);
    mScalingUpSetting = ObjectAnimator.ofFloat(ivSetting, "circleRadius", mBigCircleRadius);
    mScalingUpStart.setDuration(150L);
    mScalingUpSetting.setDuration(150L);
}
 
开发者ID:khasang,项目名称:Poti,代码行数:16,代码来源:TimersWearableListItemLayout.java


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