當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。