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


Java ViewSwitcher.setVisibility方法代码示例

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


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

示例1: onPreExecute

import android.widget.ViewSwitcher; //导入方法依赖的package包/类
@Override
public void onPreExecute() {
    MainActivity activity = (MainActivity) mActivity.get();

    ((DrawerLayout) activity.drawer).setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED);
    mFragment.get().enablePullToRefresh(true);
    activity.findViewById(R.id.refresh_fab).setEnabled(true);
    ((RefreshIcon) activity.findViewById(R.id.refresh_fab)).show();
    activity.invalidateOptionsMenu();

    ViewSwitcher viewSwitcher = activity.findViewById(R.id.switcher);
    EditText newLyrics = activity.findViewById(R.id.edit_lyrics);

    viewSwitcher.setVisibility(View.VISIBLE);
    newLyrics.setVisibility(View.GONE);
}
 
开发者ID:QuickLyric,项目名称:QuickLyric,代码行数:17,代码来源:Id3Writer.java

示例2: changeCategoryOfList

import android.widget.ViewSwitcher; //导入方法依赖的package包/类
@Override
public void changeCategoryOfList(View _View, ShoppingList _ShoppingList, Category _CategoryForShoppingList, ViewSwitcher _ViewSwitcher) {
    ImageView cancelView;
    ImageView submitView;
    LinearLayout moveContainer;
    Spinner spinner;
    List<Category> categories;

    moveContainer = (LinearLayout) _View.findViewById(R.id.expandable_list_view_choose_move_category);

    cancelView = (ImageView) _View.findViewById(R.id.expandable_list_view_move_cancel);
    submitView = (ImageView) _View.findViewById(R.id.expandable_list_view_move_submit);
    spinner = (Spinner) _View.findViewById(R.id.expandable_list_view_list_move_spinner);

    categories = mCategoryController.getAllCategories();
    categories.remove(_CategoryForShoppingList);

    SpinnerAdapter spinnerAdapter = new CategorySpinnerAdapter(mContext, categories);
    spinner.setAdapter(spinnerAdapter);

    _ViewSwitcher.setVisibility(View.GONE);
    moveContainer.setVisibility(View.VISIBLE);

    cancelView.setOnClickListener(new OnCancelMoveClickListener(moveContainer, _ViewSwitcher));
    submitView.setOnClickListener(new OnSubmitMoveClickListener(mContext, moveContainer,
            _ViewSwitcher, spinner, _ShoppingList));
}
 
开发者ID:InstaList,项目名称:instalist-android,代码行数:28,代码来源:ContextItemClickedHelper.java

示例3: makeButtonsView

import android.widget.ViewSwitcher; //导入方法依赖的package包/类
void makeButtonsView() {
		mButtonsView = getLayoutInflater().inflate(R.layout.buttons,null);
		mFilenameView = (TextView)mButtonsView.findViewById(R.id.docNameText);
		//xujie debug
//		mPageSlider = (SeekBar)mButtonsView.findViewById(R.id.pageSlider);
		mPageNumberView = (TextView)mButtonsView.findViewById(R.id.pageNumber);
		mSearchButton = (ImageButton)mButtonsView.findViewById(R.id.searchButton);
		mCancelButton = (ImageButton)mButtonsView.findViewById(R.id.cancel);
		mOutlineButton = (ImageButton)mButtonsView.findViewById(R.id.outlineButton);
		mTopBarSwitcher = (ViewSwitcher)mButtonsView.findViewById(R.id.switcher);
		//xujie debug
		if(mIsFromMobilePrintPreview == true){
			mSearchButton.setBackgroundDrawable(this.getResources().getDrawable(R.drawable.ic_print));
		}
		else{
			mSearchButton.setBackgroundDrawable(this.getResources().getDrawable(R.drawable.ic_magnifying_glass));
		}
		
		//xujie debug
		mSearchBack = (ImageButton)mButtonsView.findViewById(R.id.searchBack);
		mSearchFwd = (ImageButton)mButtonsView.findViewById(R.id.searchForward);
		mSearchText = (EditText)mButtonsView.findViewById(R.id.searchText);
// XXX		mLinkButton = (ImageButton)mButtonsView.findViewById(R.id.linkButton);
		mTopBarSwitcher.setVisibility(View.INVISIBLE);
		mPageNumberView.setVisibility(View.INVISIBLE);
		//xujie debug
//		mPageSlider.setVisibility(View.INVISIBLE);
	}
 
开发者ID:ce-app-dev,项目名称:PDF2ImageForEP,代码行数:29,代码来源:MuPDFActivity.java

示例4: init

import android.widget.ViewSwitcher; //导入方法依赖的package包/类
private void init(Context context) {

        SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);

        boolean isPeekDisabled = preferences.getBoolean(PreferenceKeys.PREF_DISABLE_PEEK, false);
        String quietHourStr = preferences
                .getString(PreferenceKeys.PREF_QUIET_HOUR, PreferenceKeys.PREF_QUIET_HOUR_DEF);
        boolean isQuietHourSet = !quietHourStr.equals(PreferenceKeys.PREF_QUIET_HOUR_DEF);

        mOptionsShowing = !(isPeekDisabled || isQuietHourSet);
        mQuietHour = QuietHour.createQuietHour(quietHourStr);

        LayoutInflater.from(context).inflate(R.layout.everything_card, this, true);
        mPanelSwitcher = (ViewSwitcher) findViewById(R.id.view_switcher);
        if (!mOptionsShowing) {
            mPanelSwitcher.setVisibility(GONE);
        }

        mFromBtn = (Button) findViewById(R.id.quiet_hour_from_btn);
        mFromBtn.setOnClickListener(this);

        mToBtn = (Button) findViewById(R.id.quiet_hour_to_btn);
        mToBtn.setOnClickListener(this);

        Button mQuietHourBtn = (Button) findViewById(R.id.quiet_hour_btn);
        mQuietHourBtn.setOnClickListener(this);

        Button mDisableBtn = (Button) findViewById(R.id.as_is_btn);
        mDisableBtn.setOnClickListener(this);

        mFromToText = (TextView) findViewById(R.id.from_to_text);
        if (isQuietHourSet) {
            displayTime();
        }
        mFromToText.setOnClickListener(this);
    }
 
开发者ID:lzanita09,项目名称:NotificationPeekPort,代码行数:37,代码来源:EverythingCard.java

示例5: startEditTagsMode

import android.widget.ViewSwitcher; //导入方法依赖的package包/类
private void startEditTagsMode() {
    ImageButton editButton = getActivity().findViewById(R.id.edit_tags_btn);
    editButton.setImageResource(R.drawable.ic_edit_anim);
    ((Animatable) editButton.getDrawable()).start();

    ((DrawerLayout) ((MainActivity) getActivity()).drawer).setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
    mRefreshLayout.setEnabled(false);
    getActivity().findViewById(R.id.refresh_fab).setEnabled(false);
    ((RefreshIcon) getActivity().findViewById(R.id.refresh_fab)).hide();
    ((Toolbar) getActivity().findViewById(R.id.toolbar)).getMenu().clear();

    ViewSwitcher viewSwitcher = getActivity().findViewById(R.id.switcher);
    EditText songTV = getActivity().findViewById(R.id.song);
    TextView artistTV = getActivity().findViewById(R.id.artist);

    EditText newLyrics = getActivity().findViewById(R.id.edit_lyrics);
    newLyrics.setTypeface(LyricsTextFactory.FontCache.get("light", getActivity()));
    newLyrics.setText(Html.fromHtml(TextUtils.isEmpty(mLyrics.getText()) ? "" : mLyrics.getText()), TextView.BufferType.EDITABLE);

    viewSwitcher.setVisibility(View.GONE);
    newLyrics.setVisibility(View.VISIBLE);

    songTV.setInputType(InputType.TYPE_CLASS_TEXT);
    artistTV.setInputType(InputType.TYPE_CLASS_TEXT);
    songTV.setBackgroundResource(R.drawable.abc_textfield_search_material);
    artistTV.setBackgroundResource(R.drawable.abc_textfield_search_material);


    if (songTV.requestFocus()) {
        InputMethodManager imm = (InputMethodManager)
                getActivity().getApplicationContext().getSystemService(Context.INPUT_METHOD_SERVICE);
        imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, InputMethodManager.SHOW_IMPLICIT);
    }
}
 
开发者ID:QuickLyric,项目名称:QuickLyric,代码行数:35,代码来源:LyricsViewFragment.java


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