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


Java ImageView.setEnabled方法代码示例

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


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

示例1: processLogic

import android.widget.ImageView; //导入方法依赖的package包/类
protected void processLogic() {
    this.mIndicatorIvList = new ArrayList();
    this.mGridViewList = new ArrayList();
    int emotionPageCount = ((MQEmotionUtil.sEmotionKeyArr.length - 1) / 27) + 1;
    LayoutParams indicatorIvLp = new LayoutParams(-2, -2);
    int margin = MQUtils.dip2px(getContext(), 5.0f);
    indicatorIvLp.setMargins(margin, margin, margin, margin);
    for (int i = 0; i < emotionPageCount; i++) {
        ImageView indicatorIv = new ImageView(getContext());
        indicatorIv.setLayoutParams(indicatorIvLp);
        indicatorIv.setImageResource(R.drawable.mq_selector_emotion_indicator);
        indicatorIv.setEnabled(false);
        this.mIndicatorIvList.add(indicatorIv);
        this.mIndicatorLl.addView(indicatorIv);
        this.mGridViewList.add(getGridView(i));
    }
    ((ImageView) this.mIndicatorIvList.get(0)).setEnabled(true);
    this.mContentVp.setAdapter(new EmotionPagerAdapter());
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:20,代码来源:MQEmotionKeyboardLayout.java

示例2: refreshWallPaper

import android.widget.ImageView; //导入方法依赖的package包/类
private void refreshWallPaper() {
    boolean z = false;
    if (this.index >= 0 && this.index <= this.wallpagers.size() - 1) {
        this.btnWallLeft.setEnabled(this.index != 0);
        ImageView imageView = this.btnWallRight;
        if (this.index != this.wallpagers.size() - 1) {
            z = true;
        }
        imageView.setEnabled(z);
        this.handler.removeCallbacks(this.runnable);
        this.imageUrl = ((HomeWallpager) this.wallpagers.get(this.index)).getPicUrl();
        this.date = ((HomeWallpager) this.wallpagers.get(this.index)).date;
        this.tvWallDate.setText(this.date);
        this.handler.postDelayed(this.runnable, 3000);
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:17,代码来源:HomePopView.java

示例3: initUI

import android.widget.ImageView; //导入方法依赖的package包/类
public void initUI() {
    if (getView() != null) {
        ImageView mImageView = (ImageView) getView().findViewById(R.id.image);
        if (this.data != null) {
            this.imageLoader.displayImage(this.data.getPicUrl(), mImageView,
                    ImageLoaderOptions.global(this.data.getDefaultImage()));
            if (TextUtils.isEmpty(this.data.getLink())) {
                mImageView.setEnabled(false);
                return;
            }
            mImageView.setEnabled(true);
            mImageView.setOnClickListener(new OnClickListener() {
                public void onClick(View v) {
                    if (TextUtils.isEmpty(HomeImageFragment.this.data.getMobEvent())) {
                        MobclickAgent.onEvent(HomeImageFragment.this.getActivity(),
                                HomeImageFragment.this.data.getMobEvent());
                    }
                    BooheeScheme.handleUrl(HomeImageFragment.this.getActivity(),
                            HomeImageFragment.this.data.getLink(), HomeImageFragment.this
                                    .data.getTitle());
                }
            });
        }
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:26,代码来源:HomeImageFragment.java

示例4: addIndicatorImageViews

import android.widget.ImageView; //导入方法依赖的package包/类
/**
 * 增加banner dots 指示器
 *
 * @param size
 */
private void addIndicatorImageViews(int size) {
    llIndexContainer.removeAllViews();
    for (int i = 0; i < size; i++) {
        ImageView iv = new ImageView(mContext);
        LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(MeasureUtils.dp2px(mContext, 5), MeasureUtils.dp2px(mContext, 5));
        if (i != 0) {
            lp.leftMargin = MeasureUtils.dp2px(mContext, 7);
        }
        iv.setLayoutParams(lp);
        iv.setBackgroundResource(R.drawable.banner_dot_bg);
        iv.setEnabled(false);
        if (i == 0) {
            iv.setEnabled(true);
        }
        llIndexContainer.addView(iv);
    }
}
 
开发者ID:shenhuanet,项目名称:OpenEyesReading-android,代码行数:23,代码来源:BannerView.java

示例5: setEnabled

import android.widget.ImageView; //导入方法依赖的package包/类
@Override
public void setEnabled(boolean enabled) {
    super.setEnabled(enabled);
    for(int i=0;i<getChildCount();i++){
        ImageView child = (ImageView) getChildAt(i);
        child.setEnabled(enabled);
    }
}
 
开发者ID:teisun,项目名称:SunmiUI,代码行数:9,代码来源:BannerLayout.java

示例6: setInvisible

import android.widget.ImageView; //导入方法依赖的package包/类
private void setInvisible() {
    // Log.d("COLLAGE", "Setting something invisible...");
    if (imageViewReference != null) {
        final ImageView imageView = imageViewReference.get();
        BitmapFetcherTask bitmapDownloaderTask = getBitmapDownloaderTask(imageView);
        if (this == bitmapDownloaderTask) {
            imageView.setVisibility(View.GONE);
            imageView.setClickable(false);
            imageView.setEnabled(false);
        }
    }
}
 
开发者ID:abelabbesnabi,项目名称:cordova-plugin-image-picker,代码行数:13,代码来源:ImageFetcher.java

示例7: setStatueView

import android.widget.ImageView; //导入方法依赖的package包/类
@SuppressLint({"ResourceAsColor"})
private void setStatueView(int level, ImageView statue) {
    if (level == 1) {
        statue.setVisibility(0);
        statue.setEnabled(true);
    } else if (level == 2) {
        statue.setVisibility(0);
        statue.setEnabled(false);
    } else {
        statue.setVisibility(8);
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:13,代码来源:AlbumCommentDetailActivity.java

示例8: setSupportView

import android.widget.ImageView; //导入方法依赖的package包/类
private void setSupportView(String voteFlag, ImageView supportView) {
    if (TextUtils.isEmpty(voteFlag) || voteFlag.equals("0")) {
        supportView.setVisibility(8);
    } else if (voteFlag.equals("1")) {
        supportView.setVisibility(0);
        supportView.setEnabled(true);
    } else if (voteFlag.equals("2")) {
        supportView.setVisibility(0);
        supportView.setEnabled(false);
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:12,代码来源:AlbumCommentDetailActivity.java

示例9: initViews

import android.widget.ImageView; //导入方法依赖的package包/类
private void initViews() {
	
	//提醒设置
	ivStart = (ImageView)findViewById(R.id.from);
	ivStart.setOnClickListener(this);
	ivEnd = (ImageView)findViewById(R.id.to);
	ivEnd.setOnClickListener(this);
	btnPreReminderTime = (Button)findViewById(R.id.time);
	btnPreReminderTime.setOnClickListener(this);
	ivRing = (ImageView)findViewById(R.id.ring);
	ivRing.setOnClickListener(this);
	ivVibrate = (ImageView)findViewById(R.id.vibrate);
	ivVibrate.setOnClickListener(this);
	tvMIUIRepair = (TextView)findViewById(R.id.repair);
	tvMIUIRepair.setOnClickListener(this);
	Button btnReminderDemo = (Button)findViewById(R.id.demo);
	btnReminderDemo.setOnClickListener(this);
	
	btnPreReminderTime.setText(setSP.getPreReminderTimeString());
	ivVibrate.setImageResource(setSP.isVibrate()==true ? R.drawable.chat_on:R.drawable.chat_off);
	ivRing.setImageResource(setSP.isRing()==true ? R.drawable.chat_on:R.drawable.chat_off);
	ivStart.setImageResource(setSP.isStartReminder()==true ? R.drawable.chat_on:R.drawable.chat_off);
	ivEnd.setImageResource(setSP.isEndReminder()==true ? R.drawable.chat_on:R.drawable.chat_off);
	
	if (!setSP.isReminderSet()){
		btnPreReminderTime.setEnabled(false);
		ivRing.setEnabled(false);
		ivVibrate.setEnabled(false);
		tvMIUIRepair.setEnabled(false);
	}else{
		btnPreReminderTime.setEnabled(true);
		ivRing.setEnabled(true);
		ivVibrate.setEnabled(true);
		tvMIUIRepair.setEnabled(true);
	}
}
 
开发者ID:SShineTeam,项目名称:Huochexing12306,代码行数:37,代码来源:ReminderSetupAty.java

示例10: findViews

import android.widget.ImageView; //导入方法依赖的package包/类
private void findViews() {
    if (init || root == null)
        return;
    topRoot = root.findViewById(R.id.avchat_video_top_control);
    switchAudio = topRoot.findViewById(R.id.avchat_video_switch_audio);
    switchAudio.setOnClickListener(this);
    time = (Chronometer) topRoot.findViewById(R.id.avchat_video_time);
    netUnstableTV = (TextView) topRoot.findViewById(R.id.avchat_video_netunstable);

    middleRoot = root.findViewById(R.id.avchat_video_middle_control);
    headImg = (HeadImageView) middleRoot.findViewById(R.id.avchat_video_head);
    nickNameTV = (TextView) middleRoot.findViewById(R.id.avchat_video_nickname);
    notifyTV = (TextView) middleRoot.findViewById(R.id.avchat_video_notify);

    refuse_receive = middleRoot.findViewById(R.id.avchat_video_refuse_receive);
    refuseTV = (TextView) refuse_receive.findViewById(R.id.refuse);
    receiveTV = (TextView) refuse_receive.findViewById(R.id.receive);
    refuseTV.setOnClickListener(this);
    receiveTV.setOnClickListener(this);

    recordView = root.findViewById(R.id.avchat_record_layout);
    recordTip = recordView.findViewById(R.id.avchat_record_tip);
    recordWarning = recordView.findViewById(R.id.avchat_record_warning);

    bottomRoot = root.findViewById(R.id.avchat_video_bottom_control);
    faceUnityRoot = root.findViewById(R.id.avchat_video_face_unity);

    switchCameraToggle = new ToggleView(bottomRoot.findViewById(R.id.avchat_switch_camera), ToggleState.DISABLE, this);
    closeCameraToggle = new ToggleView(bottomRoot.findViewById(R.id.avchat_close_camera), ToggleState.DISABLE, this);
    muteToggle = new ToggleView(bottomRoot.findViewById(R.id.avchat_video_mute), ToggleState.DISABLE, this);
    recordToggle = (ImageView) bottomRoot.findViewById(R.id.avchat_video_record);
    recordToggle.setEnabled(false);
    recordToggle.setOnClickListener(this);
    hangUpImg = (ImageView) bottomRoot.findViewById(R.id.avchat_video_logout);
    hangUpImg.setOnClickListener(this);

    permissionRoot = root.findViewById(R.id.avchat_video_permission_control);
    init = true;
}
 
开发者ID:newDeepLearing,项目名称:decoy,代码行数:40,代码来源:AVChatVideo.java

示例11: onCreateView

import android.widget.ImageView; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
						 Bundle savedInstanceState) {
	mInflater = inflater;
	View view = inflater.inflate(R.layout.history, container, false);

	noCallHistory = (TextView) view.findViewById(R.id.no_call_history);
	noMissedCallHistory = (TextView) view.findViewById(R.id.no_missed_call_history);

	historyList = (ListView) view.findViewById(R.id.history_list);
	historyList.setOnItemClickListener(this);

	delete = (ImageView) view.findViewById(R.id.delete);
	delete.setOnClickListener(this);

	editList = (LinearLayout) view.findViewById(R.id.edit_list);
	topBar = (LinearLayout) view.findViewById(R.id.top_bar);

	cancel = (ImageView) view.findViewById(R.id.cancel);
	cancel.setOnClickListener(this);

	allCalls = (ImageView) view.findViewById(R.id.all_calls);
	allCalls.setOnClickListener(this);

	allCallsSelected = view.findViewById(R.id.all_calls_select);

	missedCalls = (ImageView) view.findViewById(R.id.missed_calls);
	missedCalls.setOnClickListener(this);

	missedCallsSelected = view.findViewById(R.id.missed_calls_select);

	selectAll = (ImageView) view.findViewById(R.id.select_all);
	selectAll.setOnClickListener(this);

	deselectAll = (ImageView) view.findViewById(R.id.deselect_all);
	deselectAll.setOnClickListener(this);

	allCalls.setEnabled(false);
	onlyDisplayMissedCalls = false;

	edit = (ImageView) view.findViewById(R.id.edit);
	edit.setOnClickListener(this);

	return view;
}
 
开发者ID:treasure-lau,项目名称:Linphone4Android,代码行数:46,代码来源:HistoryListFragment.java

示例12: ToolBarView

import android.widget.ImageView; //导入方法依赖的package包/类
public ToolBarView(Context context, AttributeSet attr) {

        super(context, attr);

        /**
         * 加载ToolBar布局文件
         */
        LayoutInflater.from(context).inflate(R.layout.tool_bar, this);

        titleText = (TextView) findViewById(R.id.title_bar_text);

        backButton = (Button) findViewById(R.id.title_bar_back);

        rightButton = (ImageView) findViewById(R.id.title_bar_right_button);

        titleCampus = (TextView) findViewById(R.id.title_bar_campus);

        setBackButtonVisible(false);

        setTitleCampusVisible(false);

        rightButton.setEnabled(false);

    }
 
开发者ID:838030195,项目名称:DaiGo,代码行数:25,代码来源:ToolBarView.java

示例13: onCreate

import android.widget.ImageView; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(ResourceUtils.getIdByName(this, "layout",
            "sobot_activity_webview"));
    String bg_color = SharedPreferencesUtil.getStringData(this, "robot_current_themeColor", "");
    if (bg_color != null && bg_color.trim().length() != 0) {
        relative.setBackgroundColor(Color.parseColor(bg_color));
    }

    int robot_current_themeImg = SharedPreferencesUtil.getIntData(this, "robot_current_themeImg", 0);
    if (robot_current_themeImg != 0) {
        relative.setBackgroundResource(robot_current_themeImg);
    }
    Drawable drawable = getResources().getDrawable(ResourceUtils.getIdByName(this, "drawable", "sobot_btn_back_selector"));
    drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight());
    sobot_tv_left.setCompoundDrawables(drawable, null, null, null);
    sobot_tv_left.setText(getResString("sobot_back"));
    mWebView = (WebView) findViewById(getResId("sobot_mWebView"));
    mProgressBar = (ProgressBar) findViewById(getResId("sobot_loadProgress"));
    sobot_rl_net_error = (RelativeLayout) findViewById(getResId("sobot_rl_net_error"));
    sobot_webview_toolsbar = (LinearLayout) findViewById(getResId("sobot_webview_toolsbar"));
    sobot_btn_reconnect = (Button) findViewById(getResId("sobot_btn_reconnect"));
    sobot_btn_reconnect.setOnClickListener(this);
    sobot_txt_loading = (TextView) findViewById(getResId("sobot_txt_loading"));
    sobot_webview_goback = (ImageView) findViewById(getResId("sobot_webview_goback"));
    sobot_webview_forward = (ImageView) findViewById(getResId("sobot_webview_forward"));
    sobot_webview_reload = (ImageView) findViewById(getResId("sobot_webview_reload"));
    sobot_webview_copy = (ImageView) findViewById(getResId("sobot_webview_copy"));
    sobot_webview_goback.setOnClickListener(this);
    sobot_webview_forward.setOnClickListener(this);
    sobot_webview_reload.setOnClickListener(this);
    sobot_webview_copy.setOnClickListener(this);
    sobot_webview_goback.setEnabled(false);
    sobot_webview_forward.setEnabled(false);
    sobot_tv_left.setOnClickListener(this);
    setTitle("");
    setShowNetRemind(false);
    resetViewDisplay();
    initWebView();
    initBundleData(savedInstanceState);
    mWebView.loadUrl(mUrl);
    LogUtils.i("webViewActivity---" + mUrl);
}
 
开发者ID:fengdongfei,项目名称:CXJPadProject,代码行数:46,代码来源:WebViewActivity.java

示例14: displaySpeakersData

import android.widget.ImageView; //导入方法依赖的package包/类
private void displaySpeakersData(SessionDetailModel data) {
    final ViewGroup speakersGroup = (ViewGroup) getActivity()
            .findViewById(R.id.session_speakers_block);

    // Remove all existing speakers (everything but first child, which is the header)
    for (int i = speakersGroup.getChildCount() - 1; i >= 1; i--) {
        speakersGroup.removeViewAt(i);
    }

    final LayoutInflater inflater = getActivity().getLayoutInflater();

    boolean hasSpeakers = false;

    List<SessionDetailModel.Speaker> speakers = data.getSpeakers();

    for (final SessionDetailModel.Speaker speaker : speakers) {

        String speakerHeader = speaker.getName();
        if (!TextUtils.isEmpty(speaker.getCompany())) {
            speakerHeader += ", " + speaker.getCompany();
        }

        final View speakerView = inflater
                .inflate(R.layout.speaker_detail, speakersGroup, false);
        final TextView speakerHeaderView = (TextView) speakerView
                .findViewById(R.id.speaker_header);
        final ImageView speakerImageView = (ImageView) speakerView
                .findViewById(R.id.speaker_image);
        final TextView speakerAbstractView = (TextView) speakerView
                .findViewById(R.id.speaker_abstract);
        final ImageView plusOneIcon = (ImageView) speakerView.findViewById(R.id.gplus_icon_box);
        final ImageView twitterIcon = (ImageView) speakerView.findViewById(
                R.id.twitter_icon_box);

        setUpSpeakerSocialIcon(speaker, twitterIcon, speaker.getTwitterUrl(),
                UIUtils.TWITTER_COMMON_NAME, UIUtils.TWITTER_PACKAGE_NAME);

        setUpSpeakerSocialIcon(speaker, plusOneIcon, speaker.getPlusoneUrl(),
                UIUtils.GOOGLE_PLUS_COMMON_NAME, UIUtils.GOOGLE_PLUS_PACKAGE_NAME);

        // A speaker may have both a Twitter and GPlus page, only a Twitter page or only a
        // GPlus page, or neither. By default, align the Twitter icon to the right and the GPlus
        // icon to its left. If only a single icon is displayed, align it to the right.
        determineSocialIconPlacement(plusOneIcon, twitterIcon);

        if (!TextUtils.isEmpty(speaker.getImageUrl()) && mSpeakersImageLoader != null) {
            mSpeakersImageLoader.loadImage(speaker.getImageUrl(), speakerImageView);
        }

        speakerHeaderView.setText(speakerHeader);
        speakerImageView.setContentDescription(
                getString(R.string.speaker_googleplus_profile, speakerHeader));
        UIUtils.setTextMaybeHtml(speakerAbstractView, speaker.getAbstract());

        if (!TextUtils.isEmpty(speaker.getUrl())) {
            speakerImageView.setEnabled(true);
            speakerImageView.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    Intent speakerProfileIntent = new Intent(Intent.ACTION_VIEW,
                            Uri.parse(speaker.getUrl()));
                    speakerProfileIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
                    UIUtils.preferPackageForIntent(getActivity(),
                            speakerProfileIntent,
                            UIUtils.GOOGLE_PLUS_PACKAGE_NAME);
                    startActivity(speakerProfileIntent);
                }
            });
        } else {
            speakerImageView.setEnabled(false);
            speakerImageView.setOnClickListener(null);
        }

        speakersGroup.addView(speakerView);
        hasSpeakers = true;
    }

    speakersGroup.setVisibility(hasSpeakers ? View.VISIBLE : View.GONE);
    updateEmptyView(data);
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:81,代码来源:SessionDetailFragment.java


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