本文整理了Java中android.widget.ViewFlipper.getDisplayedChild()
方法的一些代码示例,展示了ViewFlipper.getDisplayedChild()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ViewFlipper.getDisplayedChild()
方法的具体详情如下:
包路径:android.widget.ViewFlipper
类名称:ViewFlipper
方法名:getDisplayedChild
暂无
代码示例来源:origin: stackoverflow.com
if (viewFlipper.getDisplayedChild() == 0)
break;
if (viewFlipper.getDisplayedChild() == 1)
break;
代码示例来源:origin: ChessLuo/TextBannerView
@Override
public void onClick(View v) {
int position = mViewFlipper.getDisplayedChild();//当前显示的子视图的索引位置
if (mListener!=null){
mListener.onItemClick(mDatas.get(position),position);
}
}
});
代码示例来源:origin: PrivacyApps/document-viewer
int getViewMode() {
final ViewFlipper vf = getViewflipper();
return vf != null ? vf.getDisplayedChild() : VIEW_RECENT;
}
代码示例来源:origin: tyzlmjj/AndroidUI
@Override
public void onAnimationEnd(Animation animation) {
textView.setText((flipper.getDisplayedChild()+1)+"/"+flipper.getChildCount());
}
代码示例来源:origin: ymback/NGA-CLIENT-VER-OPEN-SOURCE
@Override
public int switchToNextUser() {
mHeaderView.showPrevious();
return mHeaderView.getDisplayedChild();
}
代码示例来源:origin: nvllsvm/Audinaut
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putInt(Constants.FRAGMENT_DOWNLOAD_FLIPPER, playlistFlipper.getDisplayedChild());
}
代码示例来源:origin: nvllsvm/Audinaut
private void toggleFullscreenAlbumArt() {
if (playlistFlipper.getDisplayedChild() == 1) {
playlistFlipper.setInAnimation(AnimationUtils.loadAnimation(context, R.anim.push_down_in));
playlistFlipper.setOutAnimation(AnimationUtils.loadAnimation(context, R.anim.push_down_out));
playlistFlipper.setDisplayedChild(0);
} else {
scrollToCurrent();
playlistFlipper.setInAnimation(AnimationUtils.loadAnimation(context, R.anim.push_up_in));
playlistFlipper.setOutAnimation(AnimationUtils.loadAnimation(context, R.anim.push_up_out));
playlistFlipper.setDisplayedChild(1);
UpdateView.triggerUpdate();
}
}
代码示例来源:origin: FarbodSalamat-Zadeh/UsefulViews
if (mViewFlipper.getDisplayedChild() == 1) {
return; // If there is a child (to the left), stop
if (mViewFlipper.getDisplayedChild() == 0) {
return; // If there aren't any other children, stop
代码示例来源:origin: stackoverflow.com
if (vf.getDisplayedChild()==0)
break;
if (vf.getDisplayedChild()==vf.getChildCount()-1)
break;
代码示例来源:origin: stackoverflow.com
if (viewFlipper.getDisplayedChild() == 0)
break;
if (viewFlipper.getDisplayedChild() == 1)
break;
代码示例来源:origin: tyzlmjj/AndroidUI
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
final TextView textView = (TextView) findViewById(R.id.text);
final ViewFlipper flipper = (ViewFlipper) findViewById(R.id.flipper);
flipper.addView(getImageView(R.mipmap.abcde_a));
flipper.addView(getImageView(R.mipmap.abcde_b));
flipper.addView(getImageView(R.mipmap.abcde_d));
flipper.setInAnimation(this, R.anim.push_up_in);
flipper.setOutAnimation(this, R.anim.push_up_out);
flipper.setFlipInterval(3000);
flipper.getInAnimation().setAnimationListener(new Animation.AnimationListener() {
@Override
public void onAnimationStart(Animation animation) {
}
@Override
public void onAnimationEnd(Animation animation) {
textView.setText((flipper.getDisplayedChild()+1)+"/"+flipper.getChildCount());
}
@Override
public void onAnimationRepeat(Animation animation) {
}
});
textView.setText((flipper.getDisplayedChild()+1)+"/"+flipper.getChildCount());
flipper.startFlipping();
}
代码示例来源:origin: stackoverflow.com
handler.post(new Runnable(){
public void run(){
int currentView = flipper.getDisplayedChild();
if (direction.equalsIgnoreCase("left")) {
内容来源于网络,如有侵权,请联系作者删除!