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


Java View.INVISIBLE属性代码示例

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


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

示例1: scrollBehindTo

/**
 * 滑动下方视图到达的位置
 */
public void scrollBehindTo(View content, int x, int y) {
    int vis = View.VISIBLE;
    if (mMode == SlidingMenu.LEFT) {
        if (x >= content.getLeft()) vis = View.INVISIBLE;
        scrollTo((int)((x + getBehindWidth())*mScrollScale), y);
    } else if (mMode == SlidingMenu.RIGHT) {
        if (x <= content.getLeft()) vis = View.INVISIBLE;
        scrollTo((int)(getBehindWidth() - getWidth() +
                (x-getBehindWidth())*mScrollScale), y);
    } else if (mMode == SlidingMenu.LEFT_RIGHT) {
        mContent.setVisibility(x >= content.getLeft() ? View.INVISIBLE : View.VISIBLE);
        mSecondaryContent.setVisibility(x <= content.getLeft() ? View.INVISIBLE : View.VISIBLE);
        vis = x == 0 ? View.INVISIBLE : View.VISIBLE;
        if (x <= content.getLeft()) {
            scrollTo((int)((x + getBehindWidth())*mScrollScale), y);
        } else {
            scrollTo((int)(getBehindWidth() - getWidth() +
                    (x-getBehindWidth())*mScrollScale), y);
        }
    }
    if (vis == View.INVISIBLE)
        Log.v(TAG, "behind INVISIBLE");
    setVisibility(vis);
}
 
开发者ID:Datatellit,项目名称:xlight_android_native,代码行数:27,代码来源:CustomViewBehind.java

示例2: onVisibilityChanged

@Override
protected void onVisibilityChanged(@NonNull View changedView, int visibility) {
    super.onVisibilityChanged(changedView, visibility);

    // avoid doing this check before View is even visible
    if (timeStartElapsed != -1) {
        if ((visibility == View.INVISIBLE || visibility == View.GONE) &&
                previousVisibility == View.VISIBLE) {

            invisibleTimeStart = SystemClock.elapsedRealtime();
        }

        if ((previousVisibility == View.INVISIBLE || previousVisibility == View.GONE) &&
                visibility == View.VISIBLE) {

            timeStartElapsed += SystemClock.elapsedRealtime() - invisibleTimeStart;
        }
    } else {
        timeStartMillis = System.currentTimeMillis();
        timeStartNanos = System.nanoTime();
        timeStartElapsed = SystemClock.elapsedRealtime();
    }

    previousVisibility = visibility;
}
 
开发者ID:PacktPublishing,项目名称:Building-Android-UIs-with-Custom-Views,代码行数:25,代码来源:AnimationExampleView.java

示例3: setTitle

private void setTitle() {
    if (title == null || dname == null) {
        return;
    }
    if (titleStr != null) {
        if (title.getVisibility() == View.INVISIBLE) {
            title.setVisibility(View.VISIBLE);
        }
        title.setText(titleStr);
        if (dname.getVisibility() == View.VISIBLE) {
            dname.setVisibility(View.INVISIBLE);
        }
    } else {
        if (title.getVisibility() == View.VISIBLE) {
            title.setVisibility(View.INVISIBLE);
        }
        if (dname.getVisibility() == View.INVISIBLE) {
            dname.setVisibility(View.VISIBLE);
        }
    }
}
 
开发者ID:KnIfER,项目名称:wangyi-Lyric-Parser,代码行数:21,代码来源:FilePickerDialog.java

示例4: updateMapDownloadButton

void updateMapDownloadButton()
{
    switch (mapView.getCenterTileState())
    {
        case NoData:
        {
            if(btnDownloadMap.getVisibility()==View.INVISIBLE)
            {
                btnDownloadMap.setVisibility(View.VISIBLE);
                btnDownloadMap.getParent().requestLayout();
                updateMapDownloadButtonText();
            }
            break;
        }

        case Loaded:
        {
            if(btnDownloadMap.getVisibility()==View.VISIBLE)
            {
                btnDownloadMap.setVisibility(View.INVISIBLE);
            }
            break;
        }
        case Unknown:
            break;
    }
}
 
开发者ID:LewisVo,项目名称:Overkill,代码行数:27,代码来源:DisplayOfflineMap.java

示例5: updateHeaderVisibilities

private void updateHeaderVisibilities() {
    int top;
    if (mHeader != null) {
        top = mHeader.getMeasuredHeight() + (mHeaderOffset != null ? mHeaderOffset : 0) + mStickyHeaderTopOffset;
    } else {
        top = stickyHeaderTop();
    }
    int childCount = mList.getChildCount();
    for (int i = 0; i < childCount; i++) {

        // ensure child is a wrapper view
        View child = mList.getChildAt(i);
        if (!(child instanceof WrapperView)) {
            continue;
        }

        // ensure wrapper view child has a header
        WrapperView wrapperViewChild = (WrapperView) child;
        if (!wrapperViewChild.hasHeader()) {
            continue;
        }

        // update header views visibility
        View childHeader = wrapperViewChild.mHeader;
        if (wrapperViewChild.getTop() < top) {
            if (childHeader.getVisibility() != View.INVISIBLE) {
                childHeader.setVisibility(View.INVISIBLE);
            }
        } else {
            if (childHeader.getVisibility() != View.VISIBLE) {
                childHeader.setVisibility(View.VISIBLE);
            }
        }
    }
}
 
开发者ID:SavorGit,项目名称:Hotspot-master-devp,代码行数:35,代码来源:StickyListHeadersListView.java

示例6: setVisibility

@Override
public void setVisibility(int visibility) {
    int currentVisibility = getVisibility();
    super.setVisibility(visibility);
    if (visibility != currentVisibility) {
        if (visibility == View.VISIBLE) {
            resetAnimation();
        } else if (visibility == View.GONE || visibility == View.INVISIBLE) {
            stopAnimation();
        }
    }
}
 
开发者ID:tortuvshin,项目名称:health,代码行数:12,代码来源:HackProgressBar.java

示例7: showLoading

@Override
public void showLoading() {
    if (!isAdded()) {
        return;
    }

    if (!mPlContainer.isContent()) {
        mPlContainer.showLoading();

        if (mPlContainer.getVisibility() == View.INVISIBLE) {
            mPlContainer.setVisibility(View.VISIBLE);
        }
    }
}
 
开发者ID:coderwjq,项目名称:ZhaZhaShop,代码行数:14,代码来源:FragmentMovieFind.java

示例8: setVisibility

@Override
public void setVisibility(int visibility) 
{
    super.setVisibility(visibility);
    
    if (visibility == View.INVISIBLE || visibility == View.GONE) {
        cancelTask();
    }
}
 
开发者ID:suomenriistakeskus,项目名称:oma-riista-android,代码行数:9,代码来源:WebImageView.java

示例9: openOrClose

private void openOrClose(boolean open, boolean animate) {
    if (mIsAnimating) {
        return;
    }

    if (open && !mClosedState) {
        return;
    }

    if (!open && mClosedState) {
        return;
    }

    if (animate) {
        mMenuButton.performClick();
    } else {
        mClosedState = !open;

        final float centerX = mMenuButton.getX();
        final float centerY = mMenuButton.getY();

        final int buttonsCount = mButtons.size();
        final float angleStep = 360f / buttonsCount;

        final float offset = open ? mDistance : 0f;
        final float scale = open ? 1f : 0f;

        mMenuButton.setImageResource(open ? mIconClose : mIconMenu);
        mMenuButton.setAlpha(open ? DEFAULT_CLOSE_ICON_ALPHA : 1f);

        final int visibility = open ? View.VISIBLE : View.INVISIBLE;
        for (View view: mButtons) {
            view.setVisibility(visibility);
        }

        offsetAndScaleButtons(centerX, centerY, angleStep, offset, scale);
    }
}
 
开发者ID:Ramotion,项目名称:circle-menu-android,代码行数:38,代码来源:CircleMenuView.java

示例10: onVisibilityChanged

protected void onVisibilityChanged(View changedView, int visibility) {
    super.onVisibilityChanged(changedView, visibility);
    if(this.mProgressDrawable != null) {
        if(visibility != View.GONE && visibility != View.INVISIBLE) {
            this.mProgressDrawable.start();
        } else {
            this.mProgressDrawable.stop();
        }
    }

}
 
开发者ID:alibaba,项目名称:atlas,代码行数:11,代码来源:DefaultProgress.java

示例11: onStart

@Override
public void onStart() {
    super.onStart();

    Bundle args = getArguments();
    if (args != null) {
        videoCallEnabled = args.getBoolean(CallActivity.EXTRA_VIDEO_CALL, true);
        displayHud = args.getBoolean(CallActivity.EXTRA_DISPLAY_HUD, false);
    }
    int visibility = displayHud ? View.VISIBLE : View.INVISIBLE;
    encoderStatView.setVisibility(visibility);
    toggleDebugButton.setVisibility(visibility);
    hudViewsSetProperties(View.INVISIBLE);
    isRunning = true;
}
 
开发者ID:lgyjg,项目名称:AndroidRTC,代码行数:15,代码来源:HudFragment.java

示例12: onStart

@Override
public void onStart() {
  super.onStart();

  Bundle args = getArguments();
  if (args != null) {
    videoCallEnabled = args.getBoolean(CallActivity.EXTRA_VIDEO_CALL, true);
    displayHud = args.getBoolean(CallActivity.EXTRA_DISPLAY_HUD, false);
  }
  int visibility = displayHud ? View.VISIBLE : View.INVISIBLE;
  encoderStatView.setVisibility(visibility);
  toggleDebugButton.setVisibility(visibility);
  hudViewsSetProperties(View.INVISIBLE);
  isRunning = true;
}
 
开发者ID:Piasy,项目名称:AppRTC-Android,代码行数:15,代码来源:HudFragment.java

示例13: onAnimationEnd

@Override
public void onAnimationEnd(Animator animation)
{
    super.onAnimationEnd(animation);

    final View target = getTarget();
    if (target != null && target.getVisibility() != View.INVISIBLE)
    {
        target.setVisibility(View.INVISIBLE);
    }
}
 
开发者ID:zj565061763,项目名称:animator,代码行数:11,代码来源:OnEndInvisible.java

示例14: setKeypadVisibility

public static void setKeypadVisibility(Context context, EditText inputNote, int visibility) {
    InputMethodManager imm = (InputMethodManager) context
            .getSystemService(Context.INPUT_METHOD_SERVICE);

    switch (visibility) {
        case View.VISIBLE:
            // 開啟鍵盤
            imm.showSoftInput(inputNote, InputMethodManager.SHOW_IMPLICIT);
            break;
        case View.GONE:
        case View.INVISIBLE:
            // 關閉鍵盤
            imm.hideSoftInputFromWindow(inputNote.getWindowToken(), 0);
            break;
    } /* end of switch */
}
 
开发者ID:Welloculus,项目名称:MobileAppForPatient,代码行数:16,代码来源:GuiUtils.java

示例15: onVisibilityChanged

@Override
protected void onVisibilityChanged(View changedView, int visibility) {
	super.onVisibilityChanged(changedView, visibility);
	if (visibility == View.INVISIBLE || visibility == View.GONE) {
		clearRotateAnimation();
	} else {
		setRotateAnimation();
	}
}
 
开发者ID:qizhenghao,项目名称:HiBangClient,代码行数:9,代码来源:FlippingImageView.java


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