本文整理了Java中android.widget.ViewFlipper.startFlipping()
方法的一些代码示例,展示了ViewFlipper.startFlipping()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ViewFlipper.startFlipping()
方法的具体详情如下:
包路径:android.widget.ViewFlipper
类名称:ViewFlipper
方法名:startFlipping
暂无
代码示例来源:origin: commonsguy/cw-omnibus
@Override
public void onCreate(Bundle state) {
super.onCreate(state);
setContentView(R.layout.main);
flipper=(ViewFlipper)findViewById(R.id.details);
for (String item : items) {
Button btn=new Button(this);
btn.setText(item);
flipper.addView(btn,
new ViewGroup.LayoutParams(
ViewGroup.LayoutParams.FILL_PARENT,
ViewGroup.LayoutParams.FILL_PARENT));
}
flipper.setFlipInterval(2000);
flipper.startFlipping();
}
}
代码示例来源:origin: robolectric/robolectric
@Test
public void testStartFlipping() {
flipper.startFlipping();
assertTrue("flipping", flipper.isFlipping());
}
代码示例来源:origin: facebook/facebook-android-sdk
result = RpsResult.INVALID;
showViews(shootGroup, playerChoiceGroup, rpsFlipper);
rpsFlipper.startFlipping();
hideViews(gestureImages);
hideViews(gestureTextViews);
enableViews(true, gestureImages);
showViews(rpsFlipper);
rpsFlipper.startFlipping();
break;
case RESULT:
代码示例来源:origin: stackoverflow.com
ViewFlipper flipper =(ViewFlipper)view.findViewById(R.id.flipper1); // Error
/** Start Flipping */
flipper.startFlipping();
mFlipping=1;
return view = inflater.inflate(R.layout.slide_left, null);
代码示例来源:origin: stackoverflow.com
view = inflater.inflate(R.layout.slide_left, null);
ViewFlipper flipper =(ViewFlipper)view.findViewById(R.id.flipper1); // No Error
/** Start Flipping */
flipper.startFlipping();
mFlipping=1;
return view;
代码示例来源:origin: stackoverflow.com
Button button = (Button) findViewById(R.id.button);
button.setOnClickListener(new View.OnClickListener(){
public void onClick(View view) {
EditText textbox = (EditText) findViewById(R.id.textbox);
ViewFlipper flipper = (ViewFlipper) findViewById(R.id.flipper);
if(textbox.getText().equals("nitesh"))
flipper.startFlipping();
}
});
代码示例来源:origin: stackoverflow.com
public class AudioFragment extends BaseFragment {
int mFlipping = 0 ;
private View view;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
view = inflater.inflate(R.layout.slide_left, null);
ViewFlipper flipper =(ViewFlipper)view.findViewById(R.id.flipper1); ---->Error
/** Start Flipping */
flipper.startFlipping();
mFlipping=1;
return view;
}
}
代码示例来源:origin: stackoverflow.com
ViewFlipper viewFlipper = (ViewFlipper)findViewById(R.id.viewFlipper);
viewFlipper.setFlipInterval(5000);
viewFlipper.startFlipping();
代码示例来源:origin: qiubiteme/android_api_demos
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.animation_2);
mFlipper = ((ViewFlipper) this.findViewById(R.id.flipper));
mFlipper.startFlipping();
Spinner s = (Spinner) findViewById(R.id.spinner);
ArrayAdapter<String> adapter = new ArrayAdapter<>(this,
android.R.layout.simple_spinner_item, mStrings);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
s.setAdapter(adapter);
s.setOnItemSelectedListener(this);
}
代码示例来源:origin: li2/learning-android-open-source
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.animation_2);
mFlipper = ((ViewFlipper) this.findViewById(R.id.flipper));
mFlipper.startFlipping();
Spinner s = (Spinner) findViewById(R.id.spinner);
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
android.R.layout.simple_spinner_item, mStrings);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
s.setAdapter(adapter);
s.setOnItemSelectedListener(this);
}
代码示例来源:origin: stackoverflow.com
ViewFlipper flipper = (ViewFlipper) findViewById(R.id.flipper);
flipper.setInAnimation(this, R.anim.in);
flipper.setOutAnimation(this, R.anim.out);
flipper.startFlipping();
代码示例来源:origin: stackoverflow.com
mViewFlipper = (ViewFlipper) findViewById(R.id.viewflipper);
mViewFlipper.setOnTouchListener(this);
mViewFlipper.startFlipping();
代码示例来源:origin: stackoverflow.com
Animation fade_in, fade_out, rowanimation;
ViewFlipper viewFlipper;
ScrollView myView;
TextView date;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
viewFlipper = (ViewFlipper) this.findViewById(R.id.bckgrndViewFlipper1);
fade_in = AnimationUtils.loadAnimation(this,
android.R.anim.fade_in);
fade_out = AnimationUtils.loadAnimation(this,
android.R.anim.fade_out);
viewFlipper.setInAnimation(fade_in);
viewFlipper.setOutAnimation(fade_out);
viewFlipper.setAutoStart(true);
viewFlipper.setFlipInterval(5000);
viewFlipper.startFlipping();
}
代码示例来源:origin: stackoverflow.com
viewFlipper.startFlipping();
代码示例来源:origin: stackoverflow.com
mFlipper.startFlipping();
代码示例来源:origin: stackoverflow.com
tflipper.startFlipping();
gDetector = new GestureDetector((OnGestureListener) this);
Button bp=(Button)findViewById(R.id.btnPrev);
代码示例来源: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();
}
内容来源于网络,如有侵权,请联系作者删除!