private static ImageView getAccessoryView(ATableViewCell cell, ATableViewCellAccessoryType accessoryType) {
LinearLayout containerView = (LinearLayout) cell.findViewById(R.id.containerView);
// check if accessoryView already exists for current cell before creating a new instance.
ImageView accessoryView = (ImageView) containerView.findViewById(R.id.accessoryView);
if (accessoryView == null) {
Resources res = cell.getResources();
// get marginRight for accessoryView, DisclosureButton has a different one.
LayoutParams params = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT);
int marginRight = (int) res.getDimension(R.dimen.atv_cell_content_margin);
if (accessoryType == ATableViewCellAccessoryType.DisclosureButton) {
marginRight = (int) res.getDimension(R.dimen.atv_cell_disclosure_button_margin_right);
}
params.setMargins(0, 0, marginRight, 0);
// setup.
accessoryView = new ATableViewCellAccessoryView(cell.getContext());
accessoryView.setId(R.id.accessoryView);
accessoryView.setLayoutParams(params);
containerView.addView(accessoryView);
}
return accessoryView;
}
java类android.widget.ImageView的实例源码
ATableViewCellAccessoryView.java 文件源码
项目:ShangHanLun
阅读 28
收藏 0
点赞 0
评论 0
ItemBuilder.java 文件源码
项目:justintrain-client-android
阅读 21
收藏 0
点赞 0
评论 0
public ItemBuilder addItemWithIconTitleSubtitle(int icon, String title, String subtitle) {
view = inflater.inflate(R.layout.item_element_icon_title_subtitle, parent, false);
ImageView iv = (ImageView) view.findViewById(R.id.iv_icon);
iv.setImageResource(icon);
TextView tv = (TextView) view.findViewById(R.id.tv_title);
tv.setText(title);
TextView tv2 = (TextView) view.findViewById(R.id.tv_subtitle);
tv2.setText(subtitle);
return this;
}
ChatActivity.java 文件源码
项目:SWDemo
阅读 19
收藏 0
点赞 0
评论 0
public void onBtnNClicked(View view) {
if (mVideoPreProcessing == null) {
mVideoPreProcessing = new VideoPreProcessing();
}
ImageView iv = (ImageView) view;
Object showing = view.getTag();
if (showing != null && (Boolean) showing) {
mVideoPreProcessing.enablePreProcessing(false);
iv.setTag(null);
iv.clearColorFilter();
} else {
mVideoPreProcessing.enablePreProcessing(true);
iv.setTag(true);
iv.setColorFilter(getResources().getColor(R.color.agora_blue), PorterDuff.Mode.MULTIPLY);
}
}
ChatActivity.java 文件源码
项目:OpenVideoCall-Android
阅读 25
收藏 0
点赞 0
评论 0
public void onVoiceMuteClicked(View view) {
log.info("onVoiceMuteClicked " + view + " " + mUidsList.size() + " video_status: " + mVideoMuted + " audio_status: " + mAudioMuted);
if (mUidsList.size() == 0) {
return;
}
RtcEngine rtcEngine = rtcEngine();
rtcEngine.muteLocalAudioStream(mAudioMuted = !mAudioMuted);
ImageView iv = (ImageView) view;
if (mAudioMuted) {
iv.setColorFilter(getResources().getColor(R.color.agora_blue), PorterDuff.Mode.MULTIPLY);
} else {
iv.clearColorFilter();
}
}
DetailActivity.java 文件源码
项目:WithYou
阅读 26
收藏 0
点赞 0
评论 0
@Override
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.detail_layout);
imageDetail = (ImageView)findViewById(R.id.image_detail);
spot = (TextView)findViewById(R.id.spot_detail);
time = (TextView)findViewById(R.id.time_detail);
reward = (TextView)findViewById(R.id.reward_detail);
username = (TextView)findViewById(R.id.username_detail);
ps = (TextView)findViewById(R.id.ps_detail);
imageDetail.setBackgroundResource(getIntent().getIntExtra("headId", 0));
spot.setText(getIntent().getStringExtra("spot"));
time.setText(getIntent().getStringExtra("time"));
reward.setText(getIntent().getStringExtra("reward"));
username.setText(getIntent().getStringExtra("username"));
ps.setText(getIntent().getStringExtra("ps"));
}
StartMeasurementFragment.java 文件源码
项目:RoadLab-Pro
阅读 28
收藏 0
点赞 0
评论 0
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
xyPlot = (XYPlot) view.findViewById(R.id.accelerationGraph);
badText = (TextView) view.findViewById(R.id.badText);
normalText = (TextView) view.findViewById(R.id.normalText);
goodText = (TextView) view.findViewById(R.id.goodText);
perfectText = (TextView) view.findViewById(R.id.perfectText);
distanceValueText = (TextView) view.findViewById(R.id.distanceValueText);
speedText = (TextView) view.findViewById(R.id.speedText);
speedValueText = (TextView) view.findViewById(R.id.speedValueText);
bumpValueText = (TextView) view.findViewById(R.id.bumpValueText);
badQualityText = (TextView) view.findViewById(R.id.badQualityText);
normalQualityText = (TextView) view.findViewById(R.id.normalQualityText);
goodQualityText = (TextView) view.findViewById(R.id.goodQualityText);
perfectQualityText = (TextView) view.findViewById(R.id.perfectQualityText);
deviceIndicatorAngleBtn = (ImageView) view.findViewById(R.id.wrong_angle_icon);
gpsIndicatorBtn = (ImageView) view.findViewById(R.id.wrong_gps_icon);
startMeasurementsBtn = (Button) view.findViewById(R.id.startMeasurementsBtn);
roadIntervalValue = (TextView) view.findViewById(R.id.roadIntervalValue);
roadIntervalText = (TextView) view.findViewById(R.id.roadIntervalText);
recordStatusValue = (TextView) view.findViewById(R.id.recordStatusValue);
itemsCntValueText = (TextView) view.findViewById(R.id.itemsCntValueText);
intervalsCntValueText = (TextView) view.findViewById(R.id.intervalsCntValueText);
initUI();
}
MaterialCalendarView.java 文件源码
项目:GitHub
阅读 23
收藏 0
点赞 0
评论 0
private void setupChildren() {
topbar = new LinearLayout(getContext());
topbar.setOrientation(LinearLayout.HORIZONTAL);
topbar.setClipChildren(false);
topbar.setClipToPadding(false);
addView(topbar, new LayoutParams(1));
buttonPast.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
topbar.addView(buttonPast, new LinearLayout.LayoutParams(0, LayoutParams.MATCH_PARENT, 1));
title.setGravity(Gravity.CENTER);
topbar.addView(title, new LinearLayout.LayoutParams(
0, LayoutParams.MATCH_PARENT, DEFAULT_DAYS_IN_WEEK - 2
));
buttonFuture.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
topbar.addView(buttonFuture, new LinearLayout.LayoutParams(0, LayoutParams.MATCH_PARENT, 1));
pager.setId(R.id.mcv_pager);
pager.setOffscreenPageLimit(1);
addView(pager, new LayoutParams(calendarMode.visibleWeeksCount + DAY_NAMES_ROW));
}
ActivityHome.java 文件源码
项目:AcopioMX
阅读 28
收藏 0
点赞 0
评论 0
private void showSupportersDialog() {
final Dialog fullscreenDialog = new Dialog(this, R.style.DialogFullscreen);
fullscreenDialog.setContentView(R.layout.dialog_supporters);
Button logoutB = fullscreenDialog.findViewById(R.id.logout_b);
ImageView img_dialog_fullscreen_close = fullscreenDialog.findViewById(R.id.close_iv);
TextView collaborationTV = fullscreenDialog.findViewById(R.id.info_collaboration_tv);
collaborationTV.setText(Html.fromHtml(getString(R.string.collaboration)));
img_dialog_fullscreen_close.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
fullscreenDialog.dismiss();
}
});
logoutB.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
saveToken(context, "HOME", null);
Intent intent = new Intent(context, ActivitySplash.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_CLEAR_TASK |
Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
finish();
}
});
fullscreenDialog.show();
}
FollowingHabitsListAdapter.java 文件源码
项目:cat-is-a-dog
阅读 24
收藏 0
点赞 0
评论 0
/**
* Instantiate a child view containing the user you following's habit and their individual completion status
* @param groupPosition
* @param childPosition
* @param isExpanded
* @param convertView
* @param parent
* @return
*/
@Override
public View getChildView(int groupPosition, int childPosition, boolean isExpanded, View convertView, ViewGroup parent) {
Habit habit = (Habit) getChild(groupPosition, childPosition);
if(convertView == null) {
convertView = mInflater.inflate(R.layout.item_following_habit, parent, false);
}
TextView titleView = (TextView) convertView.findViewById(R.id.following_habit_title);
titleView.setText(habit.getTitle());
ImageView indicatorView = (ImageView) convertView.findViewById(R.id.following_habit_indicator);
if (habit.getStatus() != null) {
indicatorView.setColorFilter(habit.getStatus().getColor());
}
return convertView;
}
UserSelectFriendsActivity.java 文件源码
项目:OSchina_resources_android
阅读 23
收藏 0
点赞 0
评论 0
/**
* 刷新选中的布局
*/
private void updateSelectView() {
mSelectContainer.removeAllViews();
if (mSelectedFriends.size() == 0)
mHorizontalScrollView.setVisibility(View.GONE);
else {
mHorizontalScrollView.setVisibility(View.VISIBLE);
for (final Author author : mSelectedFriends) {
ImageView ivIcon = (ImageView) LayoutInflater.from(this)
.inflate(R.layout.activity_main_select_friend_label_container_item, mSelectContainer, false);
ivIcon.setTag(R.id.iv_show_icon, author);
ivIcon.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Author tag = (Author) v.getTag(R.id.iv_show_icon);
onSelectIconClick(tag);
mSelectContainer.removeView(v);
}
});
mSelectContainer.addView(ivIcon);
Glide.with(this).load(author.getPortrait()).error(R.mipmap.widget_default_face).into(ivIcon);
}
}
}
SongListAdapter.java 文件源码
项目:pracler
阅读 27
收藏 0
点赞 0
评论 0
@Override
public View getView(final int position, View convertView, ViewGroup parent)
{
if (convertView == null)
{
convertView = inflater.inflate(R.layout.view_list_musicrows, parent, false);
ListView.LayoutParams layoutParams = new ListView.LayoutParams(ListView.LayoutParams.MATCH_PARENT, ListView.LayoutParams.MATCH_PARENT);
convertView.setLayoutParams(layoutParams);
};
ImageView album = (ImageView) convertView.findViewById(R.id.view_album);
album.setImageDrawable(context.getResources().getDrawable(android.R.drawable.ic_menu_report_image));
TextView title = (TextView) convertView.findViewById(R.id.view_title);
TextView artist = (TextView) convertView.findViewById(R.id.view_artist);
title.setText(list.get(position).title);
artist.setText(list.get(position).artist + " - " + list.get(position).album + " - " + global.mMusicManager.convertToTime(list.get(position).length));
convertView.setTag(list.get(position).uid);
MyAsyncTask myAsyncTask = new MyAsyncTask();
myAsyncTask.setImgView(album);
myAsyncTask.execute(position + "");
return convertView;
}
PhotoViewAttacher.java 文件源码
项目:Watermark
阅读 35
收藏 0
点赞 0
评论 0
@Override
public void setScale(float scale, float focalX, float focalY,
boolean animate) {
ImageView imageView = getImageView();
if (null != imageView) {
// Check to see if the scale is within bounds
if (scale < mMinScale || scale > mMaxScale) {
Logger.i("Scale must be within the range of minScale and maxScale");
return;
}
if (animate) {
imageView.post(new AnimatedZoomRunnable(getScale(), scale,
focalX, focalY));
} else {
mSuppMatrix.setScale(scale, scale, focalX, focalY);
checkAndDisplayMatrix();
}
}
}
CountryListAdapter.java 文件源码
项目:chat-sdk-android-push-firebase
阅读 21
收藏 0
点赞 0
评论 0
/**
* Return row for each country
*/
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View cellView = convertView;
Cell cell;
Country country = countries.get(position);
if (convertView == null) {
cell = new Cell();
cellView = inflater.inflate(R.layout.row, null);
cell.textView = (TextView) cellView.findViewById(R.id.row_title);
cell.imageView = (ImageView) cellView.findViewById(R.id.row_icon);
cellView.setTag(cell);
} else {
cell = (Cell) cellView.getTag();
}
cell.textView.setText(country.getName());
// Load drawable dynamically from country code
String drawableName = "flag_"
+ country.getCode().toLowerCase(Locale.ENGLISH);
cell.imageView.setImageResource(getResId(drawableName));
return cellView;
}
LoadingTip.java 文件源码
项目:MyFire
阅读 26
收藏 0
点赞 0
评论 0
private void initView(Context context) {
View.inflate(context, R.layout.dialog_loading_tip, this);
img_tip_logo = (ImageView) findViewById(R.id.img_tip_logo);
progress = (ProgressBar) findViewById(R.id.progress);
tv_tips = (TextView) findViewById(R.id.tv_tips);
bt_operate = (Button) findViewById(R.id.bt_operate);
//重新尝试
bt_operate.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
if(onReloadListener!=null){
onReloadListener.reload();
}
}
});
setVisibility(View.GONE);
}
LiveCameraActivity.java 文件源码
项目:AliZhiBoHao
阅读 21
收藏 0
点赞 0
评论 0
private void initView() {
mRelativeLayout = (RelativeLayout) findViewById(R.id.rl_main);
push_state_ll = (LinearLayout) findViewById(R.id.push_state_ll);
settings = (ImageView) findViewById(R.id.iv_settings);
settings.setOnClickListener(this);
wx_user_name = (TextView) findViewById(R.id.wx_user_name_tv);
wx_user_icon = (CircleImageView) findViewById(R.id.wx_user_icon_iv);
mCountTimeView = (CountTimeView) findViewById(R.id.count_time_view);
mRecorderButton = (ImageView) findViewById(R.id.iv_push);
mRecorderButton.setOnClickListener(this);
btn_pop_pro = (ImageView) findViewById(R.id.btn_pro);
btn_pop_pro.setOnClickListener(this);
btn_pop_talk = (ImageView) findViewById(R.id.btn_talk);
btn_pop_talk.setOnClickListener(this);
mTv_watch_person = (TextView) findViewById(R.id.tv_watch_person);
mRelativeLayout.setOnTouchListener(this);
}
PhotoViewAttacher.java 文件源码
项目:CXJPadProject
阅读 23
收藏 0
点赞 0
评论 0
public final ImageView getImageView() {
ImageView imageView = null;
if (null != mImageView) {
imageView = mImageView.get();
}
// If we don't have an ImageView, call cleanup()
if (null == imageView) {
cleanup();
throw new IllegalStateException(
"ImageView no longer exists. You should not use this PhotoViewAttacher any more.");
}
return imageView;
}
MyCardHandler.java 文件源码
项目:CardSlideView
阅读 18
收藏 0
点赞 0
评论 0
@Override
public View onBind(final Context context, final MyBean data, final int position, @CardViewPager.TransformerMode int mode) {
View view = View.inflate(context, R.layout.item, null);
ImageView imageView = (ImageView) view.findViewById(R.id.image);
ElasticCardView cardView = (ElasticCardView) view.findViewById(R.id.cardview);
final boolean isCard = mode == CardViewPager.MODE_CARD;
cardView.setPreventCornerOverlap(isCard);
cardView.setUseCompatPadding(isCard);
final String img = data.getImg();
Glide.with(context).load(img).into(imageView);
view.setOnClickListener(v -> {
Toast.makeText(context, "data:" + data + "position:" + position, Toast.LENGTH_SHORT).show();
TestActivity.start(context, img);
});
return view;
}
BannerLayout.java 文件源码
项目:SunmiUI
阅读 31
收藏 0
点赞 0
评论 0
@Override
public void setEnabled(boolean enabled) {
super.setEnabled(enabled);
for(int i=0;i<getChildCount();i++){
ImageView child = (ImageView) getChildAt(i);
child.setEnabled(enabled);
}
}
PageIndicatorLineCaret.java 文件源码
项目:FlickLauncher
阅读 21
收藏 0
点赞 0
评论 0
@Override
protected void onFinishInflate() {
super.onFinishInflate();
mAllAppsHandle = (ImageView) findViewById(R.id.all_apps_handle);
mAllAppsHandle.setImageDrawable(getCaretDrawable());
mAllAppsHandle.setOnTouchListener(mLauncher.getHapticFeedbackTouchListener());
mAllAppsHandle.setOnClickListener(mLauncher);
mAllAppsHandle.setOnLongClickListener(mLauncher);
mAllAppsHandle.setOnFocusChangeListener(mLauncher.mFocusHandler);
mLauncher.setAllAppsButton(mAllAppsHandle);
}
CoustomBehavier.java 文件源码
项目:DailyStudy
阅读 22
收藏 0
点赞 0
评论 0
private void initView(View parent) {
textView = (ImageView) parent.findViewById(R.id.textView);
textView1 = (ImageView) parent.findViewById(R.id.textView1);
title = (ImageView) parent.findViewById(R.id.title);
title1 = (ImageView) parent.findViewById(R.id.title1);
bifen1 = (TextView) parent.findViewById(R.id.bifen1);
bifen2 = (TextView) parent.findViewById(R.id.bifen2);
bifen3 = (TextView) parent.findViewById(R.id.bifen3);
bifen = (TextView) parent.findViewById(R.id.bifen);
zhudui = (FrameLayout) parent.findViewById(R.id.zhudui);
kedui = (FrameLayout) parent.findViewById(R.id.kedui);
bifenlayout = (FrameLayout) parent.findViewById(R.id.bifenlayout);
bifen1layout = (RelativeLayout) parent.findViewById(R.id.bifen1layout);
toolbarTitle = (RelativeLayout) parent.findViewById(R.id.toolbar_title);
text_zhudui = (TextView) parent.findViewById(R.id.text_zhudui);
}
ProfileActivity.java 文件源码
项目:RantApp
阅读 30
收藏 0
点赞 0
评论 0
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_profile);
userId = getIntent().getIntExtra(EXTRA_USER_ID,0);
mToolbar = (Toolbar) findViewById(R.id.activity_profile_toolbar);
setSupportActionBar(mToolbar);
getSupportActionBar().setDisplayShowTitleEnabled(false);
mToolbar.setNavigationIcon(R.drawable.ic_action_back);
mAvatarImageView = (ImageView) findViewById(R.id.activity_profile_avatar);
mNameTextView = (TextView) findViewById(R.id.activity_profile_name);
mBioTextView = (TextView) findViewById(R.id.activity_profile_bio);
mValueTextView = (TextView) findViewById(R.id.activity_profile_value);
mLocationTextView = (TextView) findViewById(R.id.activity_profile_location);
mEditCardView = (CardView) findViewById(R.id.activity_profile_cv_edit);
mEditButton = (Button) findViewById(R.id.activity_profile_button_edit);
mRecyclerView = (RecyclerView) findViewById(R.id.activity_profile_recycler_view);
mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
mRecyclerView.setAdapter(new NewAdapter(new ArrayList<RantItem>()));
getData();
}
AlertView.java 文件源码
项目:Cable-Android
阅读 35
收藏 0
点赞 0
评论 0
private void initialize(AttributeSet attrs) {
inflate(getContext(), R.layout.alert_view, this);
approvalIndicator = (ImageView) findViewById(R.id.pending_approval_indicator);
failedIndicator = (ImageView) findViewById(R.id.sms_failed_indicator);
if (attrs != null) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(attrs, R.styleable.AlertView, 0, 0);
boolean useSmallIcon = typedArray.getBoolean(R.styleable.AlertView_useSmallIcon, false);
typedArray.recycle();
if (useSmallIcon) {
failedIndicator.setImageDrawable(ContextCompat.getDrawable(getContext(), R.drawable.ic_error_red_18dp));
}
}
}
QMUIDialogMenuItemView.java 文件源码
项目:qmui
阅读 21
收藏 0
点赞 0
评论 0
public CheckItemView(Context context, boolean right) {
super(context);
mContext = context;
mCheckedView = new ImageView(mContext);
mCheckedView.setImageDrawable(QMUIResHelper.getAttrDrawable(context, R.attr.qmui_s_checkbox));
mCheckedView.setId(QMUIViewHelper.generateViewId());
LayoutParams checkLp = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
checkLp.addRule(CENTER_VERTICAL, TRUE);
if(right){
checkLp.addRule(ALIGN_PARENT_RIGHT, TRUE);
checkLp.leftMargin = QMUIResHelper.getAttrDimen(mContext, R.attr.qmui_dialog_menu_item_check_icon_margin_horizontal);
}else{
checkLp.addRule(ALIGN_PARENT_LEFT, TRUE);
checkLp.rightMargin =QMUIResHelper.getAttrDimen(mContext, R.attr.qmui_dialog_menu_item_check_icon_margin_horizontal);
}
addView(mCheckedView,checkLp);
mTextView = createItemTextView(mContext);
LayoutParams tvLp = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
if(right){
tvLp.addRule(LEFT_OF, mCheckedView.getId());
}else{
tvLp.addRule(RIGHT_OF, mCheckedView.getId());
}
addView(mTextView,tvLp);
}
PendIntentCompat.java 文件源码
项目:TPlayer
阅读 18
收藏 0
点赞 0
评论 0
private void setIntentByViewGroup(RemoteViews remoteViews, ViewGroup viewGroup, List<RectInfo> list) {
int count = viewGroup.getChildCount();
Rect p = new Rect();
viewGroup.getHitRect(p);
for (int i = 0; i < count; i++) {
View v = viewGroup.getChildAt(i);
if (v instanceof ViewGroup) {
// linearlayout
setIntentByViewGroup(remoteViews, (ViewGroup) v, list);
} else if (v instanceof TextView || v instanceof ImageView) {
// textview
Rect rect = getRect(v);
RectInfo next = findIntent(rect, list);
if (next != null) {
// VLog.d(TAG, next.rect+":setPendIntent:"+i);
// remoteViews.setImageViewBitmap(v.getId(), next.testBg);
remoteViews.setOnClickPendingIntent(v.getId(), next.mPendingIntent);
}
}
}
}
TopicFragment.java 文件源码
项目:newIPlay
阅读 27
收藏 0
点赞 0
评论 0
private void setHeaderViewData() {
ImageLoader.loadImage(getActivity(), mTopicBean.getNewIcon(), (ImageView) mHeaderView.findViewById(R.id.game_header_iv));
ImageLoader.loadImage(getActivity(), mTopicBean.getNewIconBgImg(), (ImageView) mHeaderView.findViewById(R.id.game_header_bg_iv));
((TextView) mHeaderView.findViewById(R.id.game_header_title_tv)).setText(mTopicBean.getTopicName());
((TextView) mHeaderView.findViewById(R.id.game_header_des_tv)).setText(mTopicBean.getTopicDescription());
((TextView) mHeaderView.findViewById(R.id.game_header_fouce_num_tv)).setText(mTopicBean.getFollowUserCount() + " 人关注");
mHeaderFocuseIv.setBackgroundResource(R.drawable.border_red);
mHeaderFocuseIv.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mPresenter.changeFocuseState();
}
});
}
WatchDetailInfoActivity.java 文件源码
项目:ViewPagerZoomTransformer
阅读 25
收藏 0
点赞 0
评论 0
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.watch_detail_info_layout);
mPosition = getIntent().getIntExtra("position", 0);
Toolbar toolbar = (Toolbar) findViewById(R.id.infoToolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
mTitleImage = (ImageView)findViewById(R.id.infoTitleImage);
mIntroImage_1 = (ImageView)findViewById(R.id.imageIntro_1);
mIntroImage_2 = (ImageView)findViewById(R.id.imageIntro_2);
mIntroImage_3 = (ImageView)findViewById(R.id.imageIntro_3);
setImagesRes(mTitleImage, mIntroImage_1, mIntroImage_2, mIntroImage_3);
}
ThumbnailView.java 文件源码
项目:Cable-Android
阅读 31
收藏 0
点赞 0
评论 0
public ThumbnailView(final Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
inflate(context, R.layout.thumbnail_view, this);
this.radius = getResources().getDimensionPixelSize(R.dimen.message_bubble_corner_radius);
this.image = (ImageView) findViewById(R.id.thumbnail_image);
this.playOverlay = (ImageView) findViewById(R.id.play_overlay);
super.setOnClickListener(new ThumbnailClickDispatcher());
if (attrs != null) {
TypedArray typedArray = context.getTheme().obtainStyledAttributes(attrs, R.styleable.ThumbnailView, 0, 0);
backgroundColorHint = typedArray.getColor(R.styleable.ThumbnailView_backgroundColorHint, Color.BLACK);
typedArray.recycle();
}
}
PhotoViewAttacher.java 文件源码
项目:GitHub
阅读 21
收藏 0
点赞 0
评论 0
public final void update() {
ImageView imageView = getImageView();
if (null != imageView) {
if (mZoomEnabled) {
// Make sure we using MATRIX Scale Type
setImageViewScaleTypeMatrix(imageView);
// Update the base matrix using the current drawable
updateBaseMatrix(imageView.getDrawable());
} else {
// Reset the Matrix...
resetMatrix();
}
}
}
BatchFileCompressTestActivity.java 文件源码
项目:Tiny
阅读 27
收藏 0
点赞 0
评论 0
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_batch_file_compress_test);
mOriginImg1 = (ImageView) findViewById(R.id.img_origin1);
mOriginImg2 = (ImageView) findViewById(R.id.img_origin2);
mOriginImg3 = (ImageView) findViewById(R.id.img_origin3);
mOriginImg4 = (ImageView) findViewById(R.id.img_origin4);
mCompressImg1 = (ImageView) findViewById(R.id.img_compress1);
mCompressImg2 = (ImageView) findViewById(R.id.img_compress2);
mCompressImg3 = (ImageView) findViewById(R.id.img_compress3);
mCompressImg4 = (ImageView) findViewById(R.id.img_compress4);
mOriginTv = (TextView) findViewById(R.id.tv_origin);
mCompressTv = (TextView) findViewById(R.id.tv_compress);
}
PinsColumnContainer.java 文件源码
项目:CustomAndroidOneSheeld
阅读 19
收藏 0
点赞 0
评论 0
public void setup(OnChildFocusListener focusListener, ImageView cursor,
ControllerParent<?> controller, onGetPinsView onGetPinsListener) {
this.focusListener = focusListener;
this.cursor = cursor;
this.controller = controller;
this.onGetPinsListener = onGetPinsListener;
currentIndex = -1;
currentTag = null;
isOnglobalCalled = false;
childrenRects = new ArrayList<PinData>();
getViewTreeObserver().addOnGlobalLayoutListener(
new OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
if (!isOnglobalCalled
&& (childrenRects == null || childrenRects
.size() == 0)) {
childrenRects = new ArrayList<PinsColumnContainer.PinData>();
loadRects(PinsColumnContainer.this);
PinsColumnContainer.this.onGetPinsListener
.onPinsDrawn();
isOnglobalCalled = true;
}
}
});
}