scrollTo scrollBy;
setOnClickListener{
switch(){
case R.id.up:
break;
case R.ID.down:
{
scroll.scrollto(o);
scrollto scollby;
setOnClickListener{
switch(){
case R.id.up:
break;
case R.ID.down:
{
scroll.scrollto(o);
scrollto scollby;
2015-01-27
if(scoll.getScrollY()<=0){
if(scroll.getScroll
scroll.getChildAt()0.getMeasureHeight()
if(scroll.getScroll
scroll.getChildAt()0.getMeasureHeight()
2015-01-27
case MotionEvent;
getScrollY();
getMeasuredHeight;
getHeight;
getScrollY();
getMeasuredHeight;
getHeight;
2015-01-27
ScrollView
private ScrollView scroll;
scroll=findViewById;
scroll.setOntoughlistener(){
ontouchview v switch(event.getAction())
case motionEvent.action_up:
motionEventt.action_move;
motionevent_actyion
action_move;
private ScrollView scroll;
scroll=findViewById;
scroll.setOntoughlistener(){
ontouchview v switch(event.getAction())
case motionEvent.action_up:
motionEventt.action_move;
motionevent_actyion
action_move;
2015-01-27
scrollbars="none";
HorizontalScrollView horizontalScrollView;
HorizontalScrollView horizontalScrollView;
2015-01-27
Scroll
ViewHorizontalScrollView;
<TextView>
width height
private TextView tv;
tv=findViewById;
tv.setText(text);
getResources().getStrign(R.string.content));
ViewHorizontalScrollView;
<TextView>
width height
private TextView tv;
tv=findViewById;
tv.setText(text);
getResources().getStrign(R.string.content));
2015-01-27
action_up
private float startX;
startX=event.getX();
flipper.setInanimation
flipper.showPrevious(
flipper.showNext();
private float startX;
startX=event.getX();
flipper.setInanimation
flipper.showPrevious(
flipper.showNext();
2015-01-27
onTouchEvent;
switch()event.getAction()){
case MotionEvent.ACTION_DOWN:
ACTION_DOWN__
switch()event.getAction()){
case MotionEvent.ACTION_DOWN:
ACTION_DOWN__
2015-01-27
image.setImageResource(resId);
imageSetbackgroundresource
flipper.setInanimation(this,r.anim.left_in);
flipper.setOUTaINmation(this,R.anim.left_out);
flipper.serFlipInterval(3000);
flipper.startFlipping();
flippper.startFlipping();
imageSetbackgroundresource
flipper.setInanimation(this,r.anim.left_in);
flipper.setOUTaINmation(this,R.anim.left_out);
flipper.serFlipInterval(3000);
flipper.startFlipping();
flippper.startFlipping();
2015-01-27
动态导入:
private int[] resId={R.drawable.pic1,r.drawable.pic2}
for(inti=0,i<resId.length;i++;
flipper.addView(child
private GetImageView(){
imageView image =new ImageView(this);
private int[] resId={R.drawable.pic1,r.drawable.pic2}
for(inti=0,i<resId.length;i++;
flipper.addView(child
private GetImageView(){
imageView image =new ImageView(this);
2015-01-27
ViewFlipper介绍:
ViewFlipper;
private ViewFlipper flipper;
flipper=findViewById;
ViewFlipper;
private ViewFlipper flipper;
flipper=findViewById;
2015-01-27