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


Java ImageButton.setVisibility方法代码示例

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


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

示例1: onActivityCreated

import android.widget.ImageButton; //导入方法依赖的package包/类
@Override
    public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated (savedInstanceState);
        ImageButton btnAddNotes = (ImageButton) getActivity ().findViewById (R.id.buttonAddNotesTags);
        btnAddNotes.setOnClickListener (this);
        btnAddNotes.setVisibility (View.INVISIBLE);
//        ListView mListViewTag = (ListView) getActivity().findViewById(R.id.listNotesAll);

        mExpandableListViewTag = (ExpandableListView) getActivity ().findViewById (R.id.expandableListNotesTags);

        mArrayListTagNotes = new ArrayList<> ();
//        customAdapterTagNotes = new CustomAdapter(mArrayListTagNotes, getActivity(),tempString , mHandler);
        mCustomAdapterTags = new CustomAdapterTags (getActivity (), Integer.parseInt (mSectionIndex) + 1);
        mExpandableListViewTag.setTag (R.string.filename, mSectionIndex);
        mExpandableListViewTag.setTag (R.string.list_object, mArrayListTagNotes);
        mExpandableListViewTag.setAdapter (mCustomAdapterTags);
        mExpandableListViewTag.setItemsCanFocus (true);
        registerForContextMenu (mExpandableListViewTag);
        mSectionIndex = String.valueOf (mOnFragmentInteractionListener.getSectionIndex());
        populateListView ();

    }
 
开发者ID:atulgpt,项目名称:TimeTrix,代码行数:23,代码来源:FragmentTagNotes.java

示例2: initUI

import android.widget.ImageButton; //导入方法依赖的package包/类
private void initUI(){		
	previewOperationBar = (LinearLayout) findViewById(R.id.picker_image_preview_operator_bar);
	originalImage = (ImageButton) findViewById(R.id.picker_image_preview_orignal_image);
	originalImage.setOnClickListener(this);
	originalImageSizeTip = (TextView) findViewById(R.id.picker_image_preview_orignal_image_tip);
	if(!isSupportOriginal){
		originalImage.setVisibility(View.INVISIBLE);
		originalImageSizeTip.setVisibility(View.INVISIBLE);
	}
	previewSendBtn = (TextView) findViewById(R.id.picker_image_preview_send);
	previewSendBtn.setOnClickListener(this);
	updateSelectBtnStatus();
	updateOriImageSizeTip(isSendOriginalImage);
			
	imageViewPager = (ViewPager) findViewById(R.id.picker_image_preview_viewpager);
	imageViewPager.setOnPageChangeListener(this);
	imageViewPager.setOffscreenPageLimit(2);
	imageViewPagerAdapter = new PickerPreviewPagerAdapter(this, photoLists, getLayoutInflater(),
			imageViewPager.getLayoutParams().width, imageViewPager.getLayoutParams().height, this);
	imageViewPager.setAdapter(imageViewPagerAdapter);
	
	setTitleIndex(firstDisplayImageIndex);
	updateTitleSelect(firstDisplayImageIndex);
	imageViewPager.setCurrentItem(firstDisplayImageIndex);
}
 
开发者ID:newDeepLearing,项目名称:decoy,代码行数:26,代码来源:PickerAlbumPreviewActivity.java

示例3: run

import android.widget.ImageButton; //导入方法依赖的package包/类
@Override
public void run() {
	DragAdapter.isShowAdd = false;
	for (int i = 0; i < getChildCount(); i++) {
		final View mGridItemView = getChildAt(i);
		mDeleteButton = (ImageButton) mGridItemView
				.findViewById(R.id.ic_close);
		// mDeleteButton.setOnClickListener(DragGridView.this);
		if (mDeleteButton.getVisibility() != View.VISIBLE) {
			mDeleteButton.setVisibility(View.VISIBLE);
		}
		if (mNeedShake) {
			mStartShake = true;
			shakeAnimation(mGridItemView);
		}

	}
}
 
开发者ID:smartbeng,项目名称:PaoMovie,代码行数:19,代码来源:DragGridView.java

示例4: updateFlashlightView

import android.widget.ImageButton; //导入方法依赖的package包/类
private void updateFlashlightView() {
	ImageButton flashlight = mFlashlight;
	int pref = mPrefFlashlight;
	if (pref == 2) {
		// hidden flashlight
		flashlight.setVisibility(View.GONE);
	} else {
		// show
		flashlight.setVisibility(View.VISIBLE);
		if (pref == 1) {
			// update flashlight state image
			boolean enabled = LedFlashlightReceiver.isFlashlightEnabled(this);
			flashlight.setImageResource(enabled ? R.drawable.ic_flashlight_on : R.drawable.ic_flashlight);
		}
	}
}
 
开发者ID:sdrausty,项目名称:buildAPKsApps,代码行数:17,代码来源:MainSettingsActivity.java

示例5: showShortenedUrl

import android.widget.ImageButton; //导入方法依赖的package包/类
private void showShortenedUrl(){

        // Setting up Variables for Layout
        final TextView viewShortenedUrl = (TextView) findViewById(R.id.textViewShortenedLink);
        final ImageButton shareButton = (ImageButton) findViewById(R.id.shareButton);
        final ImageButton openLinkButton = (ImageButton) findViewById(R.id.openLinkButton);
        final ImageButton copyLinkButton = (ImageButton) findViewById(R.id.copyLinkButton);
        final ProgressBar progressBar = (ProgressBar) findViewById(R.id.progressBar);
        final ImageButton qrCodeButton = (ImageButton) findViewById(R.id.qrCodeButton);

        // We set the shortened URL as Label
        viewShortenedUrl.setText(shortUrl);

        // Now we hide the loading-spinner and set the Buttons and Texts as vissible
        progressBar.setVisibility(View.GONE);
        viewShortenedUrl.setVisibility(View.VISIBLE);
        shareButton.setVisibility(View.VISIBLE);
        openLinkButton.setVisibility(View.VISIBLE);
        copyLinkButton.setVisibility(View.VISIBLE);
        qrCodeButton.setVisibility(View.VISIBLE);

    }
 
开发者ID:michaelachmann,项目名称:LnkShortener,代码行数:23,代码来源:DisplayShortenedUrlActivity.java

示例6: updatePlayPauseButtonImageResource

import android.widget.ImageButton; //导入方法依赖的package包/类
private void updatePlayPauseButtonImageResource(ImageButton button) {
    CastSession castSession = CastContext.getSharedInstance(mAppContext)
            .getSessionManager().getCurrentCastSession();
    RemoteMediaClient remoteMediaClient =
            (castSession == null) ? null : castSession.getRemoteMediaClient();
    if (remoteMediaClient == null) {
        button.setVisibility(View.GONE);
        return;
    }
    int status = remoteMediaClient.getPlayerState();
    switch (status) {
        case MediaStatus.PLAYER_STATE_PLAYING:
            button.setImageResource(PAUSE_RESOURCE);
            break;
        case MediaStatus.PLAYER_STATE_PAUSED:
            button.setImageResource(PLAY_RESOURCE);
            break;
        default:
            button.setVisibility(View.GONE);
    }
}
 
开发者ID:nordfalk,项目名称:EsperantoRadio,代码行数:22,代码来源:QueueListAdapter.java

示例7: setHomePointPosition

import android.widget.ImageButton; //导入方法依赖的package包/类
public static void setHomePointPosition(LinearLayout homeNavbar) {
    int position = DataHook.homePointPosition;
    ImageButton pointbtn = (ImageButton) homeNavbar.getChildAt(0);
    if (position == SPUtil.LEFT) {
        homeNavbar.setGravity(Gravity.LEFT);
    } else if (position == SPUtil.RIGHT) {
        homeNavbar.setGravity(Gravity.RIGHT);
    } else if (position == SPUtil.DISMISS) {
        pointbtn.setVisibility(View.GONE);
    }
}
 
开发者ID:EggUncle,项目名称:XposedNavigationBar,代码行数:12,代码来源:NavBarHook.java

示例8: updateButton

import android.widget.ImageButton; //导入方法依赖的package包/类
private void updateButton()
{
	final ImageButton button = findViewById(R.id.queryButton);
	final TextView sourceText = findViewById(R.id.querySource);
	final String source = Settings.getStringPref(this, TreebolicIface.PREF_SOURCE);
	final boolean qualifies = sourceQualifies(source);
	button.setVisibility(qualifies ? View.VISIBLE : View.INVISIBLE);
	sourceText.setVisibility(qualifies ? View.VISIBLE : View.INVISIBLE);
	if (qualifies)
	{
		sourceText.setText(source);
	}
}
 
开发者ID:1313ou,项目名称:TreebolicPlugins,代码行数:14,代码来源:MainActivity.java

示例9: getView

import android.widget.ImageButton; //导入方法依赖的package包/类
@Override
public View getView(final int position, View v, final ViewGroup parent) {
  if (v == null) {
    v = LayoutInflater.from(context).inflate(R.layout.selected_recipient_list_item, parent, false);
  }

  final RecipientWrapper rw         = (RecipientWrapper)getItem(position);
  final Recipient        p          = rw.getRecipient();
  final boolean          modifiable = rw.isModifiable();

  TextView    name   = (TextView)    v.findViewById(R.id.name);
  TextView    phone  = (TextView)    v.findViewById(R.id.phone);
  ImageButton delete = (ImageButton) v.findViewById(R.id.delete);

  name.setText(p.getName());
  phone.setText(p.getNumber());
  delete.setVisibility(modifiable ? View.VISIBLE : View.GONE);
  delete.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View view) {
      if (onRecipientDeletedListener != null) {
        onRecipientDeletedListener.onRecipientDeleted(recipients.get(position).getRecipient());
      }
    }
  });

  return v;
}
 
开发者ID:CableIM,项目名称:Cable-Android,代码行数:29,代码来源:SelectedRecipientsAdapter.java

示例10: setHideDeleltButton

import android.widget.ImageButton; //导入方法依赖的package包/类
/**
 * HideDeleltButton
 */
private void setHideDeleltButton() {
	DragAdapter.isShowAdd = true;
	for (int i = 0; i < getChildCount(); i++) {
		final View mGridItemView = getChildAt(i);
		mDeleteButton = (ImageButton) mGridItemView
				.findViewById(R.id.ic_close);
		mDeleteButton.setVisibility(View.GONE);
	}
}
 
开发者ID:smartbeng,项目名称:PaoMovie,代码行数:13,代码来源:DragGridView.java

示例11: createView

import android.widget.ImageButton; //导入方法依赖的package包/类
@Override
    protected View createView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(getLayoutFragmentResources(), container, false);
        btnFilter = (ImageButton) view.findViewById(R.id.btn_filter);
        btnFilter.setVisibility(View.GONE);
//        btnFilter.setOnClickListener(this);
        return view;
    }
 
开发者ID:WorldBank-Transport,项目名称:RoadLab-Pro,代码行数:9,代码来源:TagsFragment.java

示例12: initToolbar

import android.widget.ImageButton; //导入方法依赖的package包/类
private void initToolbar() {
    Button mToolbarButton = (Button) findViewById(R.id.tool_bar_button);
    mToolbarButton.setVisibility(View.GONE);
    ImageButton mSearchButton = (ImageButton) findViewById(R.id.search_button);
    mSearchButton.setVisibility(View.GONE);

    mTitleText = (TextView) findViewById(R.id.title_text);
    mTitleText.setText("");
    mTitleText.setTextSize(16);
    mTitleText.setTypeface(Typeface.createFromAsset(getAssets(), getString(R.string.DB1FontPath)));

    mToolbar = (Toolbar) findViewById(R.id.tool_bar);
    mExitButton = new ImageButton(this);
    mExitButton.setBackgroundResource(R.drawable.ic_action_back_black);
    FrameLayout frameLayout = (FrameLayout) findViewById(R.id.tool_bar_layout);
    FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(100, 120);
    params.gravity = Gravity.CENTER_VERTICAL;
    params.leftMargin = 10;
    frameLayout.addView(mExitButton, params);

    setSupportActionBar(mToolbar);
    mExitButton.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            finish();
        }
    });
}
 
开发者ID:KnowledgeBegger,项目名称:MyEyepetizer,代码行数:29,代码来源:SubjectActivity.java

示例13: getView

import android.widget.ImageButton; //导入方法依赖的package包/类
public View getView(LayoutInflater inflater, Setting setting, View convertView, Context context) {

		// reuse if view exists
		if (mView != null) return mView;
		
		// create new view always. this is important for "dialog" mode
		mView = convertView = inflater.inflate(R.layout.row_setting_toggle, null); // inflate view of needed type
		
		// re-initialize views
		mTitle = (TextView) convertView.findViewById(R.id.title_view);
		mDescr = (TextView) convertView.findViewById(R.id.descr_view);
		mToggle = (ToggleButton) convertView.findViewById(R.id.clicable_right);
		mIcon = (ImageView) convertView.findViewById(R.id.icon_view);
		
		ImageButton button = (ImageButton) convertView.findViewById(R.id.popup_button);
		button.setVisibility(setting.hasPopup ? View.VISIBLE : View.GONE);
		LinearLayout clicableLeft = (LinearLayout) convertView.findViewById(R.id.clickable_left);
		
		// set listeners
		mToggle.setOnClickListener(this);
		button.setOnClickListener(this);
		clicableLeft.setOnClickListener(this);
		clicableLeft.setOnLongClickListener(setting.prefs == null ? null : this);

		// set values
		mSetting = setting;
		
		// update view
		updateView();
		
		return convertView;
	}
 
开发者ID:sdrausty,项目名称:buildAPKsApps,代码行数:33,代码来源:ToggleSettingRenderer.java

示例14: animateButtonAndShow

import android.widget.ImageButton; //导入方法依赖的package包/类
private void animateButtonAndShow(){
    ImageButton button= (ImageButton) findViewById(R.id.pre_start_skip_button);
    button.setVisibility(View.VISIBLE);
    //animate
    Animation animation= AnimationUtils.loadAnimation(this,R.anim.done_button_anim);
    button.startAnimation(animation);
}
 
开发者ID:mosamabinomar,项目名称:RootPGPExplorer,代码行数:8,代码来源:PreStartActivity.java

示例15: initControllerView

import android.widget.ImageButton; //导入方法依赖的package包/类
private void initControllerView(View v) {
    // By default these are hidden.
    mPrevButton = (ImageButton) v.findViewById(PRV_BUTTON_ID);
    if (mPrevButton != null) {
        mPrevButton.setVisibility(View.GONE);
    }
    mNextButton = (ImageButton) v.findViewById(NEXT_BUTTON_ID);
    if (mNextButton != null) {
        mNextButton.setVisibility(View.GONE);
    }

    mFfwdButton = (ImageButton) v.findViewById(FFWD_BUTTON_ID);
    if (mFfwdButton != null) {
        mFfwdButton.setOnClickListener(mFfwdListener);
        if (!mFromXml) {
            mFfwdButton.setVisibility(mUseFastForward ? View.VISIBLE : View.GONE);
        }
    }

    mRewButton = (ImageButton) v.findViewById(REW_BUTTON_ID);
    if (mRewButton != null) {
        mRewButton.setOnClickListener(mRewListener);
        if (!mFromXml) {
            mRewButton.setVisibility(mUseFastForward ? View.VISIBLE : View.GONE);
        }
    }
    mPauseButton = (ImageButton) v.findViewById(PAUSE_BUTTON_ID);
    if (mPauseButton != null) {
        mPauseButton.requestFocus();
        mPauseButton.setOnClickListener(mPauseListener);
    }

    mProgress = (ProgressBar) v.findViewById(MEDIACONTROLLER_PROGRESS_ID);
    if (mProgress != null) {
        if (mProgress instanceof SeekBar) {
            SeekBar seeker = (SeekBar) mProgress;
            seeker.setOnSeekBarChangeListener(mSeekListener);
            seeker.setThumbOffset(1);
        }
        mProgress.setMax(1000);
        mProgress.setEnabled(!mDisableProgress);
    }

    mEndTime = (TextView) v.findViewById(END_TIME_ID);
    mCurrentTime = (TextView) v.findViewById(CURRENT_TIME_ID);
}
 
开发者ID:pili-engineering,项目名称:PLDroidShortVideo,代码行数:47,代码来源:MediaController.java


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